Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::ISceneNode Class Referenceabstract

Scene node interface. More...

#include <nirtcpp/core/engine/ISceneNode.hpp>

Inheritance diagram for nirt::scene::ISceneNode:
Inheritance graph
Collaboration diagram for nirt::scene::ISceneNode:
Collaboration graph

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

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.

Member Function Documentation

◆ addAnimator()

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

Adds an animator which should animate this node.

Parameters
animatorA pointer to the new animator.

◆ addChild()

virtual void nirt::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.

◆ clone()

virtual ISceneNode * nirt::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 nirt::scene::IAnimatedMeshSceneNode.

◆ cloneMembers()

void nirt::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.

◆ deserializeAttributes()

virtual void nirt::scene::ISceneNode::deserializeAttributes ( io::IAttributes in,
io::SAttributeReadWriteOptions options = 0 
)
inlineoverridevirtual

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 nirt::io::IAttributeExchangingObject.

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

◆ getAbsolutePosition()

virtual core::vector3df nirt::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).

◆ getAbsoluteTransformation()

virtual const core::matrix4 & nirt::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.

◆ getAnimators()

const core::list< ISceneNodeAnimator * > & nirt::scene::ISceneNode::getAnimators ( ) const
inline

Get a list of all scene node animators.

Returns
The list of animators attached to this node.

◆ getAutomaticCulling()

u32 nirt::scene::ISceneNode::getAutomaticCulling ( ) const
inline

Gets the automatic culling state.

Returns
The automatic culling state.

◆ getBoundingBox()

virtual const core::aabbox3d< f32 > & nirt::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 nirt::scene::ITerrainSceneNode, and nirt::scene::IBoneSceneNode.

◆ getChildren()

const core::list< ISceneNode * > & nirt::scene::ISceneNode::getChildren ( ) const
inline

Returns a const reference to the list of all children.

Returns
The list of all children of this node.

◆ getID()

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

Get the id of the scene node.

This id can be used to identify the node.

Returns
The id.

◆ getMaterial()

virtual video::SMaterial & nirt::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.

◆ getMaterialCount()

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

Get amount of materials used by this scene node.

Returns
Current amount of materials of this scene node.

◆ getName()

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

Returns the name of the node.

Returns
Name as character string.

◆ getParent()

scene::ISceneNode * nirt::scene::ISceneNode::getParent ( ) const
inline

Returns the parent of this scene node.

Returns
A pointer to the parent.

◆ getPosition()

virtual const core::vector3df & nirt::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.

◆ getRelativeTransformation()

virtual core::matrix4 nirt::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.

◆ getRotation()

virtual const core::vector3df & nirt::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.

◆ getScale()

virtual const core::vector3df & nirt::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.

◆ getSceneManager()

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

Retrieve the scene manager for this node.

Returns
The node's scene manager.

◆ getTransformedBoundingBox()

virtual const core::aabbox3d< f32 > nirt::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.

◆ getTransformedBoundingBoxEdges()

virtual void nirt::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

◆ getTriangleSelector()

virtual ITriangleSelector * nirt::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.

◆ getType()

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

Returns type of the scene node.

Returns
The type of this node.

Reimplemented in nirt::scene::IVolumeLightSceneNode.

◆ isDebugDataVisible()

u32 nirt::scene::ISceneNode::isDebugDataVisible ( ) const
inline

Returns if debug data like bounding boxes are drawn.

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

◆ isDebugObject()

bool nirt::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.

◆ isTrulyVisible()

virtual bool nirt::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.

◆ isVisible()

virtual bool nirt::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).

◆ OnAnimate()

virtual void nirt::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 nirt::scene::IBoneSceneNode.

◆ OnRegisterSceneNode()

virtual void nirt::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:

virtual u32 registerNodeForRendering(ISceneNode *node, E_SCENE_NODE_RENDER_PASS pass=ESNRP_AUTOMATIC)=0
Registers a node for rendering it at a specific time.
bool IsVisible
Is the node visible?
Definition ISceneNode.hpp:896
ISceneManager * SceneManager
Pointer to the scene manager.
Definition ISceneNode.hpp:878
virtual void OnRegisterSceneNode()
This method is called just before the rendering process of the whole scene.
Definition ISceneNode.hpp:94

◆ remove()

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

Removes this scene node from the scene.

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

◆ removeAll()

virtual void nirt::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.

◆ removeAnimator()

virtual void nirt::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.

◆ removeAnimators()

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

Removes all animators from this scene node.

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

◆ removeChild()

virtual bool nirt::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.

◆ render()

virtual void nirt::scene::ISceneNode::render ( )
pure virtual

Renders the node.

Implemented in nirt::scene::IBoneSceneNode.

◆ serializeAttributes()

virtual void nirt::scene::ISceneNode::serializeAttributes ( io::IAttributes out,
io::SAttributeReadWriteOptions options = 0 
) const
inlineoverridevirtual

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 nirt::io::IAttributeExchangingObject.

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

◆ setAutomaticCulling()

void nirt::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.

◆ setDebugDataVisible()

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

Sets if debug data like bounding boxes should be drawn.

A bitwise OR of the types from nirt::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.

◆ setID()

virtual void nirt::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.

◆ setIsDebugObject()

void nirt::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.

◆ setMaterialFlag()

void nirt::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.

◆ setMaterialTexture()

void nirt::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.

◆ setMaterialType()

void nirt::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.

◆ setName() [1/2]

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

Sets the name of the node.

Parameters
nameNew name of the scene node.

◆ setName() [2/2]

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

Sets the name of the node.

Parameters
nameNew name of the scene node.

◆ setParent()

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

Changes the parent of the scene node.

Parameters
newParentThe new parent to be used.

◆ setPosition()

virtual void nirt::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.

◆ setRotation()

virtual void nirt::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 nirt::scene::ICameraSceneNode.

◆ setScale()

virtual void nirt::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.

◆ setSceneManager()

void nirt::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

◆ setTriangleSelector()

virtual void nirt::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.

◆ setVisible()

virtual void nirt::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 nirt::scene::ILightSceneNode.

◆ updateAbsolutePosition()

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

Updates the absolute tranformation or position based on the relative and the parents transformation.

It's exact behavior can be controlled by setUpdateAbsolutePosBehavior. 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.


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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print