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

Protected Member Functions

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

Protected Attributes

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

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

◆ ~ISceneNode()

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

Destructor.

Definition at line 62 of file ISceneNode.h.

References Animators, irr::IReferenceCounted::drop(), removeAll(), and TriangleSelector.

Member Function Documentation

◆ addAnimator()

virtual void irr::scene::ISceneNode::addAnimator ( ISceneNodeAnimator animator)
inlinevirtual

Adds an animator which should animate this node.

Parameters
animatorA pointer to the new animator.

Definition at line 362 of file ISceneNode.h.

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

Referenced by cloneMembers().

◆ addChild()

virtual void irr::scene::ISceneNode::addChild ( ISceneNode child)
inlinevirtual

Adds a child to this scene node.

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

Parameters
childA pointer to the new child.

Definition at line 295 of file ISceneNode.h.

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

Referenced by ISceneNode(), and setParent().

◆ clone()

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

Creates a clone of this scene node and its children.

Parameters
newParentAn optional new parent.
newManagerAn optional new scene manager.
Returns
The newly created clone of this node.

Reimplemented in irr::scene::IAnimatedMeshSceneNode.

Definition at line 757 of file ISceneNode.h.

◆ cloneMembers()

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

A clone function for the ISceneNode members.

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

Parameters
toCopyFromThe node from which the values are copied
newManagerThe new scene manager.

Definition at line 773 of file ISceneNode.h.

References AbsoluteTransformation, addAnimator(), Animators, AutomaticCullingState, Children, irr::scene::ISceneNodeAnimator::createClone(), DebugDataVisible, irr::IReferenceCounted::drop(), 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 
)
inlinevirtual

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
inThe attribute container to read from.
optionsAdditional options which might influence the deserialization.

Reimplemented from irr::io::IAttributeExchangingObject.

Reimplemented in irr::scene::IParticleSystemSceneNode, and irr::scene::ICameraSceneNode.

Definition at line 725 of file ISceneNode.h.

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

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

◆ getAbsolutePosition()

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

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

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

◆ getAbsoluteTransformation()

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

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

References AbsoluteTransformation.

Referenced by updateAbsolutePosition().

◆ 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 374 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 556 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(), and getTransformedBoundingBoxEdges().

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

References Children.

◆ getID()

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

Get the id of the scene node.

This id can be used to identify the node.

Returns
The id.

Definition at line 276 of file ISceneNode.h.

References ID.

◆ getMaterial()

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

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
numZero based index. The maximal value is getMaterialCount() - 1.
Returns
The material at that index.

Definition at line 420 of file ISceneNode.h.

References irr::video::IdentityMaterial.

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

◆ getMaterialCount()

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

Get amount of materials used by this scene node.

Returns
Current amount of materials of this scene node.

Definition at line 428 of file ISceneNode.h.

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

◆ getName()

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

Returns the name of the node.

Returns
Name as character string.

Definition at line 146 of file ISceneNode.h.

References irr::core::string< T, TAlloc >::c_str(), and 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 679 of file ISceneNode.h.

References Parent.

◆ getPosition()

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

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

References RelativeTranslation.

Referenced by serializeAttributes().

◆ getRelativeTransformation()

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

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 221 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
inlinevirtual

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

References RelativeRotation.

Referenced by serializeAttributes().

◆ getScale()

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

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

References RelativeScale.

Referenced by serializeAttributes().

◆ getSceneManager()

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

Retrieve the scene manager for this node.

Returns
The node's scene manager.

Definition at line 764 of file ISceneNode.h.

References SceneManager.

◆ getTransformedBoundingBox()

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

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

Note: The result is still an axis-aligned bounding box, so it's size changes with rotation.

Returns
The transformed bounding box.

Definition at line 183 of file ISceneNode.h.

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

◆ getTransformedBoundingBoxEdges()

virtual void irr::scene::ISceneNode::getTransformedBoundingBoxEdges ( core::array< core::vector3d< f32 > > &  edges) const
inlinevirtual

Get a the 8 corners of the original bounding box transformed and animated by the absolute transformation. Note: The result is not identical to getTransformedBoundingBox().getEdges(), but getting an aabbox3d of these edges would then be identical.

Parameters
edgesReceives an array with the transformed edges

Definition at line 195 of file ISceneNode.h.

References AbsoluteTransformation, getBoundingBox(), irr::core::aabbox3d< T >::getEdges(), and irr::core::CMatrix4< T >::transformVect().

◆ getTriangleSelector()

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

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

References TriangleSelector.

◆ getType()

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

Returns type of the scene node.

Returns
The type of this node.

Reimplemented in irr::scene::IVolumeLightSceneNode.

Definition at line 687 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 574 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 593 of file ISceneNode.h.

References IsDebugObject.

◆ isTrulyVisible()

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

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

References isTrulyVisible(), IsVisible, and Parent.

Referenced by isTrulyVisible().

◆ isVisible()

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

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

References IsVisible.

Referenced by setVisible().

◆ OnAnimate()

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

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
timeMsCurrent time in milliseconds.

Reimplemented in irr::scene::IBoneSceneNode.

Definition at line 108 of file ISceneNode.h.

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

◆ OnRegisterSceneNode()

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

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:

Definition at line 91 of file ISceneNode.h.

References Children, and IsVisible.

◆ remove()

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

Removes this scene node from the scene.

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

Definition at line 353 of file ISceneNode.h.

References Parent, and removeChild().

Referenced by addChild(), and setParent().

◆ removeAll()

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

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

References Children.

Referenced by ~ISceneNode().

◆ removeAnimator()

