Loading...
Searching...
No Matches
ISceneNode.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_SCENE_NODE_H_INCLUDED__
#define __I_SCENE_NODE_H_INCLUDED__
#include "IAttributeExchangingObject.h"
#include "ESceneNodeTypes.h"
#include "ECullingTypes.h"
#include "EDebugSceneTypes.h"
#include "ISceneNodeAnimator.h"
#include "ITriangleSelector.h"
#include "SMaterial.h"
#include "irrString.h"
#include "aabbox3d.h"
#include "matrix4.h"
#include "irrList.h"
#include "IAttributes.h"
namespace irr
{
namespace scene
{
class ISceneManager;
typedef core::list<ISceneNode*> ISceneNodeList;
typedef core::list<ISceneNodeAnimator*> ISceneNodeAnimatorList;
class ISceneNode : virtual public io::IAttributeExchangingObject
{
public:
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))
: RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale),
Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id),
AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF),
IsVisible(true), IsDebugObject(false)
{
if (parent)
parent->addChild(this);
updateAbsolutePosition();
}
virtual ~ISceneNode()
{
// delete all children
removeAll();
// delete all animators
ISceneNodeAnimatorList::Iterator ait = Animators.begin();
for (; ait != Animators.end(); ++ait)
(*ait)->drop();
if (TriangleSelector)
TriangleSelector->drop();
}
virtual void OnRegisterSceneNode()
{
if (IsVisible)
{
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->OnRegisterSceneNode();
}
}
virtual void OnAnimate(u32 timeMs)
{
if (IsVisible)
{
// animate this node with all animators
ISceneNodeAnimatorList::Iterator ait = Animators.begin();
while (ait != Animators.end())
{
// continue to the next node before calling animateNode()
// so that the animator may remove itself from the scene
// node without the iterator becoming invalid
ISceneNodeAnimator* anim = *ait;
++ait;
anim->animateNode(this, timeMs);
}
// update absolute position
updateAbsolutePosition();
// perform the post render process on all children
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->OnAnimate(timeMs);
}
}
virtual void render() = 0;
virtual const c8* getName() const
{
return Name.c_str();
}
virtual void setName(const c8* name)
{
Name = name;
}
virtual void setName(const core::stringc& name)
{
Name = name;
}
virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
virtual const core::aabbox3d<f32> getTransformedBoundingBox() const
{
core::aabbox3d<f32> box = getBoundingBox();
AbsoluteTransformation.transformBoxEx(box);
return box;
}
virtual const core::matrix4& getAbsoluteTransformation() const
{
return AbsoluteTransformation;
}
virtual core::matrix4 getRelativeTransformation() const
{
core::matrix4 mat;
mat.setRotationDegrees(RelativeRotation);
mat.setTranslation(RelativeTranslation);
if (RelativeScale != core::vector3df(1.f,1.f,1.f))
{
core::matrix4 smat;
smat.setScale(RelativeScale);
mat *= smat;
}
return mat;
}
virtual bool isVisible() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return IsVisible;
}
virtual bool isTrulyVisible() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
if(!IsVisible)
return false;
if(!Parent)
return true;
return Parent->isTrulyVisible();
}
virtual void setVisible(bool isVisible)
{
IsVisible = isVisible;
}
virtual s32 getID() const
{
return ID;
}
virtual void setID(s32 id)
{
ID = id;
}
virtual void addChild(ISceneNode* child)
{
if (child && (child != this))
{
// Change scene manager?
if (SceneManager != child->SceneManager)
child->setSceneManager(SceneManager);
child->grab();
child->remove(); // remove from old parent
Children.push_back(child);
child->Parent = this;
}
}
virtual bool removeChild(ISceneNode* child)
{
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
if ((*it) == child)
{
(*it)->Parent = 0;
(*it)->drop();
Children.erase(it);
return true;
}
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return false;
}
virtual void removeAll()
{
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
{
(*it)->Parent = 0;
(*it)->drop();
}
Children.clear();
}
virtual void remove()
{
if (Parent)
Parent->removeChild(this);
}
virtual void addAnimator(ISceneNodeAnimator* animator)
{
if (animator)
{
Animators.push_back(animator);
animator->grab();
}
}
const core::list<ISceneNodeAnimator*>& getAnimators() const
{
return Animators;
}
virtual void removeAnimator(ISceneNodeAnimator* animator)
{
ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it)
{
if ((*it) == animator)
{
(*it)->drop();
Animators.erase(it);
return;
}
}
}
virtual void removeAnimators()
{
ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it)
(*it)->drop();
Animators.clear();
}
virtual video::SMaterial& getMaterial(u32 num)
{
return video::IdentityMaterial;
}
virtual u32 getMaterialCount() const
{
return 0;
}
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
{
for (u32 i=0; i<getMaterialCount(); ++i)
getMaterial(i).setFlag(flag, newvalue);
}
void setMaterialTexture(u32 textureLayer, video::ITexture* texture)
{
if (textureLayer >= video::MATERIAL_MAX_TEXTURES)
return;
for (u32 i=0; i<getMaterialCount(); ++i)
getMaterial(i).setTexture(textureLayer, texture);
}
void setMaterialType(video::E_MATERIAL_TYPE newType)
{
for (u32 i=0; i<getMaterialCount(); ++i)
getMaterial(i).MaterialType = newType;
}
virtual const core::vector3df& getScale() const
{
return RelativeScale;
}
virtual void setScale(const core::vector3df& scale)
{
RelativeScale = scale;
}
virtual const core::vector3df& getRotation() const
{
return RelativeRotation;
}
virtual void setRotation(const core::vector3df& rotation)
{
RelativeRotation = rotation;
}
virtual const core::vector3df& getPosition() const
{
return RelativeTranslation;
}
virtual void setPosition(const core::vector3df& newpos)
{
RelativeTranslation = newpos;
}
virtual core::vector3df getAbsolutePosition() const
{
return AbsoluteTransformation.getTranslation();
}
void setAutomaticCulling( u32 state)
{
AutomaticCullingState = state;
}
u32 getAutomaticCulling() const
{
return AutomaticCullingState;
}
virtual void setDebugDataVisible(u32 state)
{
DebugDataVisible = state;
}
u32 isDebugDataVisible() const
{
return DebugDataVisible;
}
void setIsDebugObject(bool debugObject)
{
IsDebugObject = debugObject;
}
bool isDebugObject() const
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return IsDebugObject;
}
const core::list<ISceneNode*>& getChildren() const
{
return Children;
}
virtual void setParent(ISceneNode* newParent)
{
grab();
remove();
Parent = newParent;
if (Parent)
Parent->addChild(this);
drop();
}
virtual ITriangleSelector* getTriangleSelector() const
{
return TriangleSelector;
}
virtual void setTriangleSelector(ITriangleSelector* selector)
{
if (TriangleSelector != selector)
{
if (TriangleSelector)
TriangleSelector->drop();
TriangleSelector = selector;
if (TriangleSelector)
TriangleSelector->grab();
}
}
virtual void updateAbsolutePosition()
{
if (Parent)
{
AbsoluteTransformation =
Parent->getAbsoluteTransformation() * getRelativeTransformation();
}
else
AbsoluteTransformation = getRelativeTransformation();
}
scene::ISceneNode* getParent() const
{
return Parent;
}
virtual ESCENE_NODE_TYPE getType() const
{
return ESNT_UNKNOWN;
}
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
{
if (!out)
return;
out->addString ("Name", Name.c_str());
out->addInt ("Id", ID );
out->addVector3d("Position", getPosition() );
out->addVector3d("Rotation", getRotation() );
out->addVector3d("Scale", getScale() );
out->addBool ("Visible", IsVisible );
out->addInt ("AutomaticCulling", AutomaticCullingState);
out->addInt ("DebugDataVisible", DebugDataVisible );
out->addBool ("IsDebugObject", IsDebugObject );
}
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
{
if (!in)
return;
Name = in->getAttributeAsString("Name");
ID = in->getAttributeAsInt("Id");
setPosition(in->getAttributeAsVector3d("Position"));
setRotation(in->getAttributeAsVector3d("Rotation"));
setScale(in->getAttributeAsVector3d("Scale"));
IsVisible = in->getAttributeAsBool("Visible");
s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
scene::AutomaticCullingNames);
if (tmpState != -1)
AutomaticCullingState = (u32)tmpState;
else
AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
DebugDataVisible = in->getAttributeAsInt("DebugDataVisible");
IsDebugObject = in->getAttributeAsBool("IsDebugObject");
updateAbsolutePosition();
}
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0)
{
return 0; // to be implemented by derived classes
}
virtual ISceneManager* getSceneManager(void) const { return SceneManager; }
protected:
void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager)
{
Name = toCopyFrom->Name;
AbsoluteTransformation = toCopyFrom->AbsoluteTransformation;
RelativeTranslation = toCopyFrom->RelativeTranslation;
RelativeRotation = toCopyFrom->RelativeRotation;
RelativeScale = toCopyFrom->RelativeScale;
ID = toCopyFrom->ID;
setTriangleSelector(toCopyFrom->TriangleSelector);
AutomaticCullingState = toCopyFrom->AutomaticCullingState;
DebugDataVisible = toCopyFrom->DebugDataVisible;
IsVisible = toCopyFrom->IsVisible;
IsDebugObject = toCopyFrom->IsDebugObject;
if (newManager)
SceneManager = newManager;
else
SceneManager = toCopyFrom->SceneManager;
// clone children
ISceneNodeList::Iterator it = toCopyFrom->Children.begin();
for (; it != toCopyFrom->Children.end(); ++it)
(*it)->clone(this, newManager);
// clone animators
ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin();
for (; ait != toCopyFrom->Animators.end(); ++ait)
{
ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager);
if (anim)
{
addAnimator(anim);
anim->drop();
}
}
}
void setSceneManager(ISceneManager* newManager)
{
SceneManager = newManager;
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->setSceneManager(newManager);
}
core::stringc Name;
core::matrix4 AbsoluteTransformation;
core::vector3df RelativeTranslation;
core::vector3df RelativeRotation;
core::vector3df RelativeScale;
ISceneNode* Parent;
core::list<ISceneNode*> Children;
core::list<ISceneNodeAnimator*> Animators;
ISceneManager* SceneManager;
ITriangleSelector* TriangleSelector;
s32 ID;
u32 AutomaticCullingState;
u32 DebugDataVisible;
bool IsVisible;
bool IsDebugObject;
};
} // end namespace scene
} // end namespace irr
#endif
ECullingTypes.h
EDebugSceneTypes.h
ESceneNodeTypes.h
IAttributeExchangingObject.h
IAttributes.h
ISceneNodeAnimator.h
ITriangleSelector.h
SMaterial.h
aabbox3d.h
irr::IReferenceCounted::drop
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.h:116
irr::IReferenceCounted::grab
void grab() const
Grabs the object. Increments the reference counter by one.
Definition IReferenceCounted.h:86
irr::core::CMatrix4::setScale
CMatrix4< T > & setScale(const vector3d< T > &scale)
Set Scale.
Definition matrix4.h:775
irr::core::CMatrix4::setRotationDegrees
CMatrix4< T > & setRotationDegrees(const vector3d< T > &rotation)
Make a rotation matrix from Euler angles. The 4th row and column are unmodified.
Definition matrix4.h:813
irr::core::CMatrix4::setTranslation
CMatrix4< T > & setTranslation(const vector3d< T > &translation)
Set the translation of the current matrix. Will erase any previous values.
Definition matrix4.h:751
irr::core::aabbox3d
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.h:22
irr::core::list
Doubly linked list template.
Definition irrList.h:21
irr::core::list::end
Iterator end()
Gets end node.
Definition irrList.h:273
irr::core::list::begin
Iterator begin()
Gets first node.
Definition irrList.h:257
irr::io::IAttributeExchangingObject
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.h:52
irr::io::IAttributes
Provides a generic interface for attributes and their values and the possiblity to serialize them.
Definition IAttributes.h:42
irr::io::IAttributes::addString
virtual void addString(const c8 *attributeName, const c8 *value)=0
Adds an attribute as string.
irr::io::IAttributes::getAttributeAsBool
virtual bool getAttributeAsBool(const c8 *attributeName)=0
irr::io::IAttributes::addBool
virtual void addBool(const c8 *attributeName, bool value)=0
Adds an attribute as bool.
irr::io::IAttributes::getAttributeAsString
virtual core::stringc getAttributeAsString(const c8 *attributeName)=0
irr::io::IAttributes::getAttributeAsVector3d
virtual core::vector3df getAttributeAsVector3d(const c8 *attributeName)=0
irr::io::IAttributes::getAttributeAsInt
virtual s32 getAttributeAsInt(const c8 *attributeName) const =0
irr::io::IAttributes::getAttributeAsEnumeration
virtual const c8 * getAttributeAsEnumeration(const c8 *attributeName)=0
irr::io::IAttributes::addVector3d
virtual void addVector3d(const c8 *attributeName, core::vector3df value)=0
Adds an attribute as 3d vector.
irr::io::IAttributes::addInt
virtual void addInt(const c8 *attributeName, s32 value)=0
Adds an attribute as integer.
irr::scene::ISceneManager
The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.
Definition ISceneManager.h:151
irr::scene::ISceneNodeAnimator
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.h:31
irr::scene::ISceneNodeAnimator::createClone
virtual ISceneNodeAnimator * createClone(ISceneNode *node, ISceneManager *newManager=0)=0
Creates a clone of this animator.
irr::scene::ISceneNodeAnimator::animateNode
virtual void animateNode(ISceneNode *node, u32 timeMs)=0
Animates a scene node.
irr::scene::ISceneNode
Scene node interface.
Definition ISceneNode.h:41
irr::scene::ISceneNode::ID
s32 ID
ID of the node.
Definition ISceneNode.h:838
irr::scene::ISceneNode::cloneMembers
void cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)
A clone function for the ISceneNode members.
Definition ISceneNode.h:757
irr::scene::ISceneNode::SceneManager
ISceneManager * SceneManager
Pointer to the scene manager.
Definition ISceneNode.h:832
irr::scene::ISceneNode::getAutomaticCulling
u32 getAutomaticCulling() const
Gets the automatic culling state.
Definition ISceneNode.h:542
irr::scene::ISceneNode::AutomaticCullingState
u32 AutomaticCullingState
Automatic culling state.
Definition ISceneNode.h:841
irr::scene::ISceneNode::getAbsolutePosition
virtual core::vector3df getAbsolutePosition() const
Gets the absolute position of the node in world coordinates.
Definition ISceneNode.h:522
irr::scene::ISceneNode::setMaterialTexture
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.
Definition ISceneNode.h:436
irr::scene::ISceneNode::addAnimator
virtual void addAnimator(ISceneNodeAnimator *animator)
Adds an animator which should animate this node.
Definition ISceneNode.h:348
irr::scene::ISceneNode::Parent
ISceneNode * Parent
Pointer to the parent.
Definition ISceneNode.h:823
irr::scene::ISceneNode::getID
virtual s32 getID() const
Get the id of the scene node.
Definition ISceneNode.h:261
irr::scene::ISceneNode::getChildren
const core::list< ISceneNode * > & getChildren() const
Returns a const reference to the list of all children.
Definition ISceneNode.h:588
irr::scene::ISceneNode::Children
core::list< ISceneNode * > Children
List of all children of this node.
Definition ISceneNode.h:826
irr::scene::ISceneNode::setScale
virtual void setScale(const core::vector3df &scale)
Sets the relative scale of the scene node.
Definition ISceneNode.h:468
irr::scene::ISceneNode::RelativeTranslation
core::vector3df RelativeTranslation
Relative translation of the scene node.
Definition ISceneNode.h:814
irr::scene::ISceneNode::getAbsoluteTransformation
virtual const core::matrix4 & getAbsoluteTransformation() const
Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
Definition ISceneNode.h:193
irr::scene::ISceneNode::setName
virtual void setName(const core::stringc &name)
Sets the name of the node.
Definition ISceneNode.h:159
irr::scene::ISceneNode::setPosition
virtual void setPosition(const core::vector3df &newpos)
Sets the position of the node relative to its parent.
Definition ISceneNode.h:507
irr::scene::ISceneNode::DebugDataVisible
u32 DebugDataVisible
Flag if debug data should be drawn, such as Bounding Boxes.
Definition ISceneNode.h:844
irr::scene::ISceneNode::Name
core::stringc Name
Name of the scene node.
Definition ISceneNode.h:808
irr::scene::ISceneNode::getScale
virtual const core::vector3df & getScale() const
Gets the scale of the scene node relative to its parent.
Definition ISceneNode.h:460
irr::scene::ISceneNode::setMaterialFlag
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
Sets all material flags at once to a new value.
Definition ISceneNode.h:425
irr::scene::ISceneNode::removeAnimators
virtual void removeAnimators()
Removes all animators from this scene node.
Definition ISceneNode.h:388
irr::scene::ISceneNode::getParent
scene::ISceneNode * getParent() const
Returns the parent of this scene node.
Definition ISceneNode.h:666
irr::scene::ISceneNode::setVisible
virtual void setVisible(bool isVisible)
Sets if the node should be visible or not.
Definition ISceneNode.h:252
irr::scene::ISceneNode::remove
virtual void remove()
Removes this scene node from the scene.
Definition ISceneNode.h:339
irr::scene::ISceneNode::setMaterialType
void setMaterialType(video::E_MATERIAL_TYPE newType)
Sets the material type of all materials in this scene node to a new material type.
Definition ISceneNode.h:448
irr::scene::ISceneNode::isDebugObject
bool isDebugObject() const
Returns if this scene node is a debug object.
Definition ISceneNode.h:579
irr::scene::ISceneNode::~ISceneNode
virtual ~ISceneNode()
Destructor.
Definition ISceneNode.h:62
irr::scene::ISceneNode::serializeAttributes
virtual void serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const
Writes attributes of the scene node.
Definition ISceneNode.h:687
irr::scene::ISceneNode::getName
virtual const c8 * getName() const
Returns the name of the node.
Definition ISceneNode.h:143
irr::scene::ISceneNode::getType
virtual ESCENE_NODE_TYPE getType() const
Returns type of the scene node.
Definition ISceneNode.h:674
irr::scene::ISceneNode::removeAll
virtual void removeAll()
Removes all children of this scene node.
Definition ISceneNode.h:323
irr::scene::ISceneNode::isTrulyVisible
virtual bool isTrulyVisible() const
Check whether the node is truly visible, taking into accounts its parents' visibility.
Definition ISceneNode.h:235
irr::scene::ISceneNode::setSceneManager
void setSceneManager(ISceneManager *newManager)
Definition ISceneNode.h:798
irr::scene::ISceneNode::setParent
virtual void setParent(ISceneNode *newParent)
Changes the parent of the scene node.
Definition ISceneNode.h:596
irr::scene::ISceneNode::getTransformedBoundingBox
virtual const core::aabbox3d< f32 > getTransformedBoundingBox() const
Get the axis aligned, transformed and animated absolute bounding box of this node.
Definition ISceneNode.h:178
irr::scene::ISceneNode::deserializeAttributes
virtual void deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)
Reads attributes of the scene node.
Definition ISceneNode.h:712
irr::scene::ISceneNode::setAutomaticCulling
void setAutomaticCulling(u32 state)
Enables or disables automatic culling based on the bounding box.
Definition ISceneNode.h:534
irr::scene::ISceneNode::getSceneManager
virtual ISceneManager * getSceneManager(void) const
Retrieve the scene manager for this node.
Definition ISceneNode.h:748
irr::scene::ISceneNode::RelativeScale
core::vector3df RelativeScale
Relative scale of the scene node.
Definition ISceneNode.h:820
irr::scene::ISceneNode::setIsDebugObject
void setIsDebugObject(bool debugObject)
Sets if this scene node is a debug object.
Definition ISceneNode.h:569
irr::scene::ISceneNode::Animators
core::list< ISceneNodeAnimator * > Animators
List of all animator nodes.
Definition ISceneNode.h:829
irr::scene::ISceneNode::setName
virtual void setName(const c8 *name)
Sets the name of the node.
Definition ISceneNode.h:151
irr::scene::ISceneNode::removeChild
virtual bool removeChild(ISceneNode *child)
Removes a child from this scene node.
Definition ISceneNode.h:302
irr::scene::ISceneNode::RelativeRotation
core::vector3df RelativeRotation
Relative rotation of the scene node.
Definition ISceneNode.h:817
irr::scene::ISceneNode::setTriangleSelector
virtual void setTriangleSelector(ITriangleSelector *selector)
Sets the triangle selector of the scene node.
Definition ISceneNode.h:635
irr::scene::ISceneNode::getMaterialCount
virtual u32 getMaterialCount() const
Get amount of materials used by this scene node.
Definition ISceneNode.h:414
irr::scene::ISceneNode::IsDebugObject
bool IsDebugObject
Is debug object?
Definition ISceneNode.h:850
irr::scene::ISceneNode::getBoundingBox
virtual const core::aabbox3d< f32 > & getBoundingBox() const =0
Get the axis aligned, not transformed bounding box of this node.
irr::scene::ISceneNode::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))
Constructor.
Definition ISceneNode.h:45
irr::scene::ISceneNode::isVisible
virtual bool isVisible() const
Returns whether the node should be visible (if all of its parents are visible).
Definition ISceneNode.h:226
irr::scene::ISceneNode::getMaterial
virtual video::SMaterial & getMaterial(u32 num)
Returns the material based on the zero based index i.
Definition ISceneNode.h:406
irr::scene::ISceneNode::IsVisible
bool IsVisible
Is the node visible?
Definition ISceneNode.h:847
irr::scene::ISceneNode::removeAnimator
virtual void removeAnimator(ISceneNodeAnimator *animator)
Removes an animator from this scene node.
Definition ISceneNode.h:370
irr::scene::ISceneNode::AbsoluteTransformation
core::matrix4 AbsoluteTransformation
Absolute transformation of the node.
Definition ISceneNode.h:811
irr::scene::ISceneNode::getRelativeTransformation
virtual core::matrix4 getRelativeTransformation() const
Returns the relative transformation of the scene node.
Definition ISceneNode.h:204
irr::scene::ISceneNode::OnRegisterSceneNode
virtual void OnRegisterSceneNode()
This method is called just before the rendering process of the whole scene.
Definition ISceneNode.h:91
irr::scene::ISceneNode::getPosition
virtual const core::vector3df & getPosition() const
Gets the position of the node relative to its parent.
Definition ISceneNode.h:498
irr::scene::ISceneNode::addChild
virtual void addChild(ISceneNode *child)
Adds a child to this scene node.
Definition ISceneNode.h:280
irr::scene::ISceneNode::isDebugDataVisible
u32 isDebugDataVisible() const
Returns if debug data like bounding boxes are drawn.
Definition ISceneNode.h:560
irr::scene::ISceneNode::getAnimators
const core::list< ISceneNodeAnimator * > & getAnimators() const
Get a list of all scene node animators.
Definition ISceneNode.h:360
irr::scene::ISceneNode::TriangleSelector
ITriangleSelector * TriangleSelector
Pointer to the triangle selector.
Definition ISceneNode.h:835
irr::scene::ISceneNode::getTriangleSelector
virtual ITriangleSelector * getTriangleSelector() const
Returns the triangle selector attached to this scene node.
Definition ISceneNode.h:620
irr::scene::ISceneNode::setDebugDataVisible
virtual void setDebugDataVisible(u32 state)
Sets if debug data like bounding boxes should be drawn.
Definition ISceneNode.h:552
irr::scene::ISceneNode::clone
virtual ISceneNode * clone(ISceneNode *newParent=0, ISceneManager *newManager=0)
Creates a clone of this scene node and its children.
Definition ISceneNode.h:741
irr::scene::ISceneNode::setRotation
virtual void setRotation(const core::vector3df &rotation)
Sets the rotation of the node relative to its parent.
Definition ISceneNode.h:488
irr::scene::ISceneNode::getRotation
virtual const core::vector3df & getRotation() const
Gets the rotation of the node relative to its parent.
Definition ISceneNode.h:479
irr::scene::ISceneNode::setID
virtual void setID(s32 id)
Sets the id of the scene node.
Definition ISceneNode.h:270
irr::scene::ISceneNode::updateAbsolutePosition
virtual void updateAbsolutePosition()
Updates the absolute position based on the relative and the parents position.
Definition ISceneNode.h:652
irr::scene::ISceneNode::OnAnimate
virtual void OnAnimate(u32 timeMs)
OnAnimate() is called just before rendering the whole scene.
Definition ISceneNode.h:108
irr::scene::ISceneNode::render
virtual void render()=0
Renders the node.
irr::scene::ITriangleSelector
Interface to return triangles with specific properties.
Definition ITriangleSelector.h:29
irr::video::ITexture
Interface of a Video Driver dependent Texture.
Definition ITexture.h:99
irr::video::SMaterial
Struct for holding parameters for a material renderer.
Definition SMaterial.h:227
irr::video::SMaterial::setTexture
void setTexture(u32 i, ITexture *tex)
Sets the i-th texture.
Definition SMaterial.h:482
irr::video::SMaterial::setFlag
void setFlag(E_MATERIAL_FLAG flag, bool value)
Sets the Material flag to the given value.
Definition SMaterial.h:492
irr::video::SMaterial::MaterialType
E_MATERIAL_TYPE MaterialType
Type of the material. Specifies how everything is blended together.
Definition SMaterial.h:300
irrList.h
irrString.h
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
Defines a small statement to work around a microsoft compiler bug.
Definition irrTypes.h:207
matrix4.h
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::core::matrix4
CMatrix4< f32 > matrix4
Typedef for f32 matrix.
Definition matrix4.h:2235
irr::core::stringc
string< c8 > stringc
Typedef for character strings.
Definition irrString.h:1358
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr::scene::ISceneNodeAnimatorList
core::list< ISceneNodeAnimator * > ISceneNodeAnimatorList
Typedef for list of scene node animators.
Definition ISceneNode.h:30
irr::scene::EDS_OFF
@ EDS_OFF
No Debug Data ( Default ).
Definition EDebugSceneTypes.h:17
irr::scene::ISceneNodeList
core::list< ISceneNode * > ISceneNodeList
Typedef for list of scene nodes.
Definition ISceneNode.h:28
irr::scene::EAC_BOX
@ EAC_BOX
Definition ECullingTypes.h:19
irr::scene::ESCENE_NODE_TYPE
ESCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
Definition ESceneNodeTypes.h:20
irr::scene::ESNT_UNKNOWN
@ ESNT_UNKNOWN
Unknown scene node.
Definition ESceneNodeTypes.h:93
irr::scene::AutomaticCullingNames
const c8 *const AutomaticCullingNames[]
Names for culling type.
Definition ECullingTypes.h:26
irr::video::IdentityMaterial
IRRLICHT_API SMaterial IdentityMaterial
global const identity Material
irr::video::E_MATERIAL_FLAG
E_MATERIAL_FLAG
Material flags.
Definition EMaterialFlags.h:15
irr::video::E_MATERIAL_TYPE
E_MATERIAL_TYPE
Abstracted and easy to use fixed function/programmable pipeline material modes.
Definition EMaterialTypes.h:15
irr::video::MATERIAL_MAX_TEXTURES
const u32 MATERIAL_MAX_TEXTURES
Maximum number of texture an SMaterial can have.
Definition SMaterial.h:223
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::c8
char c8
8 bit character variable.
Definition irrTypes.h:31
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
irr::io::SAttributeReadWriteOptions
struct holding data describing options
Definition IAttributeExchangingObject.h:35
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0