Loading...
Searching...
No Matches
irr::scene::ISceneNode Class Referenceabstract

Scene node interface. More...

`#include <ISceneNode.h>`

Inheritance diagram for irr::scene::ISceneNode:

## Public Member Functions

| ISceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
| Constructor.
virtual | ~ISceneNode ()
| Destructor.
virtual void | addAnimator (ISceneNodeAnimator *animator)
| Adds an animator which should animate this node.
virtual void | addChild (ISceneNode *child)
| Adds a child to this scene node.
virtual ISceneNode * | clone (ISceneNode *newParent=0, ISceneManager *newManager=0)
| Creates a clone of this scene node and its children.
virtual void | deserializeAttributes (io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)
| Reads attributes of the scene node.
virtual core::vector3df | getAbsolutePosition () const
| Gets the absolute position of the node in world coordinates.
virtual const core::matrix4 & | getAbsoluteTransformation () const
| Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
const core::list< ISceneNodeAnimator * > & | getAnimators () const
| Get a list of all scene node animators.
u32 | getAutomaticCulling () const
| Gets the automatic culling state.
virtual const core::aabbox3d< f32 > & | getBoundingBox () const =0
| Get the axis aligned, not transformed bounding box of this node.
const core::list< ISceneNode * > & | getChildren () const
| Returns a const reference to the list of all children.
virtual s32 | getID () const
| Get the id of the scene node.
virtual video::SMaterial & | getMaterial (u32 num)
| Returns the material based on the zero based index i.
virtual u32 | getMaterialCount () const
| Get amount of materials used by this scene node.
virtual const c8 * | getName () const
| Returns the name of the node.
scene::ISceneNode * | getParent () const
| Returns the parent of this scene node.
virtual const core::vector3df & | getPosition () const
| Gets the position of the node relative to its parent.
virtual core::matrix4 | getRelativeTransformation () const
| Returns the relative transformation of the scene node.
virtual const core::vector3df & | getRotation () const
| Gets the rotation of the node relative to its parent.
virtual const core::vector3df & | getScale () const
| Gets the scale of the scene node relative to its parent.
virtual ISceneManager * | getSceneManager (void) const
| Retrieve the scene manager for this node.
virtual const core::aabbox3d< f32 > | getTransformedBoundingBox () const
| Get the axis aligned, transformed and animated absolute bounding box of this node.
virtual ITriangleSelector * | getTriangleSelector () const
| Returns the triangle selector attached to this scene node.
virtual ESCENE_NODE_TYPE | getType () const
| Returns type of the scene node.
u32 | isDebugDataVisible () const
| Returns if debug data like bounding boxes are drawn.
bool | isDebugObject () const
| Returns if this scene node is a debug object.
virtual bool | isTrulyVisible () const
| Check whether the node is truly visible, taking into accounts its parents' visibility.
virtual bool | isVisible () const
| Returns whether the node should be visible (if all of its parents are visible).
virtual void | OnAnimate (u32 timeMs)
| OnAnimate() is called just before rendering the whole scene.
virtual void | OnRegisterSceneNode ()
| This method is called just before the rendering process of the whole scene.
virtual void | remove ()
| Removes this scene node from the scene.
virtual void | removeAll ()
| Removes all children of this scene node.
virtual void | removeAnimator (ISceneNodeAnimator *animator)
| Removes an animator from this scene node.
virtual void | removeAnimators ()
| Removes all animators from this scene node.
virtual bool | removeChild (ISceneNode *child)
| Removes a child from this scene node.
virtual void | render ()=0
| Renders the node.
virtual void | serializeAttributes (io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const
| Writes attributes of the scene node.
void | setAutomaticCulling (u32 state)
| Enables or disables automatic culling based on the bounding box.
virtual void | setDebugDataVisible (u32 state)
| Sets if debug data like bounding boxes should be drawn.
virtual void | setID (s32 id)
| Sets the id of the scene node.
void | setIsDebugObject (bool debugObject)
| Sets if this scene node is a debug object.
void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)
| Sets all material flags at once to a new value.
void | setMaterialTexture (u32 textureLayer, video::ITexture *texture)
| Sets the texture of the specified layer in all materials of this scene node to the new texture.
void | setMaterialType (video::E_MATERIAL_TYPE newType)
| Sets the material type of all materials in this scene node to a new material type.
virtual void | setName (const c8 *name)
| Sets the name of the node.
virtual void | setName (const core::stringc &name)
| Sets the name of the node.
virtual void | setParent (ISceneNode *newParent)
| Changes the parent of the scene node.
virtual void | setPosition (const core::vector3df &newpos)
| Sets the position of the node relative to its parent.
virtual void | setRotation (const core::vector3df &rotation)
| Sets the rotation of the node relative to its parent.
virtual void | setScale (const core::vector3df &scale)
| Sets the relative scale of the scene node.
virtual void | setTriangleSelector (ITriangleSelector *selector)
| Sets the triangle selector of the scene node.
virtual void | setVisible (bool isVisible)
| Sets if the node should be visible or not.
virtual void | updateAbsolutePosition ()
| Updates the absolute position based on the relative and the parents position.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Protected Member Functions

