169 kVec3 specularColor =
kVec3(1.0f, 1.0f, 1.0f);
174 float constant = 1.0f;
176 float quadratic = 1.8f;
182 float cutOff = glm::cos(glm::radians(15.0f));
183 float outerCutOff = glm::cos(glm::radians(20.0f));
void setLinear(float newValue)
Sets the linear attenuation term.
void setQuadratic(float newValue)
Sets the quadratic attenuation term.
void setOuterCutOff(float newValue)
Sets the outer cut-off angle (spotlight only).
void setPower(float newValue)
Sets the light power (intensity multiplier).
float getQuadratic()
Returns the quadratic attenuation term.
void setConstant(float newValue)
Sets the constant attenuation term.
kLightType getLightType()
Returns the light type.
kVec3 getDiffuseColor()
Returns the diffuse colour component.
float getLinear()
Returns the linear attenuation term.
kLight(kObject *parentNode=nullptr)
Constructs a light node and optionally attaches it to a parent.
float getConstant()
Returns the constant attenuation term.
json serialize() override
Serialises this light node to JSON.
void setSpecularColor(kVec3 newColor)
Sets the specular colour component.
void setDirection(kVec3 newValue)
Sets the light direction (sun and spotlight only).
void setDiffuseColor(kVec3 newColor)
Sets the diffuse colour component.
kVec3 getSpecularColor()
Returns the specular colour component.
void setCutOff(float newValue)
Sets the inner cut-off angle (spotlight only).
float getOuterCutOff()
Returns the outer cut-off cosine (spotlight only).
float getCutOff()
Returns the inner cut-off cosine (spotlight only).
kVec3 getDirection()
Returns the light direction (sun and spotlight only).
float getPower()
Returns the light power (intensity multiplier).
void setLightType(kLightType newType)
Sets the light type.
kObject(kObject *parentNode=nullptr)
Constructs a kObject and optionally attaches it to a parent.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Base class for all scene-graph nodes in the Kemena3D engine.
nlohmann::json json
Definition kobject.h:30
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
kLightType
Light source variety.
Definition kdatatype.h:115
@ LIGHT_TYPE_POINT
Omnidirectional point light.
Definition kdatatype.h:117
glm::vec3 kVec3
3-component float vector.
Definition kdatatype.h:33