Castor3D
..
|
Light source implementation. More...
Public Member Functions | |
C3D_API | Light (Castor::String const &p_name, Scene &p_scene, SceneNodeSPtr p_node, LightFactory &p_factory, eLIGHT_TYPE p_lightType) |
Constructor. More... | |
C3D_API | ~Light () |
Destructor. More... | |
C3D_API void | Bind (Castor::PxBufferBase &p_texture, uint32_t p_index) |
Puts the light into the given texture. More... | |
virtual C3D_API void | AttachTo (SceneNodeSPtr p_node) |
Attaches this light to a Material. More... | |
C3D_API DirectionalLightSPtr | GetDirectionalLight () const |
Retrieves the DirectionalLight category. More... | |
C3D_API PointLightSPtr | GetPointLight () const |
Retrieves the PointLight category. More... | |
C3D_API SpotLightSPtr | GetSpotLight () const |
Retrieves the SpotLight category. More... | |
eLIGHT_TYPE | GetLightType () const |
Retrieves the light type. More... | |
bool | IsEnabled () const |
Retrieves the light enabled status. More... | |
Castor::Point3f const & | GetColour () const |
Castor::Point3f const & | GetIntensity () const |
float | GetAmbientIntensity () const |
float | GetDiffuseIntensity () const |
float | GetSpecularIntensity () const |
Castor::Point4f const & | GetPositionType () const |
Retrieves the light position and type. More... | |
int | GetIndex () const |
Retrieves the light index. More... | |
void | SetIndex (int p_value) |
Sets the light index. More... | |
void | SetColour (float *p_values) |
Sets the colour. More... | |
void | SetColour (float r, float g, float b) |
Sets the colour. More... | |
void | SetColour (Castor::Point3f const &p_colour) |
Sets the colour. More... | |
void | SetColour (Castor::Colour const &p_colour) |
Sets the colour. More... | |
void | SetIntensity (float *p_values) |
Sets the light's intensity values. More... | |
void | SetIntensity (float a, float d, float s) |
Sets the light's intensity values. More... | |
void | SetIntensity (Castor::Point3f const &p_intensity) |
Sets the light's intensity values. More... | |
void | SetAmbientIntensity (float p_intensity) |
Sets the ambient intensity. More... | |
void | SetDiffuseIntensity (float p_intensity) |
Sets the diffuse intensity. More... | |
void | SetSpecularIntensity (float p_intensity) |
Sets the specular intensity. More... | |
void | SetEnabled (bool p_enabled) |
Sets the light enabled status. More... | |
void | Enable () |
Enables the light. More... | |
void | Disable () |
Disables the light. More... | |
Public Member Functions inherited from Castor3D::MovableObject | |
C3D_API | MovableObject (Castor::String const &p_name, Scene &p_scene, eMOVABLE_TYPE p_type, SceneNodeSPtr p_sn) |
Constructor. More... | |
virtual C3D_API | ~MovableObject () |
Destructor. More... | |
C3D_API void | Detach () |
Detaches the movable object from it's parent. More... | |
Castor::String const & | GetName () const |
Retrieves the object name. More... | |
SceneNodeSPtr | GetParent () const |
Retrieves the parent node. More... | |
eMOVABLE_TYPE | GetType () const |
Retrieves the object type. More... | |
void | SetName (Castor::String const &p_name) |
Sets the object name. More... | |
Public Member Functions inherited from Castor3D::Animable | |
C3D_API AnimationSPtr | CreateAnimation (Castor::String const &p_name) |
Creates an animation. More... | |
C3D_API void | CleanupAnimations () |
Empties the animations map. More... | |
C3D_API AnimationSPtr | GetAnimation (Castor::String const &p_name) |
Retrieves an animation. More... | |
AnimationPtrStrMap const & | GetAnimations () const |
Protected Member Functions | |
void | OnNodeChanged () |
Protected Member Functions inherited from Castor3D::Animable | |
Animable () | |
Constructor. More... | |
~Animable () | |
Destructor. More... | |
Protected Attributes | |
bool | m_enabled |
Tells the light is enabled. More... | |
LightCategorySPtr | m_pCategory |
The Light category that effectively holds light data. More... | |
int | m_iIndex |
The light index. More... | |
Protected Attributes inherited from Castor3D::MovableObject | |
eMOVABLE_TYPE | m_type |
Movable object type. More... | |
Castor::String | m_name |
The object name. More... | |
Castor::String | m_strNodeName |
The parent node name. More... | |
SceneNodeWPtr | m_pSceneNode |
The parent scene node. More... | |
uint32_t | m_notifyIndex = 0 |
The node change notification index. More... | |
Protected Attributes inherited from Castor3D::Animable | |
AnimationPtrStrMap | m_animations |
All animations. More... | |
C3D_API Castor3D::Light::Light | ( | Castor::String const & | p_name, |
Scene & | p_scene, | ||
SceneNodeSPtr | p_node, | ||
LightFactory & | p_factory, | ||
eLIGHT_TYPE | p_lightType | ||
) |
Constructor.
[in] | p_name | The light name |
[in] | p_scene | Parent scene |
[in] | p_factory | Factory used to create the LightCategory |
[in] | p_lightType | The light type |
[in] | p_node | The parent scene node |
C3D_API Castor3D::Light::~Light | ( | ) |
Destructor.
|
virtual |
Attaches this light to a Material.
[in] | p_node | The new light's parent node |
Reimplemented from Castor3D::MovableObject.
C3D_API void Castor3D::Light::Bind | ( | Castor::PxBufferBase & | p_texture, |
uint32_t | p_index | ||
) |
Puts the light into the given texture.
[out] | p_texture | The texture that receives the light's data. |
[in] | p_index | The light index. |
|
inline |
|
inline |
|
inline |
References m_pCategory.
|
inline |
References m_pCategory.
|
inline |
References m_pCategory.
C3D_API DirectionalLightSPtr Castor3D::Light::GetDirectionalLight | ( | ) | const |
Retrieves the DirectionalLight category.
|
inline |
|
inline |
References m_pCategory.
|
inline |
C3D_API PointLightSPtr Castor3D::Light::GetPointLight | ( | ) | const |
Retrieves the PointLight category.
|
inline |
|
inline |
References m_pCategory.
C3D_API SpotLightSPtr Castor3D::Light::GetSpotLight | ( | ) | const |
Retrieves the SpotLight category.
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the light's intensity values.
[in] | p_intensity | The new values. |
References m_pCategory.
|
inline |
|
protected |
Tells the light is enabled.
Referenced by IsEnabled(), and SetEnabled().
|
protected |
The light index.
Referenced by GetIndex(), and SetIndex().
|
protected |
The Light category that effectively holds light data.
Referenced by GetAmbientIntensity(), GetColour(), GetDiffuseIntensity(), GetIntensity(), GetLightType(), GetPositionType(), GetSpecularIntensity(), SetAmbientIntensity(), SetColour(), SetDiffuseIntensity(), SetIntensity(), and SetSpecularIntensity().