Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Graphics class that represents a light. More...
Public Member Functions | |
Light (LightType type=LightType_Point) | |
Constructs a Light object with a type. More... | |
Light (const Light &light) | |
Constructs a Light object by default. | |
Light (Light &&light)=default | |
void | AddToRenderQueue (AbstractRenderQueue *renderQueue, const Matrix4f &transformMatrix) const override |
Adds this light to the render queue. More... | |
Light * | Clone () const |
Clones this light. More... | |
Light * | Create () const |
Creates a default light. More... | |
bool | Cull (const Frustumf &frustum, const Matrix4f &transformMatrix) const override |
Culls the light if not in the frustum. More... | |
void | EnableShadowCasting (bool castShadows) |
Enables shadow casting. More... | |
void | EnsureShadowMapUpdate () const |
Ensures that the shadow map is up to date. | |
float | GetAmbientFactor () const |
Gets the ambient factor. More... | |
float | GetAttenuation () const |
Gets the light attenuation (in 1 / R^2) More... | |
Color | GetColor () const |
Gets the color of the light. More... | |
float | GetDiffuseFactor () const |
Gets the diffuse factor. More... | |
float | GetInnerAngle () const |
Gets the inner angle in spot light. More... | |
float | GetInnerAngleCosine () const |
Gets the cosine inner angle in spot light. More... | |
float | GetInvRadius () const |
Gets the inverse of the radius. More... | |
LightType | GetLightType () const |
Gets the type of the light. More... | |
float | GetOuterAngle () const |
Gets the outer angle in spot light. More... | |
float | GetOuterAngleCosine () const |
Gets the cosine outer angle in spot light. More... | |
float | GetOuterAngleTangent () const |
Gets the tangent outer angle in spot light. More... | |
float | GetRadius () const |
Gets the radius of the light. More... | |
TextureRef | GetShadowMap () const |
Gets the shadow map. More... | |
PixelFormatType | GetShadowMapFormat () const |
Gets the format of the shadow map. More... | |
const Vector2ui & | GetShadowMapSize () const |
Gets the size of the shadow map. More... | |
bool | IsShadowCastingEnabled () const |
Checks whether the shadow casting is enabled. More... | |
void | SetAmbientFactor (float factor) |
Sets the ambient factor. More... | |
void | SetAttenuation (float attenuation) |
Sets the light attenuation (in 1 / R^2) More... | |
void | SetColor (const Color &color) |
Sets the color of the light. More... | |
void | SetDiffuseFactor (float factor) |
Sets the diffuse factor. More... | |
void | SetInnerAngle (float innerAngle) |
Sets the inner angle in spot light. More... | |
void | SetLightType (LightType type) |
Sets the type of light. More... | |
void | SetOuterAngle (float outerAngle) |
Sets the outer angle in spot light. More... | |
void | SetRadius (float radius) |
Sets the radius of the light. More... | |
void | SetShadowMapFormat (PixelFormatType shadowFormat) |
Sets the shadow map format. More... | |
void | SetShadowMapSize (const Vector2ui &size) |
Sets the size of the shadow map. More... | |
void | UpdateBoundingVolume (const Matrix4f &transformMatrix) override |
Updates the bounding volume by a matrix. More... | |
Light & | operator= (const Light &light) |
Sets the current light with the content of the other one. More... | |
Light & | operator= (Light &&light)=default |
Public Member Functions inherited from Nz::Renderable | |
Renderable (const Renderable &renderable)=default | |
Renderable (Renderable &&)=default | |
void | EnsureBoundingVolumeUpdated () const |
Ensures that the bounding volume is up to date. | |
virtual const BoundingVolumef & | GetBoundingVolume () const |
Gets the bounding volume. More... | |
Renderable & | operator= (const Renderable &renderable)=default |
Renderable & | operator= (Renderable &&renderable)=default |
Additional Inherited Members | |
Protected Member Functions inherited from Nz::Renderable | |
void | InvalidateBoundingVolume () |
Invalidates the bounding volume. | |
Protected Attributes inherited from Nz::Renderable | |
BoundingVolumef | m_boundingVolume |
Graphics class that represents a light.
Nz::Light::Light | ( | LightType | type = LightType_Point | ) |
Constructs a Light object with a type.
type | Type of the light |
|
overridevirtual |
Adds this light to the render queue.
renderQueue | Queue to be added |
transformMatrix | Matrix transformation for this light |
Implements Nz::Renderable.
Light * Nz::Light::Create | ( | ) | const |
Creates a default light.
|
overridevirtual |
Culls the light if not in the frustum.
frustum | Symbolizing the field of view |
transformMatrix | Matrix transformation for our object |
Reimplemented from Nz::Renderable.
|
inline |
Enables shadow casting.
castShadows | Should shadows be cast |
|
inline |
Gets the ambient factor.
|
inline |
Gets the light attenuation (in 1 / R^2)
|
inline |
Gets the diffuse factor.
|
inline |
Gets the inner angle in spot light.
|
inline |
Gets the cosine inner angle in spot light.
|
inline |
Gets the inverse of the radius.
|
inline |
Gets the type of the light.
|
inline |
Gets the outer angle in spot light.
|
inline |
Gets the cosine outer angle in spot light.
|
inline |
Gets the tangent outer angle in spot light.
|
inline |
Gets the radius of the light.
|
inline |
Gets the shadow map.
|
inline |
Gets the format of the shadow map.
|
inline |
Gets the size of the shadow map.
|
inline |
Checks whether the shadow casting is enabled.
Sets the current light with the content of the other one.
light | The other Light |
|
inline |
Sets the ambient factor.
factor | Ambient factor |
|
inline |
Sets the light attenuation (in 1 / R^2)
attenuation | Light attenuation |
|
inline |
Sets the color of the light.
color | Light color |
|
inline |
Sets the diffuse factor.
factor | Diffuse factor |
|
inline |
Sets the inner angle in spot light.
|
inline |
Sets the type of light.
type | Light type |
|
inline |
Sets the outer angle in spot light.
|
inline |
|
inline |
Sets the shadow map format.
shadowFormat | Shadow map format |
|
inline |
Sets the size of the shadow map.
size | Shadow map size |
|
overridevirtual |
Updates the bounding volume by a matrix.
transformMatrix | Matrix transformation for our bounding volume |
Reimplemented from Nz::Renderable.