virtual void irr::scene::ISceneNode::removeAnimator ( ISceneNodeAnimator animator)
inlinevirtual

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
animatorA pointer to the animator to be deleted.

Definition at line 384 of file ISceneNode.h.

References Animators.

◆ removeAnimators()

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

Removes all animators from this scene node.

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

Definition at line 402 of file ISceneNode.h.

References Animators.

◆ removeChild()

virtual bool irr::scene::ISceneNode::removeChild ( ISceneNode child)
inlinevirtual

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

References Children.

Referenced by remove().

◆ 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
inlinevirtual

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
outThe attribute container to write into.
optionsAdditional options which might influence the serialization.

Reimplemented from irr::io::IAttributeExchangingObject.

Reimplemented in irr::scene::IParticleSystemSceneNode, and irr::scene::ICameraSceneNode.

Definition at line 700 of file ISceneNode.h.

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

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

◆ setAutomaticCulling()

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

Set a culling style or disable culling completely.

Box cullling (EAC_BOX) is set 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
stateThe culling state to be used. Check E_CULLING_TYPE for possible values.

Definition at line 548 of file ISceneNode.h.

References AutomaticCullingState.

◆ setDebugDataVisible()

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

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
stateThe debug data visibility state to be used.

Definition at line 566 of file ISceneNode.h.

References DebugDataVisible.

◆ setID()

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

Sets the id of the scene node.

This id can be used to identify the node.

Parameters
idThe new id.

Definition at line 285 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 583 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
flagWhich flag of all materials to be set.
newvalueNew value of that flag.

Definition at line 439 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
textureLayerLayer of texture to be set. Must be a value smaller than MATERIAL_MAX_TEXTURES.
textureNew texture to be used.

Definition at line 450 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
newTypeNew type of material to be set.

Definition at line 462 of file ISceneNode.h.

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

◆ setName() [1/2]

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

Sets the name of the node.

Parameters
nameNew name of the scene node.

Definition at line 154 of file ISceneNode.h.

References Name.

◆ setName() [2/2]

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

Sets the name of the node.

Parameters
nameNew name of the scene node.

Definition at line 162 of file ISceneNode.h.

References Name.

◆ setParent()

virtual void irr::scene::ISceneNode::setParent ( ISceneNode newParent)
inlinevirtual

Changes the parent of the scene node.

Parameters
newParentThe new parent to be used.

Definition at line 609 of file ISceneNode.h.

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

◆ setPosition()

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

Sets the position of the node relative to its parent.

Note that the position is relative to the parent.

Parameters
newposNew relative position of the scene node.

Definition at line 521 of file ISceneNode.h.

References RelativeTranslation.

Referenced by deserializeAttributes().

◆ setRotation()

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

Sets the rotation of the node relative to its parent.

This only modifies the relative rotation of the node.

Parameters
rotationNew rotation of the node in degrees.

Reimplemented in irr::scene::ICameraSceneNode.

Definition at line 502 of file ISceneNode.h.

References RelativeRotation.

Referenced by deserializeAttributes().

◆ setScale()

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

Sets the relative scale of the scene node.

Parameters
scaleNew scale of the node, relative to its parent.

Definition at line 482 of file ISceneNode.h.

References RelativeScale.

Referenced by deserializeAttributes().

◆ setSceneManager()

void irr::scene::ISceneNode::setSceneManager ( ISceneManager newManager)
inlineprotected

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

Definition at line 814 of file ISceneNode.h.

References Children, and SceneManager.

Referenced by addChild().

◆ setTriangleSelector()

virtual void irr::scene::ISceneNode::setTriangleSelector ( ITriangleSelector selector)
inlinevirtual

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
selectorNew triangle selector for this scene node.

Definition at line 648 of file ISceneNode.h.

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

Referenced by cloneMembers().

◆ setVisible()

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

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
isVisibleIf the node shall be visible.

Reimplemented in irr::scene::ILightSceneNode.

Definition at line 267 of file ISceneNode.h.

References isVisible(), and IsVisible.

◆ updateAbsolutePosition()

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

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

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

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

Member Data Documentation

◆ AbsoluteTransformation

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

◆ Animators

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

List of all animator nodes.

Definition at line 845 of file ISceneNode.h.

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

◆ AutomaticCullingState

u32 irr::scene::ISceneNode::AutomaticCullingState
protected

Automatic culling state.

Definition at line 857 of file ISceneNode.h.

Referenced by 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 842 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 860 of file ISceneNode.h.

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

◆ ID

s32 irr::scene::ISceneNode::ID
protected

ID of the node.

Definition at line 854 of file ISceneNode.h.

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

◆ IsDebugObject

bool irr::scene::ISceneNode::IsDebugObject
protected

Is debug object?

Definition at line 866 of file ISceneNode.h.

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

◆ IsVisible

bool irr::scene::ISceneNode::IsVisible
protected

◆ Name

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

Name of the scene node.

Definition at line 824 of file ISceneNode.h.

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

◆ Parent

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

Pointer to the parent.

Definition at line 839 of file ISceneNode.h.

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

◆ RelativeRotation

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

Relative rotation of the scene node.

Definition at line 833 of file ISceneNode.h.

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

◆ RelativeScale

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

Relative scale of the scene node.

Definition at line 836 of file ISceneNode.h.

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

◆ RelativeTranslation

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

Relative translation of the scene node.

Definition at line 830 of file ISceneNode.h.

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

◆ SceneManager

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

Pointer to the scene manager.

Definition at line 848 of file ISceneNode.h.

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

◆ TriangleSelector

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

Pointer to the triangle selector.

Definition at line 851 of file ISceneNode.h.

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


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