Commit: f12c182a46f88fe2a446a53102687b4de551c430
Author: Ines Almeida
Date:   Mon Jun 16 23:24:03 2014 +0100
https://developer.blender.org/rBf12c182a46f88fe2a446a53102687b4de551c430

Game Engine Scene Graph - whitespace cleanup

===================================================================

M       source/gameengine/SceneGraph/SG_Controller.cpp
M       source/gameengine/SceneGraph/SG_Controller.h
M       source/gameengine/SceneGraph/SG_IObject.cpp
M       source/gameengine/SceneGraph/SG_IObject.h
M       source/gameengine/SceneGraph/SG_Node.cpp
M       source/gameengine/SceneGraph/SG_Node.h
M       source/gameengine/SceneGraph/SG_ParentRelation.h
M       source/gameengine/SceneGraph/SG_Spatial.cpp
M       source/gameengine/SceneGraph/SG_Spatial.h
M       source/gameengine/SceneGraph/SG_Tree.h

===================================================================

diff --git a/source/gameengine/SceneGraph/SG_Controller.cpp 
b/source/gameengine/SceneGraph/SG_Controller.cpp
index 2649424..801f8e8 100644
--- a/source/gameengine/SceneGraph/SG_Controller.cpp
+++ b/source/gameengine/SceneGraph/SG_Controller.cpp
@@ -31,16 +31,12 @@
 
 #include "SG_Controller.h"
 
-       void 
-SG_Controller::
-SetObject(SG_IObject* obj)
+void SG_Controller::SetObject(SG_IObject* obj)
 {
        m_pObject = obj; // no checks yet ?
 }
 
