Castor3D  ..
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
Castor3D::SpotLight Class Reference

Class which represents a SpotLight. More...

+ Inheritance diagram for Castor3D::SpotLight:
+ Collaboration diagram for Castor3D::SpotLight:

Classes

class  BinaryParser
 SpotLight loader. More...
 
class  TextLoader
 SpotLight loader. More...
 

Public Member Functions

C3D_API SpotLight ()
 Constructor. More...
 
C3D_API ~SpotLight ()
 Destructor. More...
 
virtual C3D_API void Bind (Castor::PxBufferBase &p_texture, uint32_t p_index) const
 Puts the light into the given texture. More...
 
virtual C3D_API void SetPosition (Castor::Point3r const &p_position)
 Sets the light source position. More...
 
virtual C3D_API Castor::Point3f GetPosition () const
 Retrieves the light source position. More...
 
C3D_API void SetAttenuation (Castor::Point3f const &p_ptAttenuation)
 Sets attenuation components. More...
 
C3D_API void SetExponent (float p_exponent)
 Sets the light exponent. More...
 
C3D_API void SetCutOff (float p_cutOff)
 Sets the light cutoff. More...
 
Castor::Point3f const & GetAttenuation () const
 Retrieves the attenuation components. More...
 
Castor::Point3f & GetAttenuation ()
 Retrieves the attenuation components. More...
 
float GetExponent () const
 Retrieves the exponent value. More...
 
float GetCutOff () const
 Retrieves the cone angle. More...
 
- Public Member Functions inherited from Castor3D::LightCategory
C3D_API LightCategory (eLIGHT_TYPE p_lightType)
 The constructor, used by clone function. More...
 
virtual C3D_API ~LightCategory ()
 Destructor. More...
 
void SetColour (Castor::Point3f const &p_colour)
 Sets the light's colour. More...
 
void SetIntensity (Castor::Point3f const &p_intensity)
 Sets the light's intensity values. More...
 
void SetAmbientIntensity (float p_intensity)
 Sets the light's diffuse intensity. More...
 
void SetDiffuseIntensity (float p_intensity)
 Sets the light's diffuse intensity. More...
 
void SetSpecularIntensity (float p_intensity)
 Sets the light's specular intensity. More...
 
eLIGHT_TYPE GetLightType () const
 Retrieves the light type. More...
 
float GetAmbientIntensity () const
 Retrieves the ambient colour. More...
 
float GetDiffuseIntensity () const
 Retrieves the diffuse colour. More...
 
float GetSpecularIntensity () const
 Retrieves the specular colour. More...
 
Castor::Point3f const & GetIntensity () const
 
Castor::Point3f & GetIntensity ()
 
Castor::Point3f const & GetColour () const
 
Castor::Point3f & GetColour ()
 
LightGetLight () const
 Retrieves the parent light. More...
 
void SetLight (Light *val)
 Sets the parent light. More...
 

Static Public Member Functions

static C3D_API LightCategorySPtr Create ()
 Creation function, used by Factory. More...
 

Friends

class Scene
 

Additional Inherited Members

- Protected Member Functions inherited from Castor3D::LightCategory
Castor::Point4f const & GetPositionType () const
 Retrieves the light position and type. More...
 
virtual void SetPositionType (Castor::Point4f const &p_position)
 Sets the light's type and position. More...
 
virtual void SetPositionType (Castor::Point4d const &p_position)
 Sets the light's type and position. More...
 
void DoBindComponent (Castor::Point3f const &p_component, int p_index, int &p_offset, Castor::PxBufferBase &p_data) const
 
void DoBindComponent (Castor::Point4f const &p_component, int p_index, int &p_offset, Castor::PxBufferBase &p_data) const
 
void DoBindComponent (Castor::Coords4f const &p_component, int p_index, int &p_offset, Castor::PxBufferBase &p_data) const
 

Detailed Description

Class which represents a SpotLight.

Author
Sylvain DOREMUS
Version
0.1
Date
09/02/2010
Remarks
A spot light is a light which enlights from a point in a given direction with a conic shape

Constructor & Destructor Documentation

◆ SpotLight()

C3D_API Castor3D::SpotLight::SpotLight ( )

Constructor.

Remarks
Not to be used by the user, use Scene::CreateLight function instead

◆ ~SpotLight()

C3D_API Castor3D::SpotLight::~SpotLight ( )

Destructor.

Member Function Documentation

◆ Bind()

virtual C3D_API void Castor3D::SpotLight::Bind ( Castor::PxBufferBase &  p_texture,
uint32_t  p_index 
) const
virtual

Puts the light into the given texture.

Implements Castor3D::LightCategory.

◆ Create()

static C3D_API LightCategorySPtr Castor3D::SpotLight::Create ( )
static

Creation function, used by Factory.

Returns
A light source

◆ GetAttenuation() [1/2]

Castor::Point3f const& Castor3D::SpotLight::GetAttenuation ( ) const
inline

Retrieves the attenuation components.

Returns
The attenuation components

◆ GetAttenuation() [2/2]

Castor::Point3f& Castor3D::SpotLight::GetAttenuation ( )
inline

Retrieves the attenuation components.

Returns
The attenuation components

◆ GetCutOff()

float Castor3D::SpotLight::GetCutOff ( ) const
inline

Retrieves the cone angle.

Returns
The cone angle

◆ GetExponent()

float Castor3D::SpotLight::GetExponent ( ) const
inline

Retrieves the exponent value.

Returns
The exponent value

◆ GetPosition()

virtual C3D_API Castor::Point3f Castor3D::SpotLight::GetPosition ( ) const
virtual

Retrieves the light source position.

Returns
The value

◆ SetAttenuation()

C3D_API void Castor3D::SpotLight::SetAttenuation ( Castor::Point3f const &  p_ptAttenuation)

Sets attenuation components.

Parameters
[in]p_ptAttenuationThe attenuation components

◆ SetCutOff()

C3D_API void Castor3D::SpotLight::SetCutOff ( float  p_cutOff)

Sets the light cutoff.

Parameters
[in]p_cutOffThe new cutoff value

◆ SetExponent()

C3D_API void Castor3D::SpotLight::SetExponent ( float  p_exponent)

Sets the light exponent.

Parameters
[in]p_exponentThe new exponent value

◆ SetPosition()

virtual C3D_API void Castor3D::SpotLight::SetPosition ( Castor::Point3r const &  p_position)
virtual

Sets the light source position.

Parameters
[in]p_positionThe new value

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

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