#ifndef __I_SCENE_NODE_H_INCLUDED__\r
#define __I_SCENE_NODE_H_INCLUDED__\r
\r
-#include "IAttributeExchangingObject.h"\r
+#include "IReferenceCounted.h"\r
#include "ESceneNodeTypes.h"\r
#include "ECullingTypes.h"\r
#include "EDebugSceneTypes.h"\r
#include "irrString.h"\r
#include "aabbox3d.h"\r
#include "matrix4.h"\r
-#include "irrList.h"\r
#include "IAttributes.h"\r
+#include <list>\r
\r
namespace irr\r
{\r
class ISceneManager;\r
\r
//! Typedef for list of scene nodes\r
- typedef core::list<ISceneNode*> ISceneNodeList;\r
+ typedef std::list<ISceneNode*> ISceneNodeList;\r
\r
//! Scene node interface.\r
/** A scene node is a node in the hierarchical scene graph. Every scene\r
example easily possible to attach a light to a moving car, or to place\r
a walking character on a moving platform on a moving ship.\r
*/\r
- class ISceneNode : virtual public io::IAttributeExchangingObject\r
+ class ISceneNode : virtual public IReferenceCounted\r
{\r
public:\r
\r
{\r
if (IsVisible)\r
{\r
- ISceneNodeList::Iterator it = Children.begin();\r
+ ISceneNodeList::iterator it = Children.begin();\r
for (; it != Children.end(); ++it)\r
(*it)->OnRegisterSceneNode();\r
}\r
\r
// perform the post render process on all children\r
\r
- ISceneNodeList::Iterator it = Children.begin();\r
+ ISceneNodeList::iterator it = Children.begin();\r
for (; it != Children.end(); ++it)\r
(*it)->OnAnimate(timeMs);\r
}\r
e.g. because it couldn't be found in the children list. */\r
virtual bool removeChild(ISceneNode* child)\r
{\r
- ISceneNodeList::Iterator it = Children.begin();\r
+ ISceneNodeList::iterator it = Children.begin();\r
for (; it != Children.end(); ++it)\r
if ((*it) == child)\r
{\r
*/\r
virtual void removeAll()\r
{\r
- ISceneNodeList::Iterator it = Children.begin();\r
+ ISceneNodeList::iterator it = Children.begin();\r
for (; it != Children.end(); ++it)\r
{\r
(*it)->Parent = 0;\r
\r
//! Returns a const reference to the list of all children.\r
/** \return The list of all children of this node. */\r
- const core::list<ISceneNode*>& getChildren() const\r
+ const std::list<ISceneNode*>& getChildren() const\r
{\r
return Children;\r
}\r
return ESNT_UNKNOWN;\r
}\r
\r
-\r
- //! Writes attributes of the scene node.\r
- /** Implement this to expose the attributes of your scene node\r
- for scripting languages, editors, debuggers or xml\r
- serialization purposes.\r
- \param out The attribute container to write into.\r
- \param options Additional options which might influence the\r
- serialization. */\r
- virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const _IRR_OVERRIDE_\r
- {\r
- if (!out)\r
- return;\r
- out->addString("Name", Name.c_str());\r
- out->addInt("Id", ID );\r
-\r
- out->addVector3d("Position", getPosition() );\r
- out->addVector3d("Rotation", getRotation() );\r
- out->addVector3d("Scale", getScale() );\r
-\r
- out->addBool("Visible", IsVisible );\r
- out->addInt("AutomaticCulling", AutomaticCullingState);\r
- out->addInt("DebugDataVisible", DebugDataVisible );\r
- out->addBool("IsDebugObject", IsDebugObject );\r
- }\r
-\r
-\r
- //! Reads attributes of the scene node.\r
- /** Implement this to set the attributes of your scene node for\r
- scripting languages, editors, debuggers or xml deserialization\r
- purposes.\r
- \param in The attribute container to read from.\r
- \param options Additional options which might influence the\r
- deserialization. */\r
- virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) _IRR_OVERRIDE_\r
- {\r
- if (!in)\r
- return;\r
- Name = in->getAttributeAsString("Name", Name);\r
- ID = in->getAttributeAsInt("Id", ID);\r
-\r
- setPosition(in->getAttributeAsVector3d("Position", RelativeTranslation));\r
- setRotation(in->getAttributeAsVector3d("Rotation", RelativeRotation));\r
- setScale(in->getAttributeAsVector3d("Scale", RelativeScale));\r
-\r
- IsVisible = in->getAttributeAsBool("Visible", IsVisible);\r
- if (in->existsAttribute("AutomaticCulling"))\r
- {\r
- s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",\r
- scene::AutomaticCullingNames);\r
- if (tmpState != -1)\r
- AutomaticCullingState = (u32)tmpState;\r
- else\r
- AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");\r
- }\r
-\r
- DebugDataVisible = in->getAttributeAsInt("DebugDataVisible", DebugDataVisible);\r
- IsDebugObject = in->getAttributeAsBool("IsDebugObject", IsDebugObject);\r
-\r
- updateAbsolutePosition();\r
- }\r
-\r
//! Creates a clone of this scene node and its children.\r
/** \param newParent An optional new parent.\r
\param newManager An optional new scene manager.\r
\r
// clone children\r
\r
- ISceneNodeList::Iterator it = toCopyFrom->Children.begin();\r
+ ISceneNodeList::iterator it = toCopyFrom->Children.begin();\r
for (; it != toCopyFrom->Children.end(); ++it)\r
(*it)->clone(this, newManager);\r
}\r
{\r
SceneManager = newManager;\r
\r
- ISceneNodeList::Iterator it = Children.begin();\r
+ ISceneNodeList::iterator it = Children.begin();\r
for (; it != Children.end(); ++it)\r
(*it)->setSceneManager(newManager);\r
}\r
ISceneNode* Parent;\r
\r
//! List of all children of this node\r
- core::list<ISceneNode*> Children;\r
+ std::list<ISceneNode*> Children;\r
\r
//! Pointer to the scene manager\r
ISceneManager* SceneManager;\r