![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Light.hpp>
Public Member Functions | |
C3D_API | Light (castor::String const &name, LightCreateInfo const &createInfo) |
Constructor. | |
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 void | cloneInto (Light &output) const |
Clones this object into the given one. | |
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 |
float | getFarPlane () 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 |
RsmConfig const & | getRsmConfig () 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 | 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) |
![]() | |
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 |
![]() | |
Scene * | getOwner () const noexcept |
void | setOwner (Scene &owner) noexcept |
![]() | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
Static Public Member Functions | |
static C3D_API void | addParsers (castor::AttributeParsers &result) |
Public Attributes | |
OnLightChanged | onGPUChanged |
Friends | |
class | LightCategory |
Additional Inherited Members | |
![]() | |
OwnedBy (Scene &owner) noexcept | |
Constructor. | |
![]() | |
MovableType | m_type |
SceneNode * | m_sceneNode {} |
OnSceneNodeChangedConnection | m_notifyIndex |
bool | m_dirty { true } |
![]() | |
T | m_name |
C3D_API castor3d::Light::Light | ( | castor::String const & | name, |
LightCreateInfo const & | createInfo ) |
Constructor.
[in] | name | The light name. |
[in] | createInfo | The creation informations. |
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. |
|
static |
Clones this object into the given one.
[in,out] | output | Receives this object's data. |
|
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 |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API DirectionalLightRPtr castor3d::Light::getDirectionalLight | ( | ) | const |
name Getters.
|
inline |
References castor3d::ShadowConfig::globalIllumination.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References castor3d::ShadowConfig::lpvConfig.
|
inline |
References castor3d::ShadowConfig::lpvConfig.
C3D_API PointLightRPtr castor3d::Light::getPointLight | ( | ) | const |
|
inline |
References castor3d::ShadowConfig::rsmConfig.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References castor3d::ShadowConfig::pcfFilterSize.
|
inline |
References castor3d::ShadowConfig::pcfOffsets.
|
inline |
References castor3d::ShadowConfig::pcfSampleCount.
|
inline |
References castor3d::ShadowConfig::rawOffsets.
|
inline |
References castor3d::ShadowConfig::filterType.
C3D_API SpotLightRPtr castor3d::Light::getSpotLight | ( | ) | const |
|
inline |
References castor3d::ShadowConfig::volumetricScattering.
|
inline |
References castor3d::ShadowConfig::volumetricSteps.
|
inline |
|
inline |
References castor3d::ShadowConfig::vsmMinVariance.
|
inline |
|
inline |
References castor3d::ShadowConfig::enabled.
|
inline |
|
inline |
References castor3d::eNone, and getGlobalIlluminationType().
|
inline |
|
inline |
|
inline |
name Mutators.
|
inline |
|
inline |
References castor3d::MovableObject::markDirty().
Referenced by disable(), and enable().
|
inline |
References castor3d::ShadowConfig::globalIllumination, and castor3d::MovableObject::markDirty().
|
inline |
References castor3d::ShadowConfig::pcfFilterSize.
|
inline |
References castor3d::ShadowConfig::pcfOffsets.
|
inline |
References castor3d::ShadowConfig::pcfOffsets.
|
inline |
References castor3d::ShadowConfig::pcfSampleCount.
|
inline |
References castor3d::ShadowConfig::rawOffsets.
|
inline |
References castor3d::ShadowConfig::rawOffsets.
|
inline |
|
inline |
References onGPUChanged.
|
inline |
References onGPUChanged.
|
inline |
References castor3d::ShadowConfig::filterType.
|
inline |
References castor3d::ShadowConfig::volumetricScattering.
|
inline |
References castor3d::ShadowConfig::volumetricSteps.
|
inline |
|
inline |
References castor3d::ShadowConfig::vsmMinVariance.
C3D_API void castor3d::Light::update | ( | CpuUpdater & | updater | ) |
CPU Update.
[in,out] | updater | The update data. |
|
friend |
OnLightChanged castor3d::Light::onGPUChanged |
Referenced by setShadowMap(), and setShadowMapIndex().