void | cloneMembers (ISceneNode *toCopyFrom, ISceneManager *newManager)
| A clone function for the ISceneNode members.
void | setSceneManager (ISceneManager *newManager)
Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.

## Protected Attributes

core::matrix4 | AbsoluteTransformation
| Absolute transformation of the node.
core::list< ISceneNodeAnimator * > | Animators
| List of all animator nodes.
u32 | AutomaticCullingState
| Automatic culling state.
core::list< ISceneNode * > | Children
| List of all children of this node.
u32 | DebugDataVisible
| Flag if debug data should be drawn, such as Bounding Boxes.
s32 | ID
| ID of the node.
bool | IsDebugObject
| Is debug object?
bool | IsVisible
| Is the node visible?
core::stringc | Name
| Name of the scene node.
ISceneNode * | Parent
| Pointer to the parent.
core::vector3df | RelativeRotation
| Relative rotation of the scene node.
core::vector3df | RelativeScale
| Relative scale of the scene node.
core::vector3df | RelativeTranslation
| Relative translation of the scene node.
ISceneManager * | SceneManager
| Pointer to the scene manager.
ITriangleSelector * | TriangleSelector
| Pointer to the triangle selector.

## Detailed Description

Scene node interface.

A scene node is a node in the hierarchical scene graph. Every scene node may have children, which are also scene nodes. Children move relative to their parent's position. If the parent of a node is not visible, its children won't be visible either. In this way, it is for example easily possible to attach a light to a moving car, or to place a walking character on a moving platform on a moving ship.

Definition at line 40 of file ISceneNode.h.

## Constructor & Destructor Documentation

## ISceneNode()

irr::scene::ISceneNode::ISceneNode | ( | ISceneNode * | parent,
|  | ISceneManager * | mgr,
|  | s32 | id = -1,
|  | const core::vector3df & | position = core::vector3df(0,0,0),
|  | const core::vector3df & | rotation = core::vector3df(0,0,0),
|  | const core::vector3df & | scale = core::vector3df(1.0f, 1.0f, 1.0f) )

inline

Constructor.

Definition at line 45 of file ISceneNode.h.

References ISceneNode(), addChild(), AutomaticCullingState, DebugDataVisible, irr::scene::EAC_BOX, irr::scene::EDS_OFF, ID, IsDebugObject, IsVisible, Parent, RelativeRotation, RelativeScale, RelativeTranslation, SceneManager, TriangleSelector, and updateAbsolutePosition().

Referenced by irr::scene::IAnimatedMeshSceneNode::IAnimatedMeshSceneNode(), irr::scene::IBillboardSceneNode::IBillboardSceneNode(), irr::scene::IBoneSceneNode::IBoneSceneNode(), irr::scene::ICameraSceneNode::ICameraSceneNode(), irr::scene::IDummyTransformationSceneNode::IDummyTransformationSceneNode(), irr::scene::ILightSceneNode::ILightSceneNode(), irr::scene::IMeshSceneNode::IMeshSceneNode(), irr::scene::IParticleSystemSceneNode::IParticleSystemSceneNode(), ISceneNode(), irr::scene::IShadowVolumeSceneNode::IShadowVolumeSceneNode(), irr::scene::ITerrainSceneNode::ITerrainSceneNode(), irr::scene::ITextSceneNode::ITextSceneNode(), irr::scene::IVolumeLightSceneNode::IVolumeLightSceneNode(), addChild(), irr::scene::IAnimatedMeshSceneNode::clone(), clone(), cloneMembers(), removeChild(), and setParent().

## ~ISceneNode()

virtual irr::scene::ISceneNode::~ISceneNode | ( |  | ) |

inline virtual

Destructor.

Definition at line 62 of file ISceneNode.h.

References Animators, removeAll(), and TriangleSelector.

## Member Function Documentation

## addAnimator()

virtual void irr::scene::ISceneNode::addAnimator | ( | ISceneNodeAnimator * | animator | ) |

inline virtual

Adds an animator which should animate this node.

Parameters

  animator | A pointer to the new animator.

Definition at line 348 of file ISceneNode.h.

References Animators, and irr::IReferenceCounted::grab().

Referenced by cloneMembers().

## addChild()

virtual void irr::scene::ISceneNode::addChild | ( | ISceneNode * | child | ) |

inline virtual

