]> git.lizzy.rs Git - irrlicht.git/blobdiff - include/ISceneNode.h
Replace std::min in irrArray.h
[irrlicht.git] / include / ISceneNode.h
index 63d1566ba7fff2cf854fac61608363e550a16715..1f8c2c6b5c72dfe27fa37dc26f9e9e68188d5883 100644 (file)
@@ -5,7 +5,7 @@
 #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
@@ -13,8 +13,8 @@
 #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
@@ -24,7 +24,7 @@ namespace scene
        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
@@ -34,7 +34,7 @@ namespace scene
        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
@@ -81,7 +81,7 @@ namespace scene
                {\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
@@ -103,7 +103,7 @@ namespace scene
 \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
@@ -289,7 +289,7 @@ namespace scene
                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
@@ -309,7 +309,7 @@ namespace scene
                */\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
@@ -519,7 +519,7 @@ namespace scene
 \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
@@ -571,67 +571,6 @@ namespace scene
                        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
@@ -672,7 +611,7 @@ namespace scene
 \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
@@ -683,7 +622,7 @@ namespace scene
                {\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
@@ -707,7 +646,7 @@ namespace scene
                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