Irrlicht 3D Engine: irr::scene::ILightSceneNode Class Reference

| Irrlicht 3D Engine |

Public Member Functions
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

- ILightSceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0))
    constructor
- 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 const video::SLight & getLightData () const =0
    Gets the light data associated with this ILightSceneNode.
- virtual video::SLight & getLightData ()=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.
- 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 22 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 27 of file ILightSceneNode.h.

## 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.

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

Check whether this light casts shadows.

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

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

Gets the light data associated with this ILightSceneNode.

Returns:
  The light data.

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

Gets the light data associated with this ILightSceneNode.

Returns:
  The light data.

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

Gets the light type.

Returns:
  The current light type.

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

Gets the light's radius of influence.

Returns:
  The current radius.

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.

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

Sets the light type.

Parameters:

  type | The new type.

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.

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.

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

- ILightSceneNode.h