From 2365c64014b3e067bb212b2061f1d14c1f944090 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 1 Sep 2011 02:12:53 +0000 Subject: whitespace bge edits --- source/gameengine/SceneGraph/SG_BBox.cpp | 4 ++-- source/gameengine/SceneGraph/SG_Spatial.cpp | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'source/gameengine/SceneGraph') diff --git a/source/gameengine/SceneGraph/SG_BBox.cpp b/source/gameengine/SceneGraph/SG_BBox.cpp index b5618ebbf03..01107557481 100644 --- a/source/gameengine/SceneGraph/SG_BBox.cpp +++ b/source/gameengine/SceneGraph/SG_BBox.cpp @@ -142,8 +142,8 @@ SG_BBox SG_BBox::transform(const MT_Transform &world) const bool SG_BBox::inside(const MT_Point3 &point) const { return point[0] >= m_min[0] && point[0] <= m_max[0] && - point[1] >= m_min[1] && point[1] <= m_max[1] && - point[2] >= m_min[2] && point[2] <= m_max[2]; + point[1] >= m_min[1] && point[1] <= m_max[1] && + point[2] >= m_min[2] && point[2] <= m_max[2]; } bool SG_BBox::inside(const SG_BBox& other) const diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index ca778d164c8..94b8584051e 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -109,18 +109,17 @@ SetParentRelation( */ - bool + bool SG_Spatial:: UpdateSpatialData( - const SG_Spatial *parent, - double time, - bool& parentUpdated + const SG_Spatial *parent, + double time, + bool& parentUpdated ){ - - bool bComputesWorldTransform = false; + bool bComputesWorldTransform = false; // update spatial controllers - + SGControllerList::iterator cit = GetSGControllerList().begin(); SGControllerList::const_iterator c_end = GetSGControllerList().end(); @@ -131,7 +130,7 @@ UpdateSpatialData( } // If none of the objects updated our values then we ask the - // parent_relation object owned by this class to update + // parent_relation object owned by this class to update // our world coordinates. if (!bComputesWorldTransform) -- cgit v1.2.3 From 0cd5dce245762b3fb3fd195dde3bd9ddaeb48970 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 3 Sep 2011 02:15:49 +0000 Subject: whitespace edits --- source/gameengine/SceneGraph/SG_DList.h | 130 ++++++++++++++-------------- source/gameengine/SceneGraph/SG_IObject.h | 2 +- source/gameengine/SceneGraph/SG_QList.h | 100 ++++++++++----------- source/gameengine/SceneGraph/SG_Spatial.cpp | 2 +- 4 files changed, 117 insertions(+), 117 deletions(-) (limited to 'source/gameengine/SceneGraph') diff --git a/source/gameengine/SceneGraph/SG_DList.h b/source/gameengine/SceneGraph/SG_DList.h index b82e51e0d2f..9e7e514b27a 100644 --- a/source/gameengine/SceneGraph/SG_DList.h +++ b/source/gameengine/SceneGraph/SG_DList.h @@ -134,88 +134,88 @@ public: } }; - SG_DList() - { - m_flink = m_blink = this; - } + SG_DList() + { + m_flink = m_blink = this; + } SG_DList(const SG_DList& other) { - m_flink = m_blink = this; + m_flink = m_blink = this; } - virtual ~SG_DList() - { + virtual ~SG_DList() + { Delink(); - } + } - inline bool Empty() // Check for empty queue - { - return ( m_flink == this ); - } - bool AddBack( SG_DList *item ) // Add to the back - { + inline bool Empty() // Check for empty queue + { + return ( m_flink == this ); + } + bool AddBack( SG_DList *item ) // Add to the back + { if (!item->Empty()) return false; - item->m_blink = m_blink; - item->m_flink = this; - m_blink->m_flink = item; - m_blink = item; + item->m_blink = m_blink; + item->m_flink = this; + m_blink->m_flink = item; + m_blink = item; return true; - } - bool AddFront( SG_DList *item ) // Add to the back - { + } + bool AddFront( SG_DList *item ) // Add to the back + { if (!item->Empty()) return false; - item->m_flink = m_flink; - item->m_blink = this; - m_flink->m_blink = item; - m_flink = item; + item->m_flink = m_flink; + item->m_blink = this; + m_flink->m_blink = item; + m_flink = item; return true; - } - SG_DList *Remove() // Remove from the front - { - if (Empty()) - { - return NULL; - } - SG_DList* item = m_flink; - m_flink = item->m_flink; - m_flink->m_blink = this; - item->m_flink = item->m_blink = item; - return item; - } - bool Delink() // Remove from the middle - { + } + SG_DList *Remove() // Remove from the front + { + if (Empty()) + { + return NULL; + } + SG_DList* item = m_flink; + m_flink = item->m_flink; + m_flink->m_blink = this; + item->m_flink = item->m_blink = item; + return item; + } + bool Delink() // Remove from the middle + { if (Empty()) return false; m_blink->m_flink = m_flink; m_flink->m_blink = m_blink; m_flink = m_blink = this; return true; - } - inline SG_DList *Peek() // Look at front without removing - { - return m_flink; - } - inline SG_DList *Back() // Look at front without removing - { - return m_blink; - } - inline SG_DList *Self() - { - return this; - } - inline const SG_DList *Peek() const // Look at front without removing - { - return (const SG_DList*)m_flink; - } - inline const SG_DList *Back() const // Look at front without removing - { - return (const SG_DList*)m_blink; - } - inline const SG_DList *Self() const - { - return this; - } + } + inline SG_DList *Peek() // Look at front without removing + { + return m_flink; + } + inline SG_DList *Back() // Look at front without removing + { + return m_blink; + } + inline SG_DList *Self() + { + return this; + } + inline const SG_DList *Peek() const // Look at front without removing + { + return (const SG_DList*)m_flink; + } + inline const SG_DList *Back() const // Look at front without removing + { + return (const SG_DList*)m_blink; + } + inline const SG_DList *Self() const + { + return this; + } #ifdef WITH_CXX_GUARDEDALLOC diff --git a/source/gameengine/SceneGraph/SG_IObject.h b/source/gameengine/SceneGraph/SG_IObject.h index c42935bc487..8c0159fe8d4 100644 --- a/source/gameengine/SceneGraph/SG_IObject.h +++ b/source/gameengine/SceneGraph/SG_IObject.h @@ -194,7 +194,7 @@ public: /** * Clear the array of pointers to controllers associated with * this node. This does not delete the controllers themselves! - * This should be used very carefully to avoid memory + * This should be used very carefully to avoid memory * leaks. */ diff --git a/source/gameengine/SceneGraph/SG_QList.h b/source/gameengine/SceneGraph/SG_QList.h index de79c35821e..eb404b1a5a5 100644 --- a/source/gameengine/SceneGraph/SG_QList.h +++ b/source/gameengine/SceneGraph/SG_QList.h @@ -91,73 +91,73 @@ public: }; SG_QList() : SG_DList() - { - m_fqlink = m_bqlink = this; - } + { + m_fqlink = m_bqlink = this; + } SG_QList(const SG_QList& other) : SG_DList() { - m_fqlink = m_bqlink = this; + m_fqlink = m_bqlink = this; } - virtual ~SG_QList() - { + virtual ~SG_QList() + { QDelink(); - } + } - inline bool QEmpty() // Check for empty queue - { - return ( m_fqlink == this ); - } - bool QAddBack( SG_QList *item ) // Add to the back - { + inline bool QEmpty() // Check for empty queue + { + return ( m_fqlink == this ); + } + bool QAddBack( SG_QList *item ) // Add to the back + { if (!item->QEmpty()) return false; - item->m_bqlink = m_bqlink; - item->m_fqlink = this; - m_bqlink->m_fqlink = item; - m_bqlink = item; + item->m_bqlink = m_bqlink; + item->m_fqlink = this; + m_bqlink->m_fqlink = item; + m_bqlink = item; return true; - } - bool QAddFront( SG_QList *item ) // Add to the back - { + } + bool QAddFront( SG_QList *item ) // Add to the back + { if (!item->Empty()) return false; - item->m_fqlink = m_fqlink; - item->m_bqlink = this; - m_fqlink->m_bqlink = item; - m_fqlink = item; + item->m_fqlink = m_fqlink; + item->m_bqlink = this; + m_fqlink->m_bqlink = item; + m_fqlink = item; return true; - } - SG_QList *QRemove() // Remove from the front - { - if (QEmpty()) - { - return NULL; - } - SG_QList* item = m_fqlink; - m_fqlink = item->m_fqlink; - m_fqlink->m_bqlink = this; - item->m_fqlink = item->m_bqlink = item; - return item; - } - bool QDelink() // Remove from the middle - { + } + SG_QList *QRemove() // Remove from the front + { + if (QEmpty()) + { + return NULL; + } + SG_QList* item = m_fqlink; + m_fqlink = item->m_fqlink; + m_fqlink->m_bqlink = this; + item->m_fqlink = item->m_bqlink = item; + return item; + } + bool QDelink() // Remove from the middle + { if (QEmpty()) return false; m_bqlink->m_fqlink = m_fqlink; m_fqlink->m_bqlink = m_bqlink; m_fqlink = m_bqlink = this; return true; - } - inline SG_QList *QPeek() // Look at front without removing - { - return m_fqlink; - } - inline SG_QList *QBack() // Look at front without removing - { - return m_bqlink; - } - - + } + inline SG_QList *QPeek() // Look at front without removing + { + return m_fqlink; + } + inline SG_QList *QBack() // Look at front without removing + { + return m_bqlink; + } + + #ifdef WITH_CXX_GUARDEDALLOC public: void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_QList"); } diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index 94b8584051e..09fb7278bfa 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -115,7 +115,7 @@ UpdateSpatialData( const SG_Spatial *parent, double time, bool& parentUpdated -){ + ){ bool bComputesWorldTransform = false; // update spatial controllers -- cgit v1.2.3