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

# irr::scene::ISceneNode Class Reference

Scene node interface. More...

`#include <ISceneNode.h>`

Inheritance diagram for irr::scene::ISceneNode:

List of all members.

## Public Member Functions

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
const core::list < ISceneNodeAnimator * > & | getAnimators () const
| Get a list of all scene node animators.
E_CULLING_TYPE | 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.
| 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.
s32 | 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 (E_CULLING_TYPE state)
| Enables or disables automatic culling based on the bounding box.
virtual void | setDebugDataVisible (s32 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 core::stringc &name)
| Sets the name of the node.
virtual void | setName (const c8 *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.
virtual | ~ISceneNode ()
| Destructor.

## Protected Member Functions

void | cloneMembers (ISceneNode *toCopyFrom, ISceneManager *newManager)
| A clone function for the ISceneNode members.
void | setSceneManager (ISceneManager *newManager)

## Protected Attributes

core::matrix4 | AbsoluteTransformation
| Absolute transformation of the node.
core::list< ISceneNodeAnimator * > | Animators
| List of all animator nodes.
E_CULLING_TYPE | AutomaticCullingState
| Automatic culling state.
core::list< ISceneNode * > | Children
| List of all children of this node.
s32 | 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

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 addChild(), and updateAbsolutePosition().

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

virtual irr::scene::ISceneNode::~ISceneNode | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 62 of file ISceneNode.h.

References Animators, irr::core::list< T >::begin(), irr::IReferenceCounted::drop(), irr::core::list< T >::end(), removeAll(), and TriangleSelector.

## Member Function Documentation

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 343 of file ISceneNode.h.

References Animators, irr::IReferenceCounted::grab(), and irr::core::list< T >::push_back().

Referenced by cloneMembers().

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 275 of file ISceneNode.h.

References Children, irr::IReferenceCounted::grab(), Parent, irr::core::list< T >::push_back(), remove(), SceneManager, and setSceneManager().

Referenced by ISceneNode(), and setParent().

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 728 of file ISceneNode.h.

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 744 of file ISceneNode.h.

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

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.

Definition at line 703 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().

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.

Returns:
  The current absolute position of the scene node.

Definition at line 512 of file ISceneNode.h.

References AbsoluteTransformation, and irr::core::CMatrix4< T >::getTranslation().

virtual const core::matrix4& irr::scene::ISceneNode::getAbsoluteTransformation | ( |  | ) | const`[inline, virtual]`

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

Returns:
  The absolute transformation matrix.

Definition at line 188 of file ISceneNode.h.

References AbsoluteTransformation.

Referenced by updateAbsolutePosition().

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 355 of file ISceneNode.h.

References Animators.

E_CULLING_TYPE irr::scene::ISceneNode::getAutomaticCulling | ( |  | ) | const`[inline]`

Gets the automatic culling state.

Returns:
  The automatic culling state.

Definition at line 532 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and AutomaticCullingState.

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().

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 579 of file ISceneNode.h.

References Children.

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 256 of file ISceneNode.h.

References ID.

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 401 of file ISceneNode.h.

References irr::video::IdentityMaterial.

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

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 409 of file ISceneNode.h.

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

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 irr::core::string< T, TAlloc >::c_str(), and Name.

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

scene::ISceneNode* irr::scene::ISceneNode::getParent | ( |  | ) | const`[inline]`

Returns the parent of this scene node.

Returns:
  A pointer to the parent.

Definition at line 657 of file ISceneNode.h.

References Parent.

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 493 of file ISceneNode.h.

References RelativeTranslation.

Referenced by serializeAttributes().

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 199 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().

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 474 of file ISceneNode.h.

References RelativeRotation.

Referenced by serializeAttributes().

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 455 of file ISceneNode.h.

References RelativeScale.

Referenced by serializeAttributes().

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 735 of file ISceneNode.h.

References SceneManager.

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, getBoundingBox(), and irr::core::CMatrix4< T >::transformBoxEx().

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 611 of file ISceneNode.h.

References TriangleSelector.

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 665 of file ISceneNode.h.

References irr::scene::ESNT_UNKNOWN.

s32 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 551 of file ISceneNode.h.

References DebugDataVisible.

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 570 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsDebugObject.

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 230 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, isTrulyVisible(), IsVisible, and Parent.

Referenced by isTrulyVisible().

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 221 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsVisible.

Referenced by irr::scene::ILightSceneNode::ILightSceneNode().

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, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), IsVisible, and updateAbsolutePosition().

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();

Definition at line 91 of file ISceneNode.h.

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and IsVisible.

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 334 of file ISceneNode.h.

References Parent, and removeChild().

Referenced by addChild().

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 318 of file ISceneNode.h.

References irr::core::list< T >::begin(), Children, irr::core::list< T >::clear(), and irr::core::list< T >::end().

Referenced by ~ISceneNode().

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 365 of file ISceneNode.h.