-       void
-SG_Controller::
-ClearObject(
-) {
+void SG_Controller::ClearObject()
+{
        m_pObject = NULL;
 }
diff --git a/source/gameengine/SceneGraph/SG_Controller.h 
b/source/gameengine/SceneGraph/SG_Controller.h
index a173633..cd7d4b1 100644
--- a/source/gameengine/SceneGraph/SG_Controller.h
+++ b/source/gameengine/SceneGraph/SG_Controller.h
@@ -40,45 +40,24 @@
 /**
  * A scenegraph controller
  */
-class SG_Controller 
+class SG_Controller
 {
 public:
-       SG_Controller(
-       ) :
-               m_pObject(NULL) {
-       }
+       SG_Controller():
+               m_pObject(NULL)
+       {}
 
-       virtual 
-       ~SG_Controller(
-       ) {};
+       virtual ~SG_Controller() {}
 
-       virtual 
-               bool
-       Update(
-               double time
-       )=0;
+       virtual bool Update(double time)=0;
 
-       virtual 
-               void 
-       SetObject (
-               SG_IObject* object
-       );
+       virtual void SetObject (SG_IObject* object);
 
-               void
-       ClearObject(
-       );
+       void ClearObject();
 
-       virtual 
-               void
-       SetSimulatedTime(
-               double time
-       )=0;
+       virtual void SetSimulatedTime(double time)=0;
 
-       virtual
-               SG_Controller*
-       GetReplica(
-               class SG_Node* destnode
-       )=0;
+       virtual SG_Controller* GetReplica(class SG_Node* destnode)=0;
 
        /**
         * Hacky way of passing options to specific controllers
@@ -89,12 +68,7 @@ public:
         * \attention necessary because the identity of the controller
         * \attention is lost on the way here.
         */
-       virtual
-               void
-       SetOption(
-               int option,
-               int value
-       )=0;
+       virtual void SetOption(int option, int value)=0;
 
        /**
         * Option-identifiers: SG_CONTR_<controller-type>_<option>. 
@@ -114,7 +88,7 @@ public:
        };
 
 protected:
-       SG_IObject*             m_pObject;
+       SG_IObject* m_pObject;
 
 #ifdef WITH_CXX_GUARDEDALLOC
        MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Controller")
diff --git a/source/gameengine/SceneGraph/SG_IObject.cpp 
b/source/gameengine/SceneGraph/SG_IObject.cpp
index 9ae32a8..6a60ac1 100644
--- a/source/gameengine/SceneGraph/SG_IObject.cpp
+++ b/source/gameengine/SceneGraph/SG_IObject.cpp
@@ -37,12 +37,7 @@
 
 SG_Stage gSG_Stage = SG_STAGE_UNKNOWN;
 
-SG_IObject::
-SG_IObject(
-       void* clientobj,
-       void* clientinfo,
-       SG_Callbacks& callbacks
-): 
+SG_IObject::SG_IObject(void* clientobj, void* clientinfo, SG_Callbacks& 
callbacks):
        SG_QList(),
        m_SGclientObject(clientobj),
        m_SGclientInfo(clientinfo)
@@ -50,10 +45,7 @@ SG_IObject(
        m_callbacks = callbacks;
 }
 
-SG_IObject::
-SG_IObject(
-       const SG_IObject &other
-) :
+SG_IObject::SG_IObject(const SG_IObject &other):
        SG_QList(),
        m_SGclientObject(other.m_SGclientObject),
        m_SGclientInfo(other.m_SGclientInfo),
@@ -62,28 +54,17 @@ SG_IObject(
        //nothing to do
 }
 
-       void 
-SG_IObject::
-AddSGController(
-       SG_Controller* cont
-) {
+void SG_IObject::AddSGController(SG_Controller* cont) {
        m_SGcontrollers.push_back(cont);
 }
 
-       void
-SG_IObject::
-RemoveSGController(
-       SG_Controller* cont
-) {
-       SGControllerList::iterator contit;
-
+void SG_IObject::RemoveSGController(SG_Controller* cont)
+{
        m_SGcontrollers.erase(std::remove(m_SGcontrollers.begin(), 
m_SGcontrollers.end(), cont));
 }
 
-       void
-SG_IObject::
-RemoveAllControllers(
-) { 
+void SG_IObject::RemoveAllControllers()
+{
        m_SGcontrollers.clear(); 
 }
 
@@ -98,9 +79,7 @@ void SG_IObject::SetControllerTime(double time)
 
 /// Needed for replication
 
-
-SG_IObject::
-~SG_IObject()
+SG_IObject::~SG_IObject()
 {
        SGControllerList::iterator contit;
 
diff --git a/source/gameengine/SceneGraph/SG_IObject.h 
b/source/gameengine/SceneGraph/SG_IObject.h
index 2dcf3c6..d271ddd 100644
--- a/source/gameengine/SceneGraph/SG_IObject.h
+++ b/source/gameengine/SceneGraph/SG_IObject.h
@@ -63,7 +63,6 @@ inline void SG_SetActiveStage(SG_Stage stage)
 {
        gSG_Stage = stage;
 }
-       
 
 
 class SG_Controller;
@@ -173,21 +172,14 @@ public:
         * responsibility of this class. It will be deleted when
         * this object is deleted.
         */
-       
-               void
-       AddSGController(
-               SG_Controller* cont
-       );
+       void AddSGController(SG_Controller* cont);
 
        /**
         * Remove a pointer to a controller from this node.
         * This does not delete the controller itself! Be careful to
         * avoid memory leaks.
         */
-               void
-       RemoveSGController(
-               SG_Controller* cont
-       );
+       void RemoveSGController(SG_Controller* cont);
 
        /** 
         * Clear the array of pointers to controllers associated with 
@@ -195,10 +187,7 @@ public:
         * This should be used very carefully to avoid memory
         * leaks.
         */
-       
-               void
-       RemoveAllControllers(
-       ); 
+       void RemoveAllControllers();
 
        /// Needed for replication
 
@@ -279,17 +268,10 @@ public:
  
        void SetControllerTime(double time);
        
-       virtual 
-               void
-       Destruct(
-       ) = 0;
+       virtual void Destruct() = 0;
 
 protected :
-
-               bool
-       ActivateReplicationCallback(
-               SG_IObject *replica
-       )
+       bool ActivateReplicationCallback(SG_IObject *replica)
        {
                if (m_callbacks.m_replicafunc)
                {
@@ -301,9 +283,7 @@ protected :
        }
 
 
-               void
-       ActivateDestructionCallback(
-       )
+       void ActivateDestructionCallback()
        {
                if (m_callbacks.m_destructionfunc)
                {
@@ -317,9 +297,7 @@ protected :
                }
        }
        
-               void
-       ActivateUpdateTransformCallback(
-       )
+       void ActivateUpdateTransformCallback()
        {
                if (m_callbacks.m_updatefunc)
                {
@@ -328,9 +306,7 @@ protected :
                }
        }
 
-               bool
-       ActivateScheduleUpdateCallback(
-       )
+       bool ActivateScheduleUpdateCallback()
        {
                // HACK, this check assumes that the scheduled nodes are put on 
a DList (see SG_Node.h)
                // The early check on Empty() allows up to avoid calling the 
callback function
@@ -343,9 +319,7 @@ protected :
                return false;
        }
 
-               void
-       ActivateRecheduleUpdateCallback(
-       )
+       void ActivateRecheduleUpdateCallback()
        {
                if (m_callbacks.m_reschedulefunc)
                {
diff --git a/source/gameengine/SceneGraph/SG_Node.cpp 
b/source/gameengine/SceneGraph/SG_Node.cpp
index 04d9a30..3e69658 100644
--- a/source/gameengine/SceneGraph/SG_Node.cpp
+++ b/source/gameengine/SceneGraph/SG_Node.cpp
@@ -37,21 +37,14 @@
 using namespace std;
 
 
-SG_Node::SG_Node(
-       void* clientobj,
-       void* clientinfo,
-       SG_Callbacks& callbacks
-
-)
-       : SG_Spatial(clientobj,clientinfo,callbacks),
+SG_Node::SG_Node(void* clientobj, void* clientinfo, SG_Callbacks& callbacks):
+       SG_Spatial(clientobj,clientinfo,callbacks),
        m_SGparent(NULL)
 {
        m_modified = true;
 }
 
-SG_Node::SG_Node(
-       const SG_Node & other
-) :
+SG_Node::SG_Node(const SG_Node & other):
        SG_Spatial(other),
        m_children(other.m_children),
        m_SGparent(other.m_SGparent)
@@ -74,11 +67,8 @@ SG_Node* SG_Node::GetSGReplica()
        return replica;
 }
 
-       void 
-SG_Node::
-ProcessSGReplica(
-       SG_Node** replica
-) {
+void SG_Node::ProcessSGReplica(SG_Node** replica)
+{
        // Apply the replication call back function.
        if (!ActivateReplicationCallback(*replica)) 
        {
@@ -115,10 +105,7 @@ ProcessSGReplica(
        }
 }
 
-
-       void 
-SG_Node::
-Destruct()
+void SG_Node::Destruct()
 {
        // Not entirely sure what Destruct() expects to happen.
        // I think it probably means just to call the DestructionCallback
@@ -142,11 +129,8 @@ Destruct()
        ActivateDestructionCallback();
 }
 
-const 
-       SG_Node *
-SG_Node::
-GetRootSGParent(
-) const {
+const SG_Node* SG_Node::GetRootSGParent() const
+{
        return (m_SGparent ? (const SG_Node*) m_SGparent->GetRootSGParent() : 
(const SG_Node*) this);
 }
 
@@ -156,10 +140,8 @@ bool SG_Node::IsAncessor(const SG_Node* child) const
                (child->m_SGparent == this) ? true : 
IsAncessor(child->m_SGparent);
 }
 
-       void 
-SG_Node::
-DisconnectFromParent(
-) {
+void SG_Node::DisconnectFromParent()
+{
        if (m_SGparent)
        {
                m_SGparent->RemoveChild(this);
@@ -209,7 +191,6 @@ void SG_Node::UpdateWorldData(double time, bool 
parentUpdated)
 
 void SG_Node::SetSimulatedTime(double time,bool recurse)
 {
-
        // update the controllers of this node.
        SetControllerTime(time);
 
@@ -223,5 +204,3 @@ void SG_Node::SetSimulatedTime(double time,bool recurse)
        }
 }
 
-
-
diff --git a/source/gameengine/SceneGraph/SG_Node.h 
b/source/gameengine/SceneGraph/SG_Node.h
index bde64f2..cb2376e 100644
--- a/source/gameengine/SceneGraph/SG_Node.h
+++ b/source/gameengine/SceneGraph/SG_Node.h
@@ -43,19 +43,11 @@ typedef std::vector<SG_Node*> NodeList;
 class SG_Node : public SG_Spatial
 {
 public:
-       SG_Node(
-               void* clientobj,
-               void* clientinfo,
-               SG_Callbacks& callbacks
-       );
-
-       SG_Node(
-               const SG_Node & other
-       );
+       SG_Node(void* clientobj, void* clientinfo, SG_Callbacks& callbacks);
+       SG_Node(const SG_Node & other);
 
        virtual ~SG_Node();
 
-
        /**
         * Add a child to this object. This also informs the child of
         * it's parent.
@@ -63,10 +55,7 @@ public:
         * make a deep copy.
         */
 
-               void
-       AddChild(
-               SG_Node* child
-       );
+       void AddChild(SG_Node* child);
 
        /** 
         * Remove a child node from this object. This just removes the child
@@ -74,26 +63,19 @@ public:
         * This does not inform the child that this node is no longer it's 
parent.
         * If the node was not a child of this object no action is performed.
         */
-
-               void
-       RemoveChild(
-               SG_Node* child
-       );
+       void RemoveChild(SG_Node* child);
 
        /**
         * Return true if the node is the ancestor of child
         */
-               bool
-       IsAncessor(
-               const SG_Node* child
-       ) const;
+       bool IsAncessor(const SG_Node* child) const;
+
        /** 
         * Get the current list of children. Do not use this interface for
         * adding or removing children please use the methods of this class for
         * that.
         * \return a reference to the list of children of this node.
         */
-       
        NodeList& GetSGChildren()
        {
                return this->m_children;
@@ -103,7 +85,6 @@ public:
         * Get the current list of children.
         * \return a const reference to the current list of children of this 
node.
         */
-
        const NodeList& GetSGChildren() const
        {
                return this->m_children;
@@ -112,7 +93,6 @@ public:
        /** 
         * Clear the list of children associated with this node
         */
-
        void ClearSGChildren()
        {
                m_children.clear();
@@ -130,7 +110,6 @@ public:
        /**
         * Se

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to