Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::scene::ILightSceneNode Class Reference

Scene node which is a dynamic light. More...

`#include <ILightSceneNode.h>`

Inheritance diagram for irr::scene::ILightSceneNode:

List of all members.

## Public Member Functions
virtual void | enableCastShadow (bool shadow=true)=0
| Sets whether this light casts shadows.
virtual bool | getCastShadow () const =0
| Check whether this light casts shadows.
virtual video::SLight & | getLightData ()=0
| Gets the light data associated with this ILightSceneNode.
virtual const video::SLight & | getLightData () const =0
| Gets the light data associated with this ILightSceneNode.
virtual video::E_LIGHT_TYPE | getLightType () const =0
| Gets the light type.
virtual f32 | getRadius () const =0
| Gets the light's radius of influence.
| ILightSceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))
| constructor
virtual void | setLightData (const video::SLight &light)=0
| Sets the light data associated with this ILightSceneNode.
virtual void | setLightType (video::E_LIGHT_TYPE type)=0
| Sets the light type.
virtual void | setRadius (f32 radius)=0
| Sets the light's radius of influence.
virtual void | setVisible (bool isVisible)=0
| Sets if the node should be visible or not.

## Detailed Description

Scene node which is a dynamic light.

You can switch the light on and off by making it visible or not. It can be animated by ordinary scene node animators. If the light type is directional or spot, the direction of the light source is defined by the rotation of the scene node (assuming (0,0,1) as the local direction of the light).

Definition at line 18 of file ILightSceneNode.h.

## Constructor & Destructor Documentation

irr::scene::ILightSceneNode::ILightSceneNode | ( | ISceneNode * | parent,
|  | ISceneManager * | mgr,
|  | s32 | id,
|  | const core::vector3df & | position = `core::vector3df(0,0,0)` |
| ) |  |  | `[inline]`

constructor

Definition at line 14 of file ILightSceneNode.h.

References enableCastShadow(), getCastShadow(), getLightData(), getLightType(), getRadius(), irr::scene::ISceneNode::ISceneNode(), irr::scene::ISceneNode::isVisible(), setLightData(), setLightType(), setRadius(), and setVisible().

## Member Function Documentation

virtual void irr::scene::ILightSceneNode::enableCastShadow | ( | bool | shadow = `true` | ) | `[pure virtual]`

Sets whether this light casts shadows.

Enabling this flag won't automatically cast shadows, the meshes will still need shadow scene nodes attached. But one can enable or disable distinct lights for shadow casting for performance reasons.

Parameters:

  | shadow | True if this light shall cast shadows.

Referenced by ILightSceneNode().

virtual bool irr::scene::ILightSceneNode::getCastShadow | ( |  | ) | const`[pure virtual]`

Check whether this light casts shadows.

Returns:
  True if light would cast shadows, else false.

Referenced by ILightSceneNode().

virtual video::SLight& irr::scene::ILightSceneNode::getLightData | ( |  | ) | `[pure virtual]`

Gets the light data associated with this ILightSceneNode.

Returns:
  The light data.

virtual const video::SLight& irr::scene::ILightSceneNode::getLightData | ( |  | ) | const`[pure virtual]`

Gets the light data associated with this ILightSceneNode.

Returns:
  The light data.

Referenced by ILightSceneNode().

virtual video::E_LIGHT_TYPE irr::scene::ILightSceneNode::getLightType | ( |  | ) | const`[pure virtual]`

Gets the light type.

Returns:
  The current light type.

Referenced by ILightSceneNode().

virtual f32 irr::scene::ILightSceneNode::getRadius | ( |  | ) | const`[pure virtual]`

Gets the light's radius of influence.

Returns:
  The current radius.

Referenced by ILightSceneNode().

virtual void irr::scene::ILightSceneNode::setLightData | ( | const video::SLight & | light | ) | `[pure virtual]`

Sets the light data associated with this ILightSceneNode.

Parameters:

  | light | The new light data.

Referenced by ILightSceneNode().

virtual void irr::scene::ILightSceneNode::setLightType | ( | video::E_LIGHT_TYPE | type | ) | `[pure virtual]`

Sets the light type.

Parameters:

  | type | The new type.

Referenced by ILightSceneNode().

virtual void irr::scene::ILightSceneNode::setRadius | ( | f32 | radius | ) | `[pure virtual]`

Sets the light's radius of influence.

Outside this radius the light won't lighten geometry and cast no shadows. Setting the radius will also influence the attenuation, setting it to (0,1/radius,0). If you want to override this behavior, set the attenuation after the radius.

Parameters:

  | radius | The new radius.

Referenced by ILightSceneNode().

virtual void irr::scene::ILightSceneNode::setVisible | ( | bool | isVisible | ) | `[pure virtual]`

Sets if the node should be visible or not.

All children of this node won't be visible either, when set to true.

Parameters:

  | isVisible | If the node shall be visible.

Reimplemented from irr::scene::ISceneNode.

Referenced by ILightSceneNode().

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

- ILightSceneNode.h

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Feb 14 13:07:09 2010 by Doxygen (1.6.2)