8 #include <ngl/Colour.h>
29 Material(ngl::Colour _c1, ngl::Colour _c2 );
47 void setReflection(
float _refl_intensity,
float _diffuse_intensity);
54 void setRefraction(
float _ior,
float _transparency,
float _diffuse_intensity);
Material()
Material constructor.
bool m_isRefractive
Specifies whether object is transparent.
float m_ior
Index of refraction.
void setHardness(float _highlight_size)
Sets the specular modulator for the specular contribution in the Phong shader.
float getIOR()
Returns index of refraction.
float m_refl_intensity
Amount of reflection.
float getDiffuseIntensity()
Returns amount of diffuse contribution.
float m_transparency
Amount of refraction, in other words 'transparency'.
float m_spec_hardness
This will drive the spreadness of the specular highlights.
bool m_isReflective
Tells whether the object is reflective.
float getTransparency()
Returns transparency.
ngl::Colour m_colour1
Colour of the object.
float m_diffuse_intensity
Diffuse intensity, self-explanatory.
bool isRefractive()
Returns whether the material is reflective or not.
float getReflIntensity()
Returns amount of reflection.
void setReflection(float _refl_intensity, float _diffuse_intensity)
Sets the reflection parameters.
void setRefraction(float _ior, float _transparency, float _diffuse_intensity)
Sets the refraction settings.
ngl::Colour m_colour2
For checker materials we will have colour1 and colour2, for plain ones just colour1.
This class handles the implementation of ray: an object with an origin and a direction.
bool isReflective()
Returns whether the material is reflective or not.
ngl::Colour objColour()
Returns the object colour.
bool m_isChecker
Specifies whether it is checker or not.