Commit 82fc088f authored by hybrid's avatar hybrid

Add typedefs for better readability.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2782 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7713cdda
...@@ -24,6 +24,11 @@ namespace scene ...@@ -24,6 +24,11 @@ namespace scene
{ {
class ISceneManager; class ISceneManager;
//! Typedef for list of scene nodes
typedef core::list<ISceneNode*> ISceneNodeList;
//! Typedef for list of scene node animators
typedef core::list<ISceneNodeAnimator*> ISceneNodeAnimatorList;
//! Scene node interface. //! Scene node interface.
/** A scene node is a node in the hierarchical scene graph. Every scene /** A scene node is a node in the hierarchical scene graph. Every scene
node may have children, which are also scene nodes. Children move node may have children, which are also scene nodes. Children move
...@@ -60,7 +65,7 @@ namespace scene ...@@ -60,7 +65,7 @@ namespace scene
removeAll(); removeAll();
// delete all animators // delete all animators
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin(); ISceneNodeAnimatorList::Iterator ait = Animators.begin();
for (; ait != Animators.end(); ++ait) for (; ait != Animators.end(); ++ait)
(*ait)->drop(); (*ait)->drop();
...@@ -87,7 +92,7 @@ namespace scene ...@@ -87,7 +92,7 @@ namespace scene
{ {
if (IsVisible) if (IsVisible)
{ {
core::list<ISceneNode*>::Iterator it = Children.begin(); ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it) for (; it != Children.end(); ++it)
(*it)->OnRegisterSceneNode(); (*it)->OnRegisterSceneNode();
} }
...@@ -106,7 +111,7 @@ namespace scene ...@@ -106,7 +111,7 @@ namespace scene
{ {
// animate this node with all animators // animate this node with all animators
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin(); ISceneNodeAnimatorList::Iterator ait = Animators.begin();
while (ait != Animators.end()) while (ait != Animators.end())
{ {
// continue to the next node before calling animateNode() // continue to the next node before calling animateNode()
...@@ -122,7 +127,7 @@ namespace scene ...@@ -122,7 +127,7 @@ namespace scene
// perform the post render process on all children // perform the post render process on all children
core::list<ISceneNode*>::Iterator it = Children.begin(); ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it) for (; it != Children.end(); ++it)
(*it)->OnAnimate(timeMs); (*it)->OnAnimate(timeMs);
} }
...@@ -289,7 +294,7 @@ namespace scene ...@@ -289,7 +294,7 @@ namespace scene
e.g. because it couldn't be found in the children list. */ e.g. because it couldn't be found in the children list. */
virtual bool removeChild(ISceneNode* child) virtual bool removeChild(ISceneNode* child)
{ {
core::list<ISceneNode*>::Iterator it = Children.begin(); ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it) for (; it != Children.end(); ++it)
if ((*it) == child) if ((*it) == child)
{ {
...@@ -307,7 +312,7 @@ namespace scene ...@@ -307,7 +312,7 @@ namespace scene
//! Removes all children of this scene node //! Removes all children of this scene node
virtual void removeAll() virtual void removeAll()
{ {
core::list<ISceneNode*>::Iterator it = Children.begin(); ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it) for (; it != Children.end(); ++it)
{ {
(*it)->Parent = 0; (*it)->Parent = 0;
...@@ -350,7 +355,7 @@ namespace scene ...@@ -350,7 +355,7 @@ namespace scene
/** \param animator A pointer to the animator to be deleted. */ /** \param animator A pointer to the animator to be deleted. */
virtual void removeAnimator(ISceneNodeAnimator* animator) virtual void removeAnimator(ISceneNodeAnimator* animator)
{ {
core::list<ISceneNodeAnimator*>::Iterator it = Animators.begin(); ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it) for (; it != Animators.end(); ++it)
if ((*it) == animator) if ((*it) == animator)
{ {
...@@ -364,7 +369,7 @@ namespace scene ...@@ -364,7 +369,7 @@ namespace scene
//! Removes all animators from this scene node. //! Removes all animators from this scene node.
virtual void removeAnimators() virtual void removeAnimators()
{ {
core::list<ISceneNodeAnimator*>::Iterator it = Animators.begin(); ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it) for (; it != Animators.end(); ++it)
(*it)->drop(); (*it)->drop();
...@@ -744,13 +749,13 @@ namespace scene ...@@ -744,13 +749,13 @@ namespace scene
// clone children // clone children
core::list<ISceneNode*>::Iterator it = toCopyFrom->Children.begin(); ISceneNodeList::Iterator it = toCopyFrom->Children.begin();
for (; it != toCopyFrom->Children.end(); ++it) for (; it != toCopyFrom->Children.end(); ++it)
(*it)->clone(this, newManager); (*it)->clone(this, newManager);
// clone animators // clone animators
core::list<ISceneNodeAnimator*>::Iterator ait = toCopyFrom->Animators.begin(); ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin();
for (; ait != toCopyFrom->Animators.end(); ++ait) for (; ait != toCopyFrom->Animators.end(); ++ait)
{ {
ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager); ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager);
...@@ -768,7 +773,7 @@ namespace scene ...@@ -768,7 +773,7 @@ namespace scene
{ {
SceneManager = newManager; SceneManager = newManager;
core::list<ISceneNode*>::Iterator it = Children.begin(); ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it) for (; it != Children.end(); ++it)
(*it)->setSceneManager(newManager); (*it)->setSceneManager(newManager);
} }
...@@ -819,6 +824,7 @@ namespace scene ...@@ -819,6 +824,7 @@ namespace scene
bool IsDebugObject; bool IsDebugObject;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment