Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
castor3d::DirectionalLight Class Reference

#include <DirectionalLight.hpp>

Inheritance diagram for castor3d::DirectionalLight:
Inheritance graph
[legend]
Collaboration diagram for castor3d::DirectionalLight:
Collaboration graph
[legend]

Public Types

using Cascade = DirectionalLightCascade
 

Public Member Functions

C3D_API void update () override
 Updates the light. More...
 
C3D_API bool updateShadow (Camera const &sceneCamera)
 Updates the shadow cascades informations. More...
 
castor::Point3f const & getDirection () const
 
float getSplitDepth (uint32_t cascadeIndex) const
 
float getSplitScale (uint32_t cascadeIndex) const
 
castor::Matrix4x4f const & getProjMatrix (uint32_t cascadeIndex) const
 
castor::Matrix4x4f const & getViewMatrix (uint32_t cascadeIndex) const
 
castor::Matrix4x4f const & getLightSpaceTransform (uint32_t cascadeIndex) const
 
- Public Member Functions inherited from castor3d::LightCategory
virtual C3D_API ~LightCategory ()=default
 Destructor. More...
 
virtual C3D_API void update ()=0
 Updates the light. More...
 
C3D_API void fillBuffer (LightBuffer::LightData &data) const
 Puts the light into the given texture. More...
 
C3D_API uint32_t getVolumetricSteps () const
 
C3D_API float getVolumetricScatteringFactor () const
 
C3D_API castor::Point2f const & getShadowRawOffsets () const
 
C3D_API castor::Point2f const & getShadowPcfOffsets () const
 
C3D_API castor::Point2f const & getShadowVariance () const
 
C3D_API ShadowConfig const & getShadowConfig () const
 
C3D_API RsmConfig const & getRsmConfig () const
 
C3D_API LpvConfig const & getLpvConfig () const
 
LightType getLightType () const
 
float getDiffuseIntensity () const
 
float getSpecularIntensity () const
 
castor::Point2f const & getIntensity () const
 
float getFarPlane () const
 
castor::Point3f const & getColour () const
 
Light const & getLight () const
 
castor::BoundingBox const & getBoundingBox () const
 
C3D_API void setVolumetricSteps (uint32_t value)
 
C3D_API void setVolumetricScatteringFactor (float value)
 
C3D_API void setRawMinOffset (float value)
 
C3D_API void setRawMaxSlopeOffset (float value)
 
C3D_API void setPcfMinOffset (float value)
 
C3D_API void setPcfMaxSlopeOffset (float value)
 
C3D_API void setVsmMaxVariance (float value)
 
C3D_API void setVsmVarianceBias (float value)
 
C3D_API void setColour (castor::Point3f const &value)
 
C3D_API void setIntensity (castor::Point2f const &value)
 
C3D_API void setDiffuseIntensity (float value)
 
C3D_API void setSpecularIntensity (float value)
 
LightgetLight ()
 
castor::Point3f & getColour ()
 
castor::Point2f & getIntensity ()
 

Static Public Member Functions

static C3D_API LightCategoryUPtr create (Light &light)
 Creation function, used by Factory. More...
 

Friends

class Scene
 

Additional Inherited Members

- Protected Member Functions inherited from castor3d::LightCategory
C3D_API LightCategory (LightType lightType, Light &light)
 Constructor. More...
 
virtual C3D_API void updateNode (SceneNode const &node)=0
 Updates the light source's informations related to the scene node. More...
 
- Protected Attributes inherited from castor3d::LightCategory
castor::BoundingBox m_cubeBox
 
float m_farPlane { 1.0f }
 
int32_t m_shadowMapIndex { -1 }
 

Member Typedef Documentation

◆ Cascade

Member Function Documentation

◆ create()

static C3D_API LightCategoryUPtr castor3d::DirectionalLight::create ( Light light)
static

Creation function, used by Factory.

Parameters
[in]lightThe parent Light.
Returns
A light source.

◆ getDirection()

castor::Point3f const & castor3d::DirectionalLight::getDirection ( ) const
inline

name Getters.

◆ getLightSpaceTransform()

castor::Matrix4x4f const & castor3d::DirectionalLight::getLightSpaceTransform ( uint32_t  cascadeIndex) const
inline

◆ getProjMatrix()

castor::Matrix4x4f const & castor3d::DirectionalLight::getProjMatrix ( uint32_t  cascadeIndex) const
inline

◆ getSplitDepth()

float castor3d::DirectionalLight::getSplitDepth ( uint32_t  cascadeIndex) const
inline

◆ getSplitScale()

float castor3d::DirectionalLight::getSplitScale ( uint32_t  cascadeIndex) const
inline

◆ getViewMatrix()

castor::Matrix4x4f const & castor3d::DirectionalLight::getViewMatrix ( uint32_t  cascadeIndex) const
inline

◆ update()

C3D_API void castor3d::DirectionalLight::update ( )
overridevirtual

Updates the light.

Implements castor3d::LightCategory.

◆ updateShadow()

C3D_API bool castor3d::DirectionalLight::updateShadow ( Camera const &  sceneCamera)

Updates the shadow cascades informations.

Parameters
[in]sceneCameraThe viewer camera.
Returns
false if nothing changed.

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

The documentation for this class was generated from the following file: