| Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <ISceneNode.h>
Inheritance diagram for irr::scene::ISceneNode:

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 abolute position of the node. | |
| 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. | |
| 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. | |
| virtual core::vector3df | getScale () const |
| Gets the relative scale of the scene 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 | isVisible () const |
| Returns true if the node is 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, deleting it. | |
| 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 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. | |
| virtual void | setRotation (const core::vector3df &rotation) |
| Sets the rotation of the node. | |
| 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. | |
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. | |
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 35 of file ISceneNode.h.
|
||||||||||||||||||||||||||||
|
Constructor.
Definition at line 40 of file ISceneNode.h. References addChild(), Parent, and updateAbsolutePosition(). |
|
|
Destructor.
Definition at line 57 of file ISceneNode.h. References Animators, irr::core::list< T >::begin(), irr::IReferenceCounted::drop(), irr::core::list< T >::end(), removeAll(), and TriangleSelector. |
|
|
Adds an animator which should animate this node.
Definition at line 296 of file ISceneNode.h. References Animators, and irr::core::list< T >::push_back(). Referenced by cloneMembers(). |
|
|
Adds a child to this scene node. If the scene node already has a parent it is first removed from the other parent.
Definition at line 239 of file ISceneNode.h. References Children, irr::IReferenceCounted::grab(), irr::core::list< T >::push_back(), and remove(). Referenced by ISceneNode(), and setParent(). |
|
||||||||||||
|
Creates a clone of this scene node and its children.
Definition at line 661 of file ISceneNode.h. |
|
||||||||||||
|
A clone function for the ISceneNode members. This method can be used by clone() implementations of derived classes
Definition at line 673 of file ISceneNode.h. References AbsoluteTransformation, addAnimator(), Animators, AutomaticCullingState, irr::core::list< T >::begin(), Children, DebugDataVisible, irr::core::list< T >::end(), ID, IsDebugObject, IsVisible, Name, RelativeRotation, RelativeScale, RelativeTranslation, SceneManager, setTriangleSelector(), and TriangleSelector. |
|
||||||||||||
|
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.
Reimplemented from irr::io::IAttributeExchangingObject. Definition at line 636 of file ISceneNode.h. References irr::scene::AutomaticCullingNames, AutomaticCullingState, DebugDataVisible, ID, IsDebugObject, IsVisible, Name, setPosition(), setRotation(), setScale(), and updateAbsolutePosition(). |
|
|
Gets the abolute position of the node.
Definition at line 451 of file ISceneNode.h. References AbsoluteTransformation, and irr::core::CMatrix4< T >::getTranslation(). |
|
|
Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
Definition at line 168 of file ISceneNode.h. References AbsoluteTransformation. Referenced by updateAbsolutePosition(). |
|
|
Get a list of all scene node animators.
Definition at line 308 of file ISceneNode.h. References Animators. |
|
|
Gets the automatic culling state.
Definition at line 471 of file ISceneNode.h. References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and AutomaticCullingState. |
|
|
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.
Implemented in irr::scene::IBoneSceneNode, and irr::scene::ITerrainSceneNode. Referenced by getTransformedBoundingBox(). |
|
|
Returns a const reference to the list of all children.
Definition at line 517 of file ISceneNode.h. References Children. |
|
|
Get the id of the scene node. This id can be used to identify the node.
Definition at line 220 of file ISceneNode.h. References ID. |
|
|
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.
Definition at line 348 of file ISceneNode.h. Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType(). |
|
|
Get amount of materials used by this scene node.
Definition at line 356 of file ISceneNode.h. Referenced by setMaterialFlag(), setMaterialTexture(), and setMaterialType(). |
|
|
Returns the name of the node.
Definition at line 131 of file ISceneNode.h. References irr::core::string< T, TAlloc >::c_str(), and Name. |
|
|
Returns the parent of this scene node.
Definition at line 590 of file ISceneNode.h. References Parent. |
|
|
Gets the position of the node. Note that the position is relative to the parent.
Definition at line 434 of file ISceneNode.h. References RelativeTranslation. Referenced by serializeAttributes(). |
|
|
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.
Definition at line 179 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(). |
|
|
Gets the rotation of the node. Note that this is the relative rotation of the node.
Definition at line 416 of file ISceneNode.h. References RelativeRotation. Referenced by serializeAttributes(). |
|
|
Gets the relative scale of the scene node.
Definition at line 399 of file ISceneNode.h. References RelativeScale. Referenced by serializeAttributes(). |
|
|
Get the axis aligned, transformed and animated absolute bounding box of this node.
Definition at line 158 of file ISceneNode.h. References AbsoluteTransformation, getBoundingBox(), and irr::core::CMatrix4< T >::transformBox(). |
|
|
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::createOctTreeTriangleSelector 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.
Definition at line 549 of file ISceneNode.h. References TriangleSelector. |
|
|
Returns type of the scene node.
Definition at line 598 of file ISceneNode.h. References irr::scene::ESNT_UNKNOWN. |
|
|
Returns if debug data like bounding boxes are drawn.
Definition at line 489 of file ISceneNode.h. References DebugDataVisible. |
|
|
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.
Definition at line 508 of file ISceneNode.h. References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsDebugObject. |
|
|
Returns true if the node is visible. This is only an option set by the user, but has nothing to do with geometry culling
Definition at line 200 of file ISceneNode.h. References _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX, and IsVisible. |
|
|
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.
Reimplemented in irr::scene::IBoneSceneNode. Definition at line 103 of file ISceneNode.h. References Animators, irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), IsVisible, and updateAbsolutePosition(). |
|
|
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 86 of file ISceneNode.h. References irr::core::list< T >::begin(), Children, irr::core::list< T >::end(), and IsVisible. |
|
|
Removes this scene node from the scene, deleting it.
Definition at line 287 of file ISceneNode.h. References Parent, and removeChild(). Referenced by addChild(), and setParent(). |
|
|
Removes all children of this scene node.
Definition at line 273 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(). |
|
|
Removes an animator from this scene node.
Definition at line 316 of file ISceneNode.h. References Animators, irr::core::list< T >::begin(), irr::core::list< T >::end(), and irr::core::list< T >::erase(). |
|
|
Removes all animators from this scene node.
Definition at line 330 of file ISceneNode.h. References Animators, irr::core::list< T >::begin(), irr::core::list< T >::clear(), and irr::core::list< T >::end(). |
|
|
Removes a child from this scene node.
Definition at line 255 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(). |
|
|
Renders the node.
Implemented in irr::scene::IBoneSceneNode. |
|
||||||||||||
|
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.
Reimplemented from irr::io::IAttributeExchangingObject. Definition at line 611 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. |
|
|
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.
Definition at line 463 of file ISceneNode.h. References AutomaticCullingState. |
|
|
Sets if debug data like bounding boxes should be drawn. A bitwise OR of the types is supported. Please note that not all scene nodes support this feature.
Definition at line 482 of file ISceneNode.h. References DebugDataVisible. |
|
|
Sets the id of the scene node. This id can be used to identify the node.
Definition at line 229 of file ISceneNode.h. References ID. |
|
|
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 498 of file ISceneNode.h. References IsDebugObject. |
|
||||||||||||
|
Sets all material flags at once to a new value. Useful, for example, if you want the whole mesh to be affected by light.
Definition at line 367 of file ISceneNode.h. References getMaterial(), and getMaterialCount(). |
|
||||||||||||
|
Sets the texture of the specified layer in all materials of this scene node to the new texture.
Definition at line 378 of file ISceneNode.h. References getMaterial(), getMaterialCount(), and irr::video::MATERIAL_MAX_TEXTURES. |
|
|
Sets the material type of all materials in this scene node to a new material type.
Definition at line 390 of file ISceneNode.h. References getMaterial(), and getMaterialCount(). |
|
|
Sets the name of the node.
Definition at line 139 of file ISceneNode.h. References Name. |
|
|
Changes the parent of the scene node.
Definition at line 525 of file ISceneNode.h. References addChild(), irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), Parent, and remove(). |
|
|
Sets the position of the node. Note that the position is relative to the parent.
Definition at line 443 of file ISceneNode.h. References RelativeTranslation. Referenced by deserializeAttributes(). |
|
|
Sets the rotation of the node. This only modifies the relative rotation of the node.
Definition at line 425 of file ISceneNode.h. References RelativeRotation. Referenced by deserializeAttributes(). |
|
|
Sets the relative scale of the scene node.
Definition at line 407 of file ISceneNode.h. References RelativeScale. Referenced by deserializeAttributes(). |
|
|
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::createOctTreeTriangleSelector(). 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().
Definition at line 564 of file ISceneNode.h. References irr::IReferenceCounted::drop(), and TriangleSelector. Referenced by cloneMembers(). |
|
|
Sets if the node should be visible or not. All children of this node won't be visible either, when set to false.
Definition at line 211 of file ISceneNode.h. References IsVisible. |
|
|
Updates the absolute position based on the relative and the parents position.
Definition at line 576 of file ISceneNode.h. References AbsoluteTransformation, getAbsoluteTransformation(), getRelativeTransformation(), and Parent. Referenced by deserializeAttributes(), ISceneNode(), and OnAnimate(). |
|
|
Absolute transformation of the node.
Definition at line 716 of file ISceneNode.h. Referenced by cloneMembers(), getAbsolutePosition(), getAbsoluteTransformation(), getTransformedBoundingBox(), and updateAbsolutePosition(). |
|
|
List of all animator nodes.
Definition at line 734 of file ISceneNode.h. Referenced by addAnimator(), cloneMembers(), getAnimators(), OnAnimate(), removeAnimator(), removeAnimators(), and ~ISceneNode(). |
|
|
Automatic culling state.
Definition at line 746 of file ISceneNode.h. Referenced by cloneMembers(), deserializeAttributes(), getAutomaticCulling(), serializeAttributes(), and setAutomaticCulling(). |
|
|
List of all children of this node.
Definition at line 731 of file ISceneNode.h. Referenced by addChild(), cloneMembers(), getChildren(), OnAnimate(), OnRegisterSceneNode(), removeAll(), and removeChild(). |
|