Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
castor3d::SpotLight Class Reference

#include <SpotLight.hpp>

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

Classes

struct  LightData
 

Public Types

using ShadowData = SpotShadowData
 

Public Member Functions

C3D_API void update () override
 Updates the light.
 
C3D_API void updateShadow (Camera &lightCamera, int32_t index)
 Updates the shadow informations.
 
C3D_API void fillShadowBuffer (AllShadowData &data) const override
 Puts the shadow data into the given buffer.
 
Mutators.
C3D_API void setAttenuation (castor::Point3f const &value)
 
C3D_API void setRange (float value)
 
C3D_API void setExponent (float value)
 
C3D_API void setInnerCutOff (castor::Angle const &value)
 
C3D_API void setOuterCutOff (castor::Angle const &value)
 
Getters.
castor::Point3f const & getDirection () const
 
castor::Matrix4x4f const & getViewMatrix () const
 
castor::Matrix4x4f const & getProjectionMatrix () const
 
castor::Matrix4x4f const & getLightSpaceTransform () const
 
float getExponent () const
 
castor::Angle const & getInnerCutOff () const
 
castor::Angle const & getOuterCutOff () const
 
float getRange () const noexcept
 
- Public Member Functions inherited from castor3d::LightCategory
virtual C3D_API ~LightCategory () noexcept=default
 Destructor.
 
C3D_API void fillLightBuffer (castor::Point4f *data) const
 Puts the light into the given buffer.
 
C3D_API void accept (ConfigurationVisitorBase &vis)
 ConfigurationVisitorBase acceptance function.
 
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 float getVsmMinVariance () const
 
C3D_API float getVsmLightBleedingReduction () const
 
C3D_API castor::RangedValue< uint32_t > getShadowPcfFilterSize () const
 
C3D_API castor::RangedValue< uint32_t > getShadowPcfSampleCount () const
 
C3D_API ShadowConfig const & getShadowConfig () const
 
C3D_API LpvConfig const & getLpvConfig () const
 
LightType getLightType () const
 
uint32_t getLightComponentCount () const
 
uint32_t getShadowComponentCount () 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 setPcfFilterSize (uint32_t value)
 
C3D_API void setPcfSampleCount (uint32_t value)
 
C3D_API void setVsmMinVariance (float value)
 
C3D_API void setVsmLightBleedingReduction (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.
 
static C3D_API castor::Point3fArray const & generateVertices (uint32_t angle)
 

Static Public Attributes

static constexpr uint32_t ShadowDataSize = uint32_t( ashes::getAlignedSize( sizeof( ShadowData ), LightMbrAlign ) )
 
static constexpr uint32_t ShadowDataComponents = ShadowDataSize / LightMbrAlign
 
static constexpr uint32_t LightDataSize = uint32_t( ashes::getAlignedSize( sizeof( LightData ), LightMbrAlign ) )
 
static constexpr uint32_t LightDataComponents = LightDataSize / LightMbrAlign
 
- Static Public Attributes inherited from castor3d::LightCategory
static uint32_t constexpr LightMbrAlign = 4u * sizeof( float )
 

Friends

class Scene
 

Additional Inherited Members

- Protected Member Functions inherited from castor3d::LightCategory
C3D_API LightCategory (LightType lightType, Light &light, uint32_t lightComponentCount, uint32_t shadowComponentCount)
 Constructor.
 
C3D_API void doFillBaseShadowData (BaseShadowData &data) const
 Puts the shadow data into the given buffer.
 
- Protected Attributes inherited from castor3d::LightCategory
castor::BoundingBox m_cubeBox
 
float m_farPlane { 1.0f }
 

Member Typedef Documentation

◆ ShadowData

Member Function Documentation

◆ create()

static C3D_API LightCategoryUPtr castor3d::SpotLight::create ( Light & light)
static

Creation function, used by Factory.

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

◆ fillShadowBuffer()

C3D_API void castor3d::SpotLight::fillShadowBuffer ( AllShadowData & data) const
overridevirtual

Puts the shadow data into the given buffer.

Parameters
[out]dataReceives the light's shadow data.

Implements castor3d::LightCategory.

◆ generateVertices()

static C3D_API castor::Point3fArray const & castor3d::SpotLight::generateVertices ( uint32_t angle)
static
Returns
The vertices needed to draw the mesh materialising the ligh's volume of effect.

◆ getDirection()

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

◆ getExponent()

float castor3d::SpotLight::getExponent ( ) const
inline

◆ getInnerCutOff()

castor::Angle const & castor3d::SpotLight::getInnerCutOff ( ) const
inline

◆ getLightSpaceTransform()

castor::Matrix4x4f const & castor3d::SpotLight::getLightSpaceTransform ( ) const
inline

◆ getOuterCutOff()

castor::Angle const & castor3d::SpotLight::getOuterCutOff ( ) const
inline

◆ getProjectionMatrix()

castor::Matrix4x4f const & castor3d::SpotLight::getProjectionMatrix ( ) const
inline

◆ getRange()

float castor3d::SpotLight::getRange ( ) const
inlinenoexcept

◆ getViewMatrix()

castor::Matrix4x4f const & castor3d::SpotLight::getViewMatrix ( ) const
inline

◆ setAttenuation()

C3D_API void castor3d::SpotLight::setAttenuation ( castor::Point3f const & value)

◆ setExponent()

C3D_API void castor3d::SpotLight::setExponent ( float value)

◆ setInnerCutOff()

C3D_API void castor3d::SpotLight::setInnerCutOff ( castor::Angle const & value)

◆ setOuterCutOff()

C3D_API void castor3d::SpotLight::setOuterCutOff ( castor::Angle const & value)

◆ setRange()

C3D_API void castor3d::SpotLight::setRange ( float value)

◆ update()

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

Updates the light.

Implements castor3d::LightCategory.

◆ updateShadow()

C3D_API void castor3d::SpotLight::updateShadow ( Camera & lightCamera,
int32_t index )

Updates the shadow informations.

Parameters
[in,out]lightCameraThe camera that receives the light spot data.
[in]indexThe shadow map index.

Friends And Related Symbol Documentation

◆ Scene

friend class Scene
friend

Member Data Documentation

◆ LightDataComponents

constexpr uint32_t castor3d::SpotLight::LightDataComponents = LightDataSize / LightMbrAlign
staticconstexpr

◆ LightDataSize

constexpr uint32_t castor3d::SpotLight::LightDataSize = uint32_t( ashes::getAlignedSize( sizeof( LightData ), LightMbrAlign ) )
staticconstexpr

◆ ShadowDataComponents

constexpr uint32_t castor3d::SpotLight::ShadowDataComponents = ShadowDataSize / LightMbrAlign
staticconstexpr

◆ ShadowDataSize

constexpr uint32_t castor3d::SpotLight::ShadowDataSize = uint32_t( ashes::getAlignedSize( sizeof( ShadowData ), LightMbrAlign ) )
staticconstexpr

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