diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-04-20 19:06:46 +0400 |
commit | 874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch) | |
tree | 5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/SceneGraph/SG_Spatial.cpp | |
parent | 7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff) | |
parent | c5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/SceneGraph/SG_Spatial.cpp')
-rw-r--r-- | source/gameengine/SceneGraph/SG_Spatial.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index 99aeb3e72ee..2f3176816c6 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -55,7 +55,8 @@ SG_Spatial( m_parent_relation (NULL), m_bbox(MT_Point3(-1.0, -1.0, -1.0), MT_Point3(1.0, 1.0, 1.0)), - m_radius(1.0) + m_radius(1.0), + m_modified(true) { } @@ -101,6 +102,7 @@ SetParentRelation( ){ delete (m_parent_relation); m_parent_relation = relation; + m_modified = true; } @@ -114,7 +116,8 @@ SetParentRelation( SG_Spatial:: UpdateSpatialData( const SG_Spatial *parent, - double time + double time, + bool& parentUpdated ){ bool bComputesWorldTransform = false; @@ -135,14 +138,14 @@ UpdateSpatialData( // our world coordinates. if (!bComputesWorldTransform) - bComputesWorldTransform = ComputeWorldTransforms(parent); + bComputesWorldTransform = ComputeWorldTransforms(parent, parentUpdated); return bComputesWorldTransform; } -bool SG_Spatial::ComputeWorldTransforms(const SG_Spatial *parent) +bool SG_Spatial::ComputeWorldTransforms(const SG_Spatial *parent, bool& parentUpdated) { - return m_parent_relation->UpdateChildCoordinates(this,parent); + return m_parent_relation->UpdateChildCoordinates(this,parent,parentUpdated); } /** @@ -166,6 +169,7 @@ RelativeTranslate( m_localPosition += trans; } } + m_modified = true; } void @@ -174,6 +178,7 @@ SetLocalPosition( const MT_Point3& trans ){ m_localPosition = trans; + m_modified = true; } void @@ -194,6 +199,7 @@ RelativeScale( const MT_Vector3& scale ){ m_localScaling = m_localScaling * scale; + m_modified = true; } void @@ -202,6 +208,7 @@ SetLocalScale( const MT_Vector3& scale ){ m_localScaling = scale; + m_modified = true; } @@ -229,6 +236,7 @@ RelativeRotate( rot : (GetWorldOrientation().inverse() * rot * GetWorldOrientation())); + m_modified = true; } void @@ -236,6 +244,7 @@ SG_Spatial:: SetLocalOrientation(const MT_Matrix3x3& rot) { m_localRotation = rot; + m_modified = true; } |