References Animators, irr::core::list< T >::begin(), irr::core::list< T >::end(), and irr::core::list< T >::erase().

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 383 of file ISceneNode.h.

References Animators, irr::core::list< T >::begin(), irr::core::list< T >::clear(), and irr::core::list< T >::end().

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 297 of file ISceneNode.h.

References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and irr::core::list< T >::erase().

Referenced by remove().

virtual void irr::scene::ISceneNode::render | ( |  | ) | `[pure virtual]`

Renders the node.

Implemented in irr::scene::IBoneSceneNode.

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.

Definition at line 678 of file ISceneNode.h.

References irr::io::IAttributes::addBool(), irr::io::IAttributes::addEnum(), irr::io::IAttributes::addInt(), irr::io::IAttributes::addString(), irr::io::IAttributes::addVector3d(), irr::scene::AutomaticCullingNames, AutomaticCullingState, irr::core::string< T, TAlloc >::c_str(), DebugDataVisible, getPosition(), getRotation(), getScale(), ID, IsDebugObject, IsVisible, and Name.

void irr::scene::ISceneNode::setAutomaticCulling | ( | E_CULLING_TYPE | 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 524 of file ISceneNode.h.

References AutomaticCullingState.

virtual void irr::scene::ISceneNode::setDebugDataVisible | ( | s32 | 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 543 of file ISceneNode.h.

References DebugDataVisible.

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 265 of file ISceneNode.h.

References ID.

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 560 of file ISceneNode.h.

References IsDebugObject.

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 420 of file ISceneNode.h.

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

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 431 of file ISceneNode.h.

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

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 443 of file ISceneNode.h.

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

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.

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.

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 587 of file ISceneNode.h.

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

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 502 of file ISceneNode.h.

References RelativeTranslation.

Referenced by deserializeAttributes().

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 483 of file ISceneNode.h.

References RelativeRotation.

Referenced by deserializeAttributes().

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 463 of file ISceneNode.h.

References RelativeScale.

Referenced by deserializeAttributes().

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 785 of file ISceneNode.h.

References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and SceneManager.

Referenced by addChild().

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 626 of file ISceneNode.h.

References irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), and TriangleSelector.

Referenced by cloneMembers().

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 247 of file ISceneNode.h.

References IsVisible.

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 643 of file ISceneNode.h.

References AbsoluteTransformation, getAbsoluteTransformation(), getRelativeTransformation(), and Parent.

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

## Member Data Documentation

core::matrix4 irr::scene::ISceneNode::AbsoluteTransformation `[protected]`

Absolute transformation of the node.

Definition at line 798 of file ISceneNode.h.

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

core::list<ISceneNodeAnimator*> irr::scene::ISceneNode::Animators `[protected]`

List of all animator nodes.

Definition at line 816 of file ISceneNode.h.

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

E_CULLING_TYPE irr::scene::ISceneNode::AutomaticCullingState `[protected]`

Automatic culling state.

Definition at line 828 of file ISceneNode.h.

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

core::list<ISceneNode*> irr::scene::ISceneNode::Children `[protected]`

List of all children of this node.

Definition at line 813 of file ISceneNode.h.

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

s32 irr::scene::ISceneNode::DebugDataVisible `[protected]`

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

Definition at line 831 of file ISceneNode.h.

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

s32 irr::scene::ISceneNode::ID `[protected]`

ID of the node.

Definition at line 825 of file ISceneNode.h.

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

bool irr::scene::ISceneNode::IsDebugObject `[protected]`

Is debug object?

Definition at line 837 of file ISceneNode.h.

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

bool irr::scene::ISceneNode::IsVisible `[protected]`

Is the node visible?

Definition at line 834 of file ISceneNode.h.

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

core::stringc irr::scene::ISceneNode::Name `[protected]`

Name of the scene node.

Definition at line 795 of file ISceneNode.h.

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

ISceneNode* irr::scene::ISceneNode::Parent `[protected]`

Pointer to the parent.

Definition at line 810 of file ISceneNode.h.

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

core::vector3df irr::scene::ISceneNode::RelativeRotation `[protected]`

Relative rotation of the scene node.

Definition at line 804 of file ISceneNode.h.

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

core::vector3df irr::scene::ISceneNode::RelativeScale `[protected]`

Relative scale of the scene node.

Definition at line 807 of file ISceneNode.h.

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

core::vector3df irr::scene::ISceneNode::RelativeTranslation `[protected]`

Relative translation of the scene node.

Definition at line 801 of file ISceneNode.h.

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

ISceneManager* irr::scene::ISceneNode::SceneManager `[protected]`

Pointer to the scene manager.

Definition at line 819 of file ISceneNode.h.

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

ITriangleSelector* irr::scene::ISceneNode::TriangleSelector `[protected]`

Pointer to the triangle selector.

Definition at line 822 of file ISceneNode.h.

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

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

- ISceneNode.h

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