264              float aShinness, 
float aTransparency, 
float aReflection );
 
  326                           float aShadowAttenuationFactor ) 
const = 0;
 
 
  384                          const SFVEC3F& aSpecular, 
float aShinness, 
float aTransparency,
 
  385                          float aReflection ) :
 
  386        MATERIAL( aAmbient, aEmissive, aSpecular, aShinness, aTransparency, aReflection ) {}
 
 
  391                   const SFVEC3F& aLightColor, 
float aShadowAttenuationFactor ) 
const override;
 
 
This source code comes from the project: https://github.com/sol-prog/Perlin_Noise.
 
BLINN_PHONG_MATERIAL(const SFVEC3F &aAmbient, const SFVEC3F &aEmissive, const SFVEC3F &aSpecular, float aShinness, float aTransparency, float aReflection)
 
SFVEC3F Shade(const RAY &aRay, const HITINFO &aHitInfo, float NdotL, const SFVEC3F &aDiffuseObjColor, const SFVEC3F &aDirToLight, const SFVEC3F &aLightColor, float aShadowAttenuationFactor) const override
Shade an intersection point.
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
const MATERIAL_GENERATOR * m_board_normal_generator
 
A base class that can be used to derive procedurally generated materials.
 
virtual SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const =0
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
virtual ~MATERIAL_GENERATOR()
 
float GetReflectivity() const
 
float GetAbsorvance() const
 
const MATERIAL_GENERATOR * GetGenerator() const
 
void SetReflectionRayCount(unsigned int aCount)
 
unsigned int m_refractionRayCount
Number of rays that will be interpolated for this material if it is transparent.
 
unsigned int m_refractionRecursionCount
Number of levels it allows for refraction recursiveness.
 
static void SetDefaultReflectionRayCount(unsigned int aCount)
 
void SetRefractionRecursionCount(unsigned int aCount)
 
static void SetDefaultRefractionRayCount(unsigned int aCount)
 
float m_absorbance
absorbance factor for the transparent material.
 
unsigned int m_reflectionRayCount
Number of rays that will be interpolated for this material if it is reflective.
 
unsigned int m_reflectionRecursionCount
Number of levels it allows for reflection recursiveness.
 
bool GetCastShadows() const
 
static int m_defaultReflectionRayCount
 
static int m_defaultRefractionRayCount
 
static void SetDefaultRefractionRecursionCount(unsigned int aCount)
 
void SetCastShadows(bool aCastShadows)
Set if the material can receive shadows.
 
void SetGenerator(const MATERIAL_GENERATOR *aGenerator)
 
virtual SFVEC3F Shade(const RAY &aRay, const HITINFO &aHitInfo, float NdotL, const SFVEC3F &aDiffuseObjColor, const SFVEC3F &aDirToLight, const SFVEC3F &aLightColor, float aShadowAttenuationFactor) const =0
Shade an intersection point.
 
const SFVEC3F & GetAmbientColor() const
 
unsigned int GetReflectionRecursionCount() const
 
static int m_defaultRefractionRecursionCount
 
float GetTransparency() const
 
unsigned int GetRefractionRayCount() const
 
bool m_castShadows
true if this object will block the light.
 
unsigned int GetRefractionRecursionCount() const
 
void Generate(SFVEC3F &aNormal, const RAY &aRay, const HITINFO &aHitInfo) const
 
float m_transparency
1.0 is completely transparent, 0.0 completely opaque.
 
float m_reflection
1.0 completely reflective, 0.0 no reflective.
 
const MATERIAL_GENERATOR * m_generator
 
const SFVEC3F & GetSpecularColor() const
 
void SetReflectionRecursionCount(unsigned int aCount)
 
static void SetDefaultReflectionRecursionCount(unsigned int aCount)
 
static int m_defaultFeflectionRecursionCount
 
void SetRefractionRayCount(unsigned int aCount)
 
const SFVEC3F & GetEmissiveColor() const
 
void SetAbsorvance(float aAbsorvanceFactor)
 
float GetReflection() const
 
unsigned int GetReflectionRayCount() const
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
virtual ~PLASTIC_NORMAL()
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
virtual ~PLASTIC_SHINE_NORMAL()
 
virtual ~PLATED_COPPER_NORMAL()
 
PLATED_COPPER_NORMAL(float aScale)
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
virtual ~SILK_SCREEN_NORMAL()
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
const MATERIAL_GENERATOR * m_copper_normal_generator
 
virtual ~SOLDER_MASK_NORMAL()
 
SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const override
Generate a 3D vector based on the ray and hit information depending on the implementation.
 
Stores the hit information of a ray with a point on the surface of a object.