LightComponent Class Reference

Component wrapper of Irrlicht's ILightSceneNode. More...

Inheritance diagram for LightComponent:

Inheritance graph
[legend]
Collaboration diagram for LightComponent:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LightComponent (Entity *parent, const SColorf &color=SColorf(1.0f, 1.0f, 1.0f), f32 radius=100.0f)
 Constructor (default).
 ~LightComponent ()
 Deconstructor.
ILightSceneNode * getLightSceneNode ()
 Returns a direct pointer to the ILightSceneNode.
bool getCastShadow () const
 Returns whether this light casts shadows.
E_LIGHT_TYPE getLightType () const
 Gets the light type.
f32 getRadius () const
 Gets the light's radius of influence.
void setCastShadow (bool shadow=true)
 Sets whether this light casts shadows.
void setLightType (E_LIGHT_TYPE type)
 Sets the light type.
void setRadius (f32 radius)
 Sets the light's radius of influence.

Static Public Member Functions

static LightComponentrefFactory (Entity *parent)
 Will be used to instanciate objects of this class.
static LightComponentrefFactory (Entity *parent, const SColor &color, f32 radius)
 Will be used to instanciate objects of this class.


Detailed Description

Component wrapper of Irrlicht's ILightSceneNode.

Definition at line 26 of file LightComponent.h.


Constructor & Destructor Documentation

LightComponent::LightComponent ( Entity parent,
const SColorf &  color = SColorf(1.0f, 1.0f, 1.0f),
f32  radius = 100.0f 
)

Constructor (default).

Parameters:
parent The parent entity to which the component should be added.
color Diffuse color of the light.
radius Radius of the light.

Definition at line 23 of file LightComponent.cpp.

LightComponent::~LightComponent (  ) 

Deconstructor.

Definition at line 40 of file LightComponent.cpp.


Member Function Documentation

bool LightComponent::getCastShadow (  )  const

Returns whether this light casts shadows.

Definition at line 65 of file LightComponent.cpp.

ILightSceneNode * LightComponent::getLightSceneNode (  ) 

Returns a direct pointer to the ILightSceneNode.

Definition at line 59 of file LightComponent.cpp.

E_LIGHT_TYPE LightComponent::getLightType (  )  const

Gets the light type.

Definition at line 71 of file LightComponent.cpp.

f32 LightComponent::getRadius (  )  const

Gets the light's radius of influence.

Definition at line 77 of file LightComponent.cpp.

LightComponent * LightComponent::refFactory ( Entity parent,
const SColor &  color,
f32  radius 
) [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

Definition at line 53 of file LightComponent.cpp.

LightComponent * LightComponent::refFactory ( Entity parent  )  [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

Reimplemented from SceneComponent.

Definition at line 47 of file LightComponent.cpp.

void LightComponent::setCastShadow ( bool  shadow = true  ) 

Sets whether this light casts shadows.

Parameters:
shadow Value to enable or disable this option.

Definition at line 83 of file LightComponent.cpp.

void LightComponent::setLightType ( E_LIGHT_TYPE  type  ) 

Sets the light type.

Parameters:
type The light type (see: Irrlicht API documentation)

Definition at line 89 of file LightComponent.cpp.

void LightComponent::setRadius ( f32  radius  ) 

Sets the light's radius of influence.

Parameters:
radius The new radius.

Definition at line 95 of file LightComponent.cpp.


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

Generated on Wed Jun 10 22:26:25 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8