![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Light.hpp>
Public Member Functions | |
C3D_API | Light (castor::String const &name, Scene &scene, SceneNode &node, LightFactory &factory, LightType lightType) |
Constructor. More... | |
C3D_API void | update (CpuUpdater &updater) |
CPU Update. More... | |
C3D_API void | fillBuffer (uint32_t index, LightBuffer::LightData &data) |
Records the light data into given buffer. More... | |
C3D_API void | attachTo (SceneNode &node) override |
Attaches this light to a SceneNode. More... | |
C3D_API DirectionalLightSPtr | getDirectionalLight () const |
C3D_API PointLightSPtr | getPointLight () const |
C3D_API SpotLightSPtr | getSpotLight () const |
bool | hasChanged () const |
LightType | getLightType () const |
bool | isEnabled () const |
castor::Point3f const & | getColour () const |
castor::Point2f const & | getIntensity () const |
float | getFarPlane () const |
float | getDiffuseIntensity () const |
float | getSpecularIntensity () const |
castor::BoundingBox const & | getBoundingBox () const |
LightCategorySPtr | getCategory () const |
bool | isShadowProducer () const |
bool | isExpectedShadowProducer () const |
ShadowType | getShadowType () const |
ShadowMapRPtr | getShadowMap () const |
uint32_t | getShadowMapIndex () const |
uint32_t | getBufferIndex () const |
bool | needsRsmShadowMaps () const |
GlobalIlluminationType | getGlobalIlluminationType () const |
GlobalIlluminationType | getExpectedGlobalIlluminationType () const |
RsmConfig const & | getRsmConfig () const |
RsmConfig & | getRsmConfig () |
LpvConfig const & | getLpvConfig () const |
LpvConfig & | getLpvConfig () |
uint32_t | getVolumetricSteps () const |
float | getVolumetricScatteringFactor () const |
castor::Point2f const & | getShadowRawOffsets () const |
castor::Point2f const & | getShadowPcfOffsets () const |
castor::Point2f const & | getShadowVariance () const |
ShadowConfig const & | getShadowConfig () const |
void | setColour (float *values) |
void | setColour (float r, float g, float b) |
void | setColour (castor::Point3f const &value) |
void | setColour (castor::RgbColour const &value) |
void | setIntensity (float *values) |
void | setIntensity (float d, float s) |
void | setIntensity (castor::Point2f const &value) |
void | setDiffuseIntensity (float value) |
void | setSpecularIntensity (float value) |
void | setEnabled (bool value) |
void | enable () |
void | disable () |
void | setShadowProducer (bool value) |
void | setShadowMap (ShadowMapRPtr value, uint32_t index=0u) |
void | setGlobalIlluminationType (GlobalIlluminationType value) |
void | setShadowType (ShadowType value) |
void | setVolumetricSteps (uint32_t value) |
void | setVolumetricScatteringFactor (float value) |
void | setRawMinOffset (float value) |
void | setRawMaxSlopeOffset (float value) |
void | setPcfMinOffset (float value) |
void | setPcfMaxSlopeOffset (float value) |
void | setVsmMaxVariance (float value) |
void | setVsmVarianceBias (float value) |
void | setBufferIndex (uint32_t value) |
![]() | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
Constructor. More... | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
Constructor. More... | |
virtual C3D_API | ~MovableObject () |
Destructor. More... | |
C3D_API void | detach () |
Detaches the movable object from it's parent. More... | |
virtual C3D_API void | attachTo (SceneNode &node) |
Attaches the movable object to a node. More... | |
C3D_API EngineRPtr | getEngine () const |
SceneNode * | getParent () const |
MovableType | getType () const |
Public Attributes | |
OnLightChanged | onChanged |
OnLightChanged | onGPUChanged |
Protected Member Functions | |
void | onNodeChanged (SceneNode const &node) |
Protected Attributes | |
bool | m_enabled { false } |
bool | m_shadowCaster { false } |
std::atomic_bool | m_currentShadowCaster { false } |
bool | m_dirty { true } |
ShadowConfig | m_shadows |
LightCategorySPtr | m_category |
ShadowMapRPtr | m_shadowMap { nullptr } |
uint32_t | m_shadowMapIndex { 0u } |
std::atomic< GlobalIlluminationType > | m_currentGlobalIllumination { GlobalIlluminationType::eNone } |
uint32_t | m_bufferIndex { 0u } |
![]() | |
MovableType | m_type |
castor::String | m_strNodeName |
SceneNode * | m_sceneNode |
OnSceneNodeChangedConnection | m_notifyIndex |
C3D_API castor3d::Light::Light | ( | castor::String const & | name, |
Scene & | scene, | ||
SceneNode & | node, | ||
LightFactory & | factory, | ||
LightType | lightType | ||
) |
Constructor.
[in] | name | The light name. |
[in] | scene | Parent scene. |
[in] | node | The parent scene node. |
[in] | factory | Factory used to create the LightCategory. |
[in] | lightType | The light type. |
Attaches this light to a SceneNode.
[in] | node | The new light's parent node. |
Reimplemented from castor3d::MovableObject.
|
inline |
|
inline |
C3D_API void castor3d::Light::fillBuffer | ( | uint32_t | index, |
LightBuffer::LightData & | data | ||
) |
Records the light data into given buffer.
[in] | index | The light index in the buffer. |
[out] | data | Receives the informations. |
|
inline |
References m_category.
|
inline |
References m_bufferIndex.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_category.
C3D_API DirectionalLightSPtr castor3d::Light::getDirectionalLight | ( | ) | const |
name Getters.
|
inline |
References castor3d::ShadowConfig::globalIllumination, and m_shadows.
|
inline |
References m_category.
|
inline |
References m_currentGlobalIllumination.
Referenced by needsRsmShadowMaps().
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References castor3d::ShadowConfig::lpvConfig, and m_shadows.
|
inline |
References castor3d::ShadowConfig::lpvConfig, and m_shadows.
C3D_API PointLightSPtr castor3d::Light::getPointLight | ( | ) | const |
|
inline |
References m_shadows, and castor3d::ShadowConfig::rsmConfig.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rsmConfig.
|
inline |
References m_shadows.
|
inline |
References m_shadowMap.
|
inline |
References m_shadowMapIndex.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References castor3d::ShadowConfig::filterType, and m_shadows.
|
inline |
References m_shadows, and castor3d::ShadowConfig::variance.
|
inline |
References m_category.
C3D_API SpotLightSPtr castor3d::Light::getSpotLight | ( | ) | const |
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricScattering.
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricSteps.
|
inline |
References m_dirty.
|
inline |
References m_enabled.
|
inline |
References m_shadowCaster.
|
inline |
References m_currentShadowCaster.
|
inline |
References castor3d::eNone, and getGlobalIlluminationType().
|
protected |
|
inline |
References m_bufferIndex.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
name Mutators.
References m_category.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
|
inline |
References castor3d::ShadowConfig::globalIllumination, m_shadows, and onChanged.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References m_shadowMap, m_shadowMapIndex, and onGPUChanged.
|
inline |
References m_shadowCaster, and onChanged.
|
inline |
References castor3d::ShadowConfig::filterType, and m_shadows.
|
inline |
References m_category.
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricScattering.
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricSteps.
|
inline |
References m_shadows, and castor3d::ShadowConfig::variance.
|
inline |
References m_shadows, and castor3d::ShadowConfig::variance.
C3D_API void castor3d::Light::update | ( | CpuUpdater & | updater | ) |
CPU Update.
[in,out] | updater | The update data. |
|
protected |
Referenced by getBufferIndex(), and setBufferIndex().
|
protected |
|
protected |
Referenced by getGlobalIlluminationType().
|
protected |
Referenced by isShadowProducer().
|
protected |
Referenced by hasChanged().
|
protected |
Referenced by isEnabled(), and setEnabled().
|
protected |
Referenced by isExpectedShadowProducer(), and setShadowProducer().
|
protected |
Referenced by getShadowMap(), and setShadowMap().
|
protected |
Referenced by getShadowMapIndex(), and setShadowMap().
|
protected |
Referenced by getExpectedGlobalIlluminationType(), getLpvConfig(), getRsmConfig(), getShadowConfig(), getShadowPcfOffsets(), getShadowRawOffsets(), getShadowType(), getShadowVariance(), getVolumetricScatteringFactor(), getVolumetricSteps(), setGlobalIlluminationType(), setPcfMaxSlopeOffset(), setPcfMinOffset(), setRawMaxSlopeOffset(), setRawMinOffset(), setShadowType(), setVolumetricScatteringFactor(), setVolumetricSteps(), setVsmMaxVariance(), and setVsmVarianceBias().
OnLightChanged castor3d::Light::onChanged |
Referenced by setGlobalIlluminationType(), and setShadowProducer().
OnLightChanged castor3d::Light::onGPUChanged |
Referenced by setShadowMap().