57 SFVEC3F& aOutLightColor,
float& aOutDistance )
const = 0;
85 SFVEC3F& aOutLightColor,
float& aOutDistance )
const override
89 aOutDistance = glm::length( vectorLight );
90 aOutVectorToLight = vectorLight / aOutDistance;
94 m_att_exp * aOutDistance * aOutDistance );
97 aOutLightColor =
SFVEC3F( 0.0f, 0.0f, 0.0f );
135 SFVEC3F& aOutLightColor,
float& aOutDistance )
const override
138 aOutDistance = std::numeric_limits<float>::infinity();
A light source based only on a directional vector.
SFVEC3F m_inv_direction
opposite direction of the light
SFVEC3F m_color
light color
void SetDirection(const SFVEC3F &aDir)
Set directional light orientation.
void GetLightParameters(const SFVEC3F &, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const override
Get parameters from this light.
DIRECTIONAL_LIGHT(const SFVEC3F &aDir, const SFVEC3F &aColor)
A base light class to derive to implement other light classes.
bool GetCastShadows() const
void SetCastShadows(bool aCastShadow)
virtual void GetLightParameters(const SFVEC3F &aHitPoint, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const =0
Get parameters from this light.
Point light source based on http://ogldev.atspace.co.uk/www/tutorial20/tutorial20....
void GetLightParameters(const SFVEC3F &aHitPoint, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const override
Get parameters from this light.
POINT_LIGHT(const SFVEC3F &aPos, const SFVEC3F &aColor)