Adds a child to this scene node.

If the scene node already has a parent it is first removed from the other parent.

Parameters

  child | A pointer to the new child.

Definition at line 280 of file ISceneNode.h.

References ISceneNode(), Children, irr::IReferenceCounted::grab(), Parent, remove(), SceneManager, and setSceneManager().

Referenced by ISceneNode().

## clone()

virtual ISceneNode * irr::scene::ISceneNode::clone | ( | ISceneNode * | newParent = 0,
|  | ISceneManager * | newManager = 0 )

inline virtual

Creates a clone of this scene node and its children.

Parameters

  newParent | An optional new parent.
  newManager | An optional new scene manager.

Returns
  The newly created clone of this node.

Reimplemented in irr::scene::IAnimatedMeshSceneNode.

Definition at line 741 of file ISceneNode.h.

References ISceneNode().

## cloneMembers()

void irr::scene::ISceneNode::cloneMembers | ( | ISceneNode * | toCopyFrom,
|  | ISceneManager * | newManager )

inline protected

A clone function for the ISceneNode members.

This method can be used by clone() implementations of derived classes

Parameters

  toCopyFrom | The node from which the values are copied
  newManager | The new scene manager.

Definition at line 757 of file ISceneNode.h.

References ISceneNode(), AbsoluteTransformation, addAnimator(), Animators, AutomaticCullingState, irr::core::list< T >::begin(), Children, irr::scene::ISceneNodeAnimator::createClone(), DebugDataVisible, irr::IReferenceCounted::drop(), irr::core::list< T >::end(), ID, IsDebugObject, IsVisible, Name, RelativeRotation, RelativeScale, RelativeTranslation, SceneManager, setTriangleSelector(), and TriangleSelector.

## deserializeAttributes()

virtual void irr::scene::ISceneNode::deserializeAttributes | ( | io::IAttributes * | in,
|  | io::SAttributeReadWriteOptions * | options = 0 )

inline virtual

Reads attributes of the scene node.

Implement this to set the attributes of your scene node for scripting languages, editors, debuggers or xml deserialization purposes.

Parameters

  in | The attribute container to read from.
  options | Additional options which might influence the deserialization.

Reimplemented from irr::io::IAttributeExchangingObject.

Reimplemented in irr::scene::ICameraSceneNode.

Definition at line 712 of file ISceneNode.h.

References irr::scene::AutomaticCullingNames, AutomaticCullingState, DebugDataVisible, irr::io::IAttributes::getAttributeAsBool(), irr::io::IAttributes::getAttributeAsEnumeration(), irr::io::IAttributes::getAttributeAsInt(), irr::io::IAttributes::getAttributeAsString(), irr::io::IAttributes::getAttributeAsVector3d(), ID, IsDebugObject, IsVisible, Name, setPosition(), setRotation(), setScale(), and updateAbsolutePosition().

Referenced by irr::scene::ICameraSceneNode::deserializeAttributes().

## getAbsolutePosition()

virtual core::vector3df irr::scene::ISceneNode::getAbsolutePosition | ( |  | ) | const

inline virtual

Gets the absolute position of the node in world coordinates.

If you want the position of the node relative to its parent, use getPosition() instead. NOTE: For speed reasons the absolute position is not automatically recalculated on each change of the relative position or by a position change of an parent. Instead the update usually happens once per frame in OnAnimate. You can enforce an update with updateAbsolutePosition().

Returns
  The current absolute position of the scene node (updated on last call of updateAbsolutePosition).

Definition at line 522 of file ISceneNode.h.

References AbsoluteTransformation.

## getAbsoluteTransformation()

virtual const core::matrix4 & irr::scene::ISceneNode::getAbsoluteTransformation | ( |  | ) | const

inline virtual

Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.

NOTE: For speed reasons the absolute transformation is not automatically recalculated on each change of the relative transformation or by a transformation change of an parent. Instead the update usually happens once per frame in OnAnimate. You can enforce an update with updateAbsolutePosition().

Returns
  The absolute transformation matrix.

Definition at line 193 of file ISceneNode.h.

References AbsoluteTransformation.

## getAnimators()

const core::list< ISceneNodeAnimator * > & irr::scene::ISceneNode::getAnimators | ( |  | ) | const

inline

Get a list of all scene node animators.

Returns
  The list of animators attached to this node.

Definition at line 360 of file ISceneNode.h.

References Animators.

## getAutomaticCulling()

u32 irr::scene::ISceneNode::getAutomaticCulling | ( |  | ) | const

inline

Gets the automatic culling state.

Returns
  The automatic culling state.

Definition at line 542 of file ISceneNode.h.

References AutomaticCullingState.

## getBoundingBox()

virtual const core::aabbox3d< f32 > & irr::scene::ISceneNode::getBoundingBox | ( |  | ) | const

pure virtual

Get the axis aligned, not transformed bounding box of this node.

This means that if this node is an animated 3d character, moving in a room, the bounding box will always be around the origin. To get the box in real world coordinates, just transform it with the matrix you receive with getAbsoluteTransformation() or simply use getTransformedBoundingBox(), which does the same.

Returns
  The non-transformed bounding box.

Implemented in irr::scene::IBoneSceneNode, and irr::scene::ITerrainSceneNode.

Referenced by getTransformedBoundingBox().

## getChildren()

const core::list< ISceneNode * > & irr::scene::ISceneNode::getChildren | ( |  | ) | const

inline

Returns a const reference to the list of all children.

Returns
  The list of all children of this node.

Definition at line 588 of file ISceneNode.h.

References Children.

## getID()

virtual s32 irr::scene::ISceneNode::getID | ( |  | ) | const

inline virtual

Get the id of the scene node.

This id can be used to identify the node.

Returns
  The id.

Definition at line 261 of file ISceneNode.h.

References ID.

## getMaterial()

virtual video::SMaterial & irr::scene::ISceneNode::getMaterial | ( | u32 | num | ) |

inline virtual

Returns the material based on the zero based index i.

To get the amount of materials used by this scene node, use getMaterialCount(). This function is needed for inserting the node into the scene hierarchy at an optimal position for minimizing renderstate changes, but can also be used to directly modify the material of a scene node.

Parameters

  num | Zero based index. The maximal value is getMaterialCount() - 1.

Returns
  The material at that index.

Definition at line 406 of file ISceneNode.h.

References irr::video::IdentityMaterial.

Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType().

## getMaterialCount()

virtual u32 irr::scene::ISceneNode::getMaterialCount | ( |  | ) | const

inline virtual

Get amount of materials used by this scene node.

Returns
  Current amount of materials of this scene node.

Definition at line 414 of file ISceneNode.h.

Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType().

## getName()

virtual const c8 * irr::scene::ISceneNode::getName | ( |  | ) | const

inline virtual

Returns the name of the node.

Returns
  Name as character string.

Definition at line 143 of file ISceneNode.h.

References Name.

Referenced by irr::scene::IBoneSceneNode::getBoneName().

## getParent()

scene::ISceneNode * irr::scene::ISceneNode::getParent | ( |  | ) | const

inline

Returns the parent of this scene node.

Returns
  A pointer to the parent.

Definition at line 666 of file ISceneNode.h.

References Parent.

## getPosition()

virtual const core::vector3df & irr::scene::ISceneNode::getPosition | ( |  | ) | const

inline virtual

Gets the position of the node relative to its parent.

Note that the position is relative to the parent. If you want the position in world coordinates, use getAbsolutePosition() instead.

Returns
  The current position of the node relative to the parent.

Definition at line 498 of file ISceneNode.h.

References RelativeTranslation.

Referenced by serializeAttributes().

## getRelativeTransformation()

virtual core::matrix4 irr::scene::ISceneNode::getRelativeTransformation | ( |  | ) | const

inline virtual

Returns the relative transformation of the scene node.

The relative transformation is stored internally as 3 vectors: translation, rotation and scale. To get the relative transformation matrix, it is calculated from these values.

Returns
  The relative transformation matrix.

Definition at line 204 of file ISceneNode.h.

References RelativeRotation, RelativeScale, RelativeTranslation, irr::core::CMatrix4< T >::setRotationDegrees(), irr::core::CMatrix4< T >::setScale(), and irr::core::CMatrix4< T >::setTranslation().

Referenced by updateAbsolutePosition().

## getRotation()

virtual const core::vector3df & irr::scene::ISceneNode::getRotation | ( |  | ) | const

inline virtual

Gets the rotation of the node relative to its parent.

Note that this is the relative rotation of the node. If you want the absolute rotation, use getAbsoluteTransformation().getRotation()

Returns
  Current relative rotation of the scene node.

Definition at line 479 of file ISceneNode.h.

References RelativeRotation.

Referenced by serializeAttributes().

## getScale()

virtual const core::vector3df & irr::scene::ISceneNode::getScale | ( |  | ) | const

inline virtual

Gets the scale of the scene node relative to its parent.

This is the scale of this node relative to its parent. If you want the absolute scale, use getAbsoluteTransformation().getScale()

Returns
  The scale of the scene node.

Definition at line 460 of file ISceneNode.h.

References RelativeScale.

Referenced by serializeAttributes().

## getSceneManager()

virtual ISceneManager * irr::scene::ISceneNode::getSceneManager | ( | void |  | ) | const

inline virtual

Retrieve the scene manager for this node.

Returns
  The node's scene manager.

Definition at line 748 of file ISceneNode.h.

References SceneManager.

## getTransformedBoundingBox()

virtual const core::aabbox3d< f32 > irr::scene::ISceneNode::getTransformedBoundingBox | ( |  | ) | const

inline virtual

Get the axis aligned, transformed and animated absolute bounding box of this node.

Returns
  The transformed bounding box.

Definition at line 178 of file ISceneNode.h.

References AbsoluteTransformation, and getBoundingBox().

## getTriangleSelector()

virtual ITriangleSelector * irr::scene::ISceneNode::getTriangleSelector | ( |  | ) | const

inline virtual

Returns the triangle selector attached to this scene node.

The Selector can be used by the engine for doing collision detection. You can create a TriangleSelector with ISceneManager::createTriangleSelector() or ISceneManager::createOctreeTriangleSelector and set it with ISceneNode::setTriangleSelector(). If a scene node got no triangle selector, but collision tests should be done with it, a triangle selector is created using the bounding box of the scene node.

Returns
  A pointer to the TriangleSelector or 0, if there is none.

Definition at line 620 of file ISceneNode.h.

References TriangleSelector.

## getType()

virtual ESCENE_NODE_TYPE irr::scene::ISceneNode::getType | ( |  | ) | const

inline virtual

Returns type of the scene node.

Returns
  The type of this node.

Reimplemented in irr::scene::IVolumeLightSceneNode.

Definition at line 674 of file ISceneNode.h.

References irr::scene::ESNT_UNKNOWN.

## isDebugDataVisible()

u32 irr::scene::ISceneNode::isDebugDataVisible | ( |  | ) | const

inline

Returns if debug data like bounding boxes are drawn.

Returns
  A bitwise OR of the debug data values from irr::scene::E_DEBUG_SCENE_TYPE that are currently visible.

Definition at line 560 of file ISceneNode.h.

References DebugDataVisible.

## isDebugObject()

bool irr::scene::ISceneNode::isDebugObject | ( |  | ) | const

inline

Returns if this scene node is a debug object.

Debug objects have some special properties, for example they can be easily excluded from collision detection or from serialization, etc.

Returns
  If this node is a debug object, true is returned.

Definition at line 579 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsDebugObject.

## isTrulyVisible()

virtual bool irr::scene::ISceneNode::isTrulyVisible | ( |  | ) | const

inline virtual

Check whether the node is truly visible, taking into accounts its parents' visibility.

Returns
  true if the node and all its parents are visible, false if this or any parent node is invisible.

Definition at line 235 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, IsVisible, and Parent.

## isVisible()

virtual bool irr::scene::ISceneNode::isVisible | ( |  | ) | const

inline virtual

Returns whether the node should be visible (if all of its parents are visible).

This is only an option set by the user, but has nothing to do with geometry culling

Returns
  The requested visibility of the node, true means visible (if all parents are also visible).

Definition at line 226 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsVisible.

Referenced by irr::scene::ILightSceneNode::setVisible(), and setVisible().

## OnAnimate()

virtual void irr::scene::ISceneNode::OnAnimate | ( | u32 | timeMs | ) |

inline virtual

OnAnimate() is called just before rendering the whole scene.

Nodes may calculate or store animations here, and may do other useful things, depending on what they are. Also, OnAnimate() should be called for all child scene nodes here. This method will be called once per frame, independent of whether the scene node is visible or not.

Parameters

  timeMs | Current time in milliseconds.

Reimplemented in irr::scene::IBoneSceneNode.

Definition at line 108 of file ISceneNode.h.

References irr::scene::ISceneNodeAnimator::animateNode(), Animators, Children, IsVisible, and updateAbsolutePosition().

## OnRegisterSceneNode()

virtual void irr::scene::ISceneNode::OnRegisterSceneNode | ( |  | ) |

inline virtual

This method is called just before the rendering process of the whole scene.

Nodes may register themselves in the render pipeline during this call, precalculate the geometry which should be renderered, and prevent their children from being able to register themselves if they are clipped by simply not calling their OnRegisterSceneNode method. If you are implementing your own scene node, you should overwrite this method with an implementation code looking like this:

if (IsVisible)
SceneManager->registerNodeForRendering(this);
ISceneNode::OnRegisterSceneNode();
irr::scene::ISceneNode::SceneManager
ISceneManager * SceneManager
Pointer to the scene manager.
Definition ISceneNode.h:832
irr::scene::ISceneNode::IsVisible
bool IsVisible
Is the node visible?
Definition ISceneNode.h:847
irr::scene::ISceneNode::OnRegisterSceneNode
virtual void OnRegisterSceneNode()
This method is called just before the rendering process of the whole scene.
Definition ISceneNode.h:91

Definition at line 91 of file ISceneNode.h.

References Children, and IsVisible.

## remove()

virtual void irr::scene::ISceneNode::remove | ( |  | ) |

inline virtual

Removes this scene node from the scene.

If no other grab exists for this node, it will be deleted.

Definition at line 339 of file ISceneNode.h.

References Parent.

Referenced by addChild(), and setParent().

## removeAll()

virtual void irr::scene::ISceneNode::removeAll | ( |  | ) |

inline virtual

Removes all children of this scene node.

The scene nodes found in the children list are also dropped and might be deleted if no other grab exists on them.

Definition at line 323 of file ISceneNode.h.

References Children.

Referenced by ~ISceneNode().

## removeAnimator()

virtual void irr::scene::ISceneNode::removeAnimator | ( | ISceneNodeAnimator * | animator | ) |

inline virtual

Removes an animator from this scene node.

If the animator is found, it is also dropped and might be deleted if not other grab exists for it.

Parameters

  animator | A pointer to the animator to be deleted.

Definition at line 370 of file ISceneNode.h.

References Animators.

## removeAnimators()

virtual void irr::scene::ISceneNode::removeAnimators | ( |  | ) |

inline virtual

Removes all animators from this scene node.

The animators might also be deleted if no other grab exists for them.

Definition at line 388 of file ISceneNode.h.

References Animators.

## removeChild()

virtual bool irr::scene::ISceneNode::removeChild | ( | ISceneNode * | child | ) |

inline virtual

Removes a child from this scene node.

If found in the children list, the child pointer is also dropped and might be deleted if no other grab exists.

Parameters

  child | A pointer to the child which shall be removed.

Returns
  True if the child was removed, and false if not, e.g. because it couldn't be found in the children list.

Definition at line 302 of file ISceneNode.h.

References ISceneNode(), _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and Children.

## render()

virtual void irr::scene::ISceneNode::render | ( |  | ) |

pure virtual

Renders the node.

Implemented in irr::scene::IBoneSceneNode.

## serializeAttributes()

virtual void irr::scene::ISceneNode::serializeAttributes | ( | io::IAttributes * | out,
|  | io::SAttributeReadWriteOptions * | options = 0 ) const

inline virtual

Writes attributes of the scene node.

Implement this to expose the attributes of your scene node for scripting languages, editors, debuggers or xml serialization purposes.

Parameters

  out | The attribute container to write into.
  options | Additional options which might influence the serialization.

Reimplemented from irr::io::IAttributeExchangingObject.

Reimplemented in irr::scene::ICameraSceneNode.

Definition at line 687 of file ISceneNode.h.

References irr::io::IAttributes::addBool(), irr::io::IAttributes::addInt(), irr::io::IAttributes::addString(), irr::io::IAttributes::addVector3d(), AutomaticCullingState, DebugDataVisible, getPosition(), getRotation(), getScale(), ID, IsDebugObject, IsVisible, and Name.

Referenced by irr::scene::ICameraSceneNode::serializeAttributes().

## setAutomaticCulling()

void irr::scene::ISceneNode::setAutomaticCulling | ( | u32 | state | ) |

inline

Enables or disables automatic culling based on the bounding box.

Automatic culling is enabled by default. Note that not all SceneNodes support culling and that some nodes always cull their geometry because it is their only reason for existence, for example the OctreeSceneNode.

Parameters

  state | The culling state to be used.

Definition at line 534 of file ISceneNode.h.

References AutomaticCullingState.

## setDebugDataVisible()

virtual void irr::scene::ISceneNode::setDebugDataVisible | ( | u32 | state | ) |

inline virtual

Sets if debug data like bounding boxes should be drawn.

A bitwise OR of the types from irr::scene::E_DEBUG_SCENE_TYPE. Please note that not all scene nodes support all debug data types.

Parameters

  state | The debug data visibility state to be used.

Definition at line 552 of file ISceneNode.h.

References DebugDataVisible.

## setID()

virtual void irr::scene::ISceneNode::setID | ( | s32 | id | ) |

inline virtual

Sets the id of the scene node.

This id can be used to identify the node.

Parameters

  id | The new id.

Definition at line 270 of file ISceneNode.h.

References ID.

## setIsDebugObject()

void irr::scene::ISceneNode::setIsDebugObject | ( | bool | debugObject | ) |

inline

Sets if this scene node is a debug object.

Debug objects have some special properties, for example they can be easily excluded from collision detection or from serialization, etc.

Definition at line 569 of file ISceneNode.h.

References IsDebugObject.

## setMaterialFlag()

void irr::scene::ISceneNode::setMaterialFlag | ( | video::E_MATERIAL_FLAG | flag,
|  | bool | newvalue )

inline

Sets all material flags at once to a new value.

Useful, for example, if you want the whole mesh to be affected by light.

Parameters

  flag | Which flag of all materials to be set.
  newvalue | New value of that flag.

Definition at line 425 of file ISceneNode.h.

References getMaterial(), getMaterialCount(), and irr::video::SMaterial::setFlag().

## setMaterialTexture()

void irr::scene::ISceneNode::setMaterialTexture | ( | u32 | textureLayer,
|  | video::ITexture * | texture )

inline

Sets the texture of the specified layer in all materials of this scene node to the new texture.

Parameters

  textureLayer | Layer of texture to be set. Must be a value smaller than MATERIAL_MAX_TEXTURES.
  texture | New texture to be used.

Definition at line 436 of file ISceneNode.h.

References getMaterial(), getMaterialCount(), irr::video::MATERIAL_MAX_TEXTURES, and irr::video::SMaterial::setTexture().

## setMaterialType()

void irr::scene::ISceneNode::setMaterialType | ( | video::E_MATERIAL_TYPE | newType | ) |

inline

Sets the material type of all materials in this scene node to a new material type.

Parameters

  newType | New type of material to be set.

Definition at line 448 of file ISceneNode.h.

References getMaterial(), getMaterialCount(), and irr::video::SMaterial::MaterialType.

## setName() [1/2]

virtual void irr::scene::ISceneNode::setName | ( | const c8 * | name | ) |

inline virtual

Sets the name of the node.

Parameters

  name | New name of the scene node.

Definition at line 151 of file ISceneNode.h.

References Name.

## setName() [2/2]

virtual void irr::scene::ISceneNode::setName | ( | const core::stringc & | name | ) |

inline virtual

Sets the name of the node.

Parameters

  name | New name of the scene node.

Definition at line 159 of file ISceneNode.h.

References Name.

## setParent()

virtual void irr::scene::ISceneNode::setParent | ( | ISceneNode * | newParent | ) |

inline virtual

Changes the parent of the scene node.

Parameters

  newParent | The new parent to be used.

Definition at line 596 of file ISceneNode.h.

References ISceneNode(), irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), Parent, and remove().

## setPosition()

virtual void irr::scene::ISceneNode::setPosition | ( | const core::vector3df & | newpos | ) |

inline virtual

Sets the position of the node relative to its parent.

Note that the position is relative to the parent.

Parameters

  newpos | New relative position of the scene node.

Definition at line 507 of file ISceneNode.h.

References RelativeTranslation.

Referenced by deserializeAttributes().

## setRotation()

virtual void irr::scene::ISceneNode::setRotation | ( | const core::vector3df & | rotation | ) |

inline virtual

Sets the rotation of the node relative to its parent.

This only modifies the relative rotation of the node.

Parameters

  rotation | New rotation of the node in degrees.

Reimplemented in irr::scene::ICameraSceneNode.

Definition at line 488 of file ISceneNode.h.

References RelativeRotation.

Referenced by deserializeAttributes().

## setScale()

virtual void irr::scene::ISceneNode::setScale | ( | const core::vector3df & | scale | ) |

inline virtual

Sets the relative scale of the scene node.

Parameters

  scale | New scale of the node, relative to its parent.

Definition at line 468 of file ISceneNode.h.

References RelativeScale.

Referenced by deserializeAttributes().

## setSceneManager()

void irr::scene::ISceneNode::setSceneManager | ( | ISceneManager * | newManager | ) |

inline protected

Sets the new scene manager for this node and all children. Called by addChild when moving nodes between scene managers

Definition at line 798 of file ISceneNode.h.

References Children, and SceneManager.

Referenced by addChild().

## setTriangleSelector()

virtual void irr::scene::ISceneNode::setTriangleSelector | ( | ITriangleSelector * | selector | ) |

inline virtual

Sets the triangle selector of the scene node.

The Selector can be used by the engine for doing collision detection. You can create a TriangleSelector with ISceneManager::createTriangleSelector() or ISceneManager::createOctreeTriangleSelector(). Some nodes may create their own selector by default, so it would be good to check if there is already a selector in this node by calling ISceneNode::getTriangleSelector().

Parameters

  selector | New triangle selector for this scene node.

Definition at line 635 of file ISceneNode.h.

References TriangleSelector.

Referenced by cloneMembers().

## setVisible()

virtual void irr::scene::ISceneNode::setVisible | ( | bool | isVisible | ) |

inline virtual

Sets if the node should be visible or not.

All children of this node won't be visible either, when set to false. Invisible nodes are not valid candidates for selection by collision manager bounding box methods.

Parameters

  isVisible | If the node shall be visible.

Reimplemented in irr::scene::ILightSceneNode.

Definition at line 252 of file ISceneNode.h.

References IsVisible, and isVisible().

## updateAbsolutePosition()

virtual void irr::scene::ISceneNode::updateAbsolutePosition | ( |  | ) |

inline virtual

Updates the absolute position based on the relative and the parents position.

Note: This does not recursively update the parents absolute positions, so if you have a deeper hierarchy you might want to update the parents first.

Definition at line 652 of file ISceneNode.h.

References AbsoluteTransformation, getRelativeTransformation(), and Parent.

Referenced by ISceneNode(), deserializeAttributes(), and OnAnimate().

## Member Data Documentation

## AbsoluteTransformation

core::matrix4 irr::scene::ISceneNode::AbsoluteTransformation

protected

Absolute transformation of the node.

Definition at line 811 of file ISceneNode.h.

Referenced by cloneMembers(), getAbsolutePosition(), getAbsoluteTransformation(), getTransformedBoundingBox(), and updateAbsolutePosition().

## Animators

core::list<ISceneNodeAnimator*> irr::scene::ISceneNode::Animators

protected

List of all animator nodes.

Definition at line 829 of file ISceneNode.h.

Referenced by ~ISceneNode(), addAnimator(), cloneMembers(), getAnimators(), OnAnimate(), removeAnimator(), and removeAnimators().

## AutomaticCullingState

u32 irr::scene::ISceneNode::AutomaticCullingState

protected

Automatic culling state.

Definition at line 841 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), deserializeAttributes(), getAutomaticCulling(), serializeAttributes(), and setAutomaticCulling().

## Children

core::list<ISceneNode*> irr::scene::ISceneNode::Children

protected

List of all children of this node.

Definition at line 826 of file ISceneNode.h.

Referenced by addChild(), cloneMembers(), getChildren(), OnAnimate(), OnRegisterSceneNode(), removeAll(), removeChild(), and setSceneManager().

## DebugDataVisible

u32 irr::scene::ISceneNode::DebugDataVisible

protected

Flag if debug data should be drawn, such as Bounding Boxes.

Definition at line 844 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), deserializeAttributes(), isDebugDataVisible(), serializeAttributes(), and setDebugDataVisible().

## ID

s32 irr::scene::ISceneNode::ID

protected

ID of the node.

Definition at line 838 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), deserializeAttributes(), getID(), serializeAttributes(), and setID().

## IsDebugObject

bool irr::scene::ISceneNode::IsDebugObject

protected

Is debug object?

Definition at line 850 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), deserializeAttributes(), isDebugObject(), serializeAttributes(), and setIsDebugObject().

## IsVisible

bool irr::scene::ISceneNode::IsVisible

protected

Is the node visible?

Definition at line 847 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), deserializeAttributes(), isTrulyVisible(), isVisible(), OnAnimate(), OnRegisterSceneNode(), serializeAttributes(), and setVisible().

## Name

core::stringc irr::scene::ISceneNode::Name

protected

Name of the scene node.

Definition at line 808 of file ISceneNode.h.

Referenced by cloneMembers(), deserializeAttributes(), getName(), serializeAttributes(), setName(), and setName().

## Parent

ISceneNode* irr::scene::ISceneNode::Parent

protected

Pointer to the parent.

Definition at line 823 of file ISceneNode.h.

Referenced by ISceneNode(), addChild(), getParent(), isTrulyVisible(), remove(), setParent(), and updateAbsolutePosition().

## RelativeRotation

core::vector3df irr::scene::ISceneNode::RelativeRotation

protected

Relative rotation of the scene node.

Definition at line 817 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), getRelativeTransformation(), getRotation(), and setRotation().

## RelativeScale

core::vector3df irr::scene::ISceneNode::RelativeScale

protected

Relative scale of the scene node.

Definition at line 820 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), getRelativeTransformation(), getScale(), and setScale().

## RelativeTranslation

core::vector3df irr::scene::ISceneNode::RelativeTranslation

protected

Relative translation of the scene node.

Definition at line 814 of file ISceneNode.h.

Referenced by ISceneNode(), cloneMembers(), getPosition(), getRelativeTransformation(), and setPosition().

## SceneManager

ISceneManager* irr::scene::ISceneNode::SceneManager

protected

Pointer to the scene manager.

Definition at line 832 of file ISceneNode.h.

Referenced by ISceneNode(), addChild(), cloneMembers(), getSceneManager(), and setSceneManager().

## TriangleSelector

ITriangleSelector* irr::scene::ISceneNode::TriangleSelector

protected

Pointer to the triangle selector.

Definition at line 835 of file ISceneNode.h.

Referenced by ISceneNode(), ~ISceneNode(), cloneMembers(), getTriangleSelector(), and setTriangleSelector().

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

- ISceneNode.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0