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
{
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.
/** A scene node is a node in the hierarchical scene graph. Every scene
node may have children, which are also scene nodes. Children move
......@@ -60,7 +65,7 @@ namespace scene
removeAll();
// delete all animators
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
ISceneNodeAnimatorList::Iterator ait = Animators.begin();
for (; ait != Animators.end(); ++ait)
(*ait)->drop();
......@@ -87,7 +92,7 @@ namespace scene
{
if (IsVisible)
{
core::list<ISceneNode*>::Iterator it = Children.begin();
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->OnRegisterSceneNode();
}
......@@ -106,7 +111,7 @@ namespace scene
{
// animate this node with all animators
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
ISceneNodeAnimatorList::Iterator ait = Animators.begin();
while (ait != Animators.end())
{
// continue to the next node before calling animateNode()
......@@ -122,7 +127,7 @@ namespace scene
// 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)
(*it)->OnAnimate(timeMs);
}
......@@ -289,7 +294,7 @@ namespace scene
e.g. because it couldn't be found in the children list. */
virtual bool removeChild(ISceneNode* child)
{
core::list<ISceneNode*>::Iterator it = Children.begin();
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
if ((*it) == child)
{
......@@ -307,7 +312,7 @@ namespace scene
//! Removes all children of this scene node
virtual void removeAll()
{
core::list<ISceneNode*>::Iterator it = Children.begin();
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
{
(*it)->Parent = 0;
......@@ -350,7 +355,7 @@ namespace scene
/** \param animator A pointer to the animator to be deleted. */
virtual void removeAnimator(ISceneNodeAnimator* animator)
{
core::list<ISceneNodeAnimator*>::Iterator it = Animators.begin();
ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it)
if ((*it) == animator)
{
......@@ -364,7 +369,7 @@ namespace scene
//! Removes all animators from this scene node.
virtual void removeAnimators()
{
core::list<ISceneNodeAnimator*>::Iterator it = Animators.begin();
ISceneNodeAnimatorList::Iterator it = Animators.begin();
for (; it != Animators.end(); ++it)
(*it)->drop();
......@@ -744,13 +749,13 @@ namespace scene
// clone children
core::list<ISceneNode*>::Iterator it = toCopyFrom->Children.begin();
ISceneNodeList::Iterator it = toCopyFrom->Children.begin();
for (; it != toCopyFrom->Children.end(); ++it)
(*it)->clone(this, newManager);
// clone animators
core::list<ISceneNodeAnimator*>::Iterator ait = toCopyFrom->Animators.begin();
ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin();
for (; ait != toCopyFrom->Animators.end(); ++ait)
{
ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager);
......@@ -768,7 +773,7 @@ namespace scene
{
SceneManager = newManager;
core::list<ISceneNode*>::Iterator it = Children.begin();
ISceneNodeList::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->setSceneManager(newManager);
}
......@@ -819,6 +824,7 @@ namespace scene
bool IsDebugObject;
};
} // end namespace scene
} // 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