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 bool parseXML (IXMLReader *file, Entity *entity)
 Parses for a LightComponent.


Detailed Description

Component wrapper of Irrlicht's ILightSceneNode.

XML:

 <LightComponent>
    <!-- Properties -->
 </LightComponent>

Definition at line 33 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 53 of file LightComponent.cpp.

ILightSceneNode * LightComponent::getLightSceneNode (  ) 

Returns a direct pointer to the ILightSceneNode.

Definition at line 47 of file LightComponent.cpp.

E_LIGHT_TYPE LightComponent::getLightType (  )  const

Gets the light type.

Definition at line 59 of file LightComponent.cpp.

f32 LightComponent::getRadius (  )  const

Gets the light's radius of influence.

Definition at line 65 of file LightComponent.cpp.

bool LightComponent::parseXML ( IXMLReader *  file,
Entity entity 
) [static]

Parses for a LightComponent.

Note:
For internal use only!

Reimplemented from SceneComponent.

Definition at line 89 of file LightComponent.cpp.

void LightComponent::setCastShadow ( bool  shadow = true  ) 

Sets whether this light casts shadows.

XML:

     <castShadow value="" />

Parameters:
shadow Value to enable or disable this option.

Definition at line 71 of file LightComponent.cpp.

void LightComponent::setLightType ( E_LIGHT_TYPE  type  ) 

Sets the light type.

XML:

     <lightType value="" />

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

Definition at line 77 of file LightComponent.cpp.

void LightComponent::setRadius ( f32  radius  ) 

Sets the light's radius of influence.

XML:

     <radius value="" />

Parameters:
radius The new radius.

Definition at line 83 of file LightComponent.cpp.


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

Generated on Fri Aug 21 23:55:15 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8