268 float aShinness,
float aTransparency,
float aReflection );
330 float aShadowAttenuationFactor )
const = 0;
388 const SFVEC3F& aSpecular,
float aShinness,
float aTransparency,
389 float aReflection ) :
390 MATERIAL( aAmbient, aEmissive, aSpecular, aShinness, aTransparency, aReflection ) {}
395 const SFVEC3F& aLightColor,
float aShadowAttenuationFactor )
const override;
398 #endif // _MATERIAL_H_ float GetTransparency() const
float GetReflectivity() const
virtual ~PLASTIC_SHINE_NORMAL()
Procedural generation of the copper normals.
float m_reflection
1.0 completely reflective, 0.0 no reflective.
This source code comes from the project: https://github.com/sol-prog/Perlin_Noise.
const SFVEC3F & GetEmissiveColor() const
static void SetDefaultReflectionRecursionCount(unsigned int aCount)
bool m_castShadows
true if this object will block the light.
static void SetDefaultRefractionRecursionCount(unsigned int aCount)
void Generate(SFVEC3F &aNormal, const RAY &aRay, const HITINFO &aHitInfo) const
static int m_defaultReflectionRayCount
void SetReflectionRayCount(unsigned int aCount)
void SetAbsorvance(float aAbsorvanceFactor)
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.
void SetGenerator(const MATERIAL_GENERATOR *aGenerator)
Procedural generation of the plastic normals.
void SetReflectionRecursionCount(unsigned int aCount)
Blinn Phong based material https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model.
const SFVEC3F & GetSpecularColor() const
void SetCastShadows(bool aCastShadows)
Set if the material can receive shadows.
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.
static int m_defaultFeflectionRecursionCount
virtual ~SOLDER_MASK_NORMAL()
Base material class that can be used to derive other material implementations.
virtual ~PLATED_COPPER_NORMAL()
float GetReflection() const
static void SetDefaultReflectionRayCount(unsigned int aCount)
void SetRefractionRecursionCount(unsigned int aCount)
PLATED_COPPER_NORMAL(float aScale)
unsigned int m_reflectionRecursionCount
unsigned int m_refractionRayCount
Number of rays that will be interpolated for this material if it is reflective.
unsigned int GetRefractionRayCount() const
A base class that can be used to derive procedurally generated materials.
unsigned int m_reflectionRayCount
Number of levels it allows for refraction recursiveness.
unsigned int m_refractionRecursionCount
Number of levels it allows for reflection recursiveness.
const MATERIAL_GENERATOR * GetGenerator() const
BLINN_PHONG_MATERIAL(const SFVEC3F &aAmbient, const SFVEC3F &aEmissive, const SFVEC3F &aSpecular, float aShinness, float aTransparency, float aReflection)
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_generator
static int m_defaultRefractionRecursionCount
const MATERIAL_GENERATOR * m_copper_normal_generator
const SFVEC3F & GetAmbientColor() const
static int m_defaultRefractionRayCount
Stores the hit information of a ray with a point on the surface of a object.
unsigned int GetReflectionRayCount() const
virtual ~PLASTIC_NORMAL()
virtual ~SILK_SCREEN_NORMAL()
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.
Procedural generation of the shiny plastic normals.
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
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.
float m_absorbance
absorbance factor for the transparent material.
void SetRefractionRayCount(unsigned int aCount)
static void SetDefaultRefractionRayCount(unsigned int aCount)
float m_reflectivity
1.0 is completely transparent, 0.0 completely opaque.
virtual ~MATERIAL_GENERATOR()
Procedural generation of the solder mask.
float GetAbsorvance() const
unsigned int GetReflectionRecursionCount() const
unsigned int GetRefractionRecursionCount() const
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.
bool GetCastShadows() const