Castor3D 0.16.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. | |
C3D_API void | update (CpuUpdater &updater) |
CPU Update. | |
C3D_API void | fillLightBuffer (uint32_t index, VkDeviceSize offset, castor::Point4f *data) |
Records the light data into given buffer. | |
C3D_API void | fillShadowBuffer (AllShadowData &data) |
Records the light data into given buffer. | |
C3D_API void | accept (ConfigurationVisitorBase &vis) |
ConfigurationVisitorBase acceptance function. | |
C3D_API DirectionalLightRPtr | getDirectionalLight () const |
C3D_API PointLightRPtr | getPointLight () const |
C3D_API SpotLightRPtr | getSpotLight () const |
LightType | getLightType () const |
uint32_t | getLightComponentCount () const |
uint32_t | getShadowComponentCount () 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 |
LightCategoryRPtr | getCategory () const |
bool | isShadowProducer () const |
bool | isExpectedShadowProducer () const |
ShadowType | getShadowType () const |
ShadowMapRPtr | getShadowMap () const |
int32_t | getShadowMapIndex () const |
uint32_t | getBufferIndex () const |
VkDeviceSize | getBufferOffset () const |
bool | needsRsmShadowMaps () const |
GlobalIlluminationType | getGlobalIlluminationType () const |
GlobalIlluminationType | getExpectedGlobalIlluminationType () const |
LpvConfig const & | getLpvConfig () const |
LpvConfig & | getLpvConfig () |
uint32_t | getVolumetricSteps () const |
float | getVolumetricScatteringFactor () const |
castor::Point2f const & | getShadowRawOffsets () const |
castor::Point2f const & | getShadowPcfOffsets () const |
float | getVsmMinVariance () const |
float | getVsmLightBleedingReduction () const |
castor::RangedValue< uint32_t > | getShadowPcfFilterSize () const |
castor::RangedValue< uint32_t > | getShadowPcfSampleCount () const |
ShadowConfig const & | getShadowConfig () const |
ShadowConfig & | getShadowConfig () |
void | setColour (float const *values) |
void | setColour (float r, float g, float b) |
void | setColour (castor::Point3f const &value) |
void | setColour (castor::RgbColour const &value) |
void | setIntensity (float const *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 | setShadowConfig (ShadowConfig config) |
void | setShadowMapIndex (int32_t index) |
void | setShadowMap (ShadowMapRPtr value, int32_t index=-1) |
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 | setPcfFilterSize (uint32_t value) |
void | setPcfSampleCount (uint32_t value) |
void | setVsmMinVariance (float value) |
void | setVsmLightBleedingReduction (float value) |
Public Member Functions inherited from castor3d::MovableObject | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
Constructor. | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
Constructor. | |
virtual C3D_API | ~MovableObject () noexcept |
Destructor. | |
C3D_API void | detach () |
Detaches the movable object from it's parent. | |
virtual C3D_API void | attachTo (SceneNode &node) |
Attaches the movable object to a node. | |
C3D_API void | markDirty () |
Adds the object to dirty object list in the scene. | |
C3D_API EngineRPtr | getEngine () const noexcept |
SceneNode * | getParent () const noexcept |
MovableType | getMovableType () const noexcept |
Public Member Functions inherited from castor::OwnedBy< Scene > | |
Scene * | getOwner () const |
Public Member Functions inherited from castor::NamedBaseT< T > | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
Public Attributes | |
OnLightChanged | onGPUChanged |
Protected Attributes | |
bool | m_enabled {} |
std::atomic_bool | m_currentShadowCaster {} |
bool | m_dirty { true } |
ShadowConfig | m_shadows |
LightCategoryUPtr | m_category |
ShadowMapRPtr | m_shadowMap {} |
int32_t | m_shadowMapIndex { -1 } |
std::atomic< GlobalIlluminationType > | m_currentGlobalIllumination {} |
uint32_t | m_bufferIndex { InvalidIndex } |
VkDeviceSize | m_bufferOffset {} |
Protected Attributes inherited from castor3d::MovableObject | |
MovableType | m_type |
SceneNode * | m_sceneNode {} |
OnSceneNodeChangedConnection | m_notifyIndex |
Protected Attributes inherited from castor::NamedBaseT< T > | |
T | m_name |
Additional Inherited Members | |
Protected Member Functions inherited from castor::OwnedBy< Scene > | |
OwnedBy (Scene &owner) | |
Constructor. | |
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. |
C3D_API void castor3d::Light::accept | ( | ConfigurationVisitorBase & | vis | ) |
ConfigurationVisitorBase acceptance function.
vis | The ... visitor. |
|
inline |
|
inline |
C3D_API void castor3d::Light::fillLightBuffer | ( | uint32_t | index, |
VkDeviceSize | offset, | ||
castor::Point4f * | data ) |
Records the light data into given buffer.
[in] | index | The light index in the buffer. |
[in] | offset | The light data offset in the buffer. |
[out] | data | Receives the informations. |
C3D_API void castor3d::Light::fillShadowBuffer | ( | AllShadowData & | data | ) |
Records the light data into given buffer.
[out] | data | Receives the informations. |
|
inline |
References m_category.
|
inline |
References m_bufferIndex.
|
inline |
References m_bufferOffset.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_category.
C3D_API DirectionalLightRPtr 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 m_category.
|
inline |
References castor3d::ShadowConfig::lpvConfig, and m_shadows.
|
inline |
References castor3d::ShadowConfig::lpvConfig, and m_shadows.
C3D_API PointLightRPtr castor3d::Light::getPointLight | ( | ) | const |
|
inline |
References m_category.
|
inline |
References m_shadows.
|
inline |
References m_shadows.
|
inline |
References m_shadowMap.
|
inline |
References m_shadowMapIndex.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfFilterSize.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfSampleCount.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References castor3d::ShadowConfig::filterType, and m_shadows.
|
inline |
References m_category.
C3D_API SpotLightRPtr castor3d::Light::getSpotLight | ( | ) | const |
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricScattering.
|
inline |
References m_shadows, and castor3d::ShadowConfig::volumetricSteps.
|
inline |
References m_shadows, and castor3d::ShadowConfig::vsmLightBleedingReduction.
|
inline |
References m_shadows, and castor3d::ShadowConfig::vsmMinVariance.
|
inline |
References m_enabled.
|
inline |
References castor3d::ShadowConfig::enabled, and m_shadows.
|
inline |
References m_currentShadowCaster.
|
inline |
References castor3d::eNone, castor3d::eVoxelConeTracing, and getGlobalIlluminationType().
|
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 castor3d::MovableObject::markDirty().
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_category.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfFilterSize.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::pcfSampleCount.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References m_shadows, and castor3d::ShadowConfig::rawOffsets.
|
inline |
References m_shadows, and castor3d::MovableObject::markDirty().
|
inline |
References m_shadowMap, m_shadowMapIndex, and onGPUChanged.
|
inline |
References m_shadowMapIndex, and onGPUChanged.
|
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::vsmLightBleedingReduction.
|
inline |
References m_shadows, and castor3d::ShadowConfig::vsmMinVariance.
C3D_API void castor3d::Light::update | ( | CpuUpdater & | updater | ) |
CPU Update.
[in,out] | updater | The update data. |
|
protected |
Referenced by getBufferIndex().
|
protected |
Referenced by getBufferOffset().
|
protected |
Referenced by getBoundingBox(), getCategory(), getColour(), getDiffuseIntensity(), getFarPlane(), getIntensity(), getLightComponentCount(), getLightType(), getShadowComponentCount(), getSpecularIntensity(), setColour(), setColour(), setColour(), setColour(), setDiffuseIntensity(), setIntensity(), setIntensity(), setIntensity(), and setSpecularIntensity().
|
protected |
Referenced by getGlobalIlluminationType().
|
protected |
Referenced by isShadowProducer().
|
protected |
|
protected |
Referenced by isEnabled(), and setEnabled().
|
protected |
Referenced by getShadowMap(), and setShadowMap().
|
protected |
Referenced by getShadowMapIndex(), setShadowMap(), and setShadowMapIndex().
|
protected |
Referenced by getExpectedGlobalIlluminationType(), getLpvConfig(), getLpvConfig(), getShadowConfig(), getShadowConfig(), getShadowPcfFilterSize(), getShadowPcfOffsets(), getShadowPcfSampleCount(), getShadowRawOffsets(), getShadowType(), getVolumetricScatteringFactor(), getVolumetricSteps(), getVsmLightBleedingReduction(), getVsmMinVariance(), isExpectedShadowProducer(), setGlobalIlluminationType(), setPcfFilterSize(), setPcfMaxSlopeOffset(), setPcfMinOffset(), setPcfSampleCount(), setRawMaxSlopeOffset(), setRawMinOffset(), setShadowConfig(), setShadowType(), setVolumetricScatteringFactor(), setVolumetricSteps(), setVsmLightBleedingReduction(), and setVsmMinVariance().
OnLightChanged castor3d::Light::onGPUChanged |
Referenced by setShadowMap(), and setShadowMapIndex().