56 enum class STDMAT :
int { BLACKPLASTIC,BRASS,BRONZE,CHROME,COPPER,GOLD,PEWTER,SILVER,POLISHEDSILVER};
61 const static Real s_materials [9][10]=
63 { 0.0f,0.0f,0.0f,0.01f,0.01f,0.01f,0.50f,0.50f,0.50f,32.0f},
64 { 0.329412f,0.223529f,0.027451f,0.780392f,0.568627f,0.113725f,0.992157f,
65 0.941176f,0.807843f,27.8974f},
66 { 0.2125f,0.1275f,0.054f,0.714f,0.4284f,0.18144f,0.393548f,0.271906f,
68 { 0.25f,0.25f,0.25f,0.4f,0.4f,0.4f,0.774597f,0.774597f,0.774597f,76.8f},
69 { 0.19125f,0.0735f,0.0225f,0.7038f,0.27048f,0.0828f,0.256777f,0.137622f,
71 { 0.274725f,0.1995f,0.0745f,0.75164f,0.60648f,0.22648f,0.628281f,
72 0.555802f,0.3666065f,51.2f},
73 { 0.10588f,0.058824f,0.113725f,0.427451f,0.470588f,0.541176f,
74 0.3333f,0.3333f,0.521569f,9.84615f},
75 { 0.19225f,0.19225f,0.19225f,0.50754f,0.50754f,0.50754f,0.508273f,
76 0.508273f,0.508273f,51.2f},
77 { 0.23125f,0.23125f,0.23125f,0.2775f,0.2775f,0.2775f,0.77391f,
78 0.77391f,0.77391f,89.6f}
90 void setDefault() noexcept;
95 void set( const Material &_m ) noexcept;
101 void change( const STDMAT _mat ) noexcept;
109 Material( Colour _amb=0.0
f, Colour _dif=0.5f, Colour _spec=1.0f ) noexcept:
119 Material(STDMAT _mat) noexcept;
125 Material(
int _mat ) noexcept;
141 void setAmbient(
const Colour &_c) noexcept{ m_ambient = _c;}
142 Colour getAmbient() const noexcept {
return m_ambient;}
147 void setDiffuse(
const Colour &_c) noexcept{ m_diffuse = _c;}
148 Colour getDiffuse() const noexcept {
return m_diffuse;}
153 void setSpecular(
const Colour &_c) noexcept{ m_specular = _c;}
154 Colour getSpecular() const noexcept{
return m_specular;}
159 void setSpecularExponent(
Real _s) noexcept{ m_specularExponent=_s;}
160 Real getSpecularExponent()const noexcept{
return m_specularExponent;}
162 Real getTransparency()const noexcept{
return m_transparency;}
168 void setRoughness(
Real _r) noexcept{m_surfaceRoughness=_r;}
169 Real getRoughness()const noexcept{
return m_surfaceRoughness;}
182 void loadToShader(
std::string _uniformName )
const noexcept;
200 Real m_specularExponent;
208 Real m_surfaceRoughness;
a simple colour class for RGBA colour
main definition of types and namespace
implementation files for RibExport class
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
GLsizei const GLchar *const * string