diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-26 16:06:41 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-26 16:06:41 +0400 |
commit | 3dd18c5c34390316ac95b972aaa989455cf8ead6 (patch) | |
tree | cb5e8fa1804e30838e19d8518ed3e0f0765eb3c8 /source/gameengine/Ketsji/KX_GameObject.h | |
parent | e5cc9abceb5047b934b3ae8c4aac521d7e82fc00 (diff) |
Added an UpdateTransform callback from SceneGraph -> Physics.
Profiling revealed that the SceneGraph updated every physics object, whether it moved or not, even though the physics object was at the right place. This would cause SOLID to go and update its bounding boxes, overlap tests etc.
This callback handles the special case (parented objects) where the physics scene needs to be informed of changes to the scenegraph.
Added Python attributes (mass, parent, visible, position, orientation, scaling) to the KX_GameObject module.
Make KX_GameObject use the KX_PyMath Python <-> Moto conversion.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 41528bd9dd8..2918fb1a3b6 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -415,10 +415,12 @@ public: * Update the physics object transform based upon the current SG_Node * position. */ - void + void UpdateTransform( ); + static void UpdateTransformFunc(SG_IObject* node, void* gameobj, void* scene); + /** * Only update the transform if it's a non-dynamic object */ @@ -572,6 +574,13 @@ public: _getattr( const STR_String& attr ); + + virtual + int + _setattr( + const STR_String& attr, + PyObject *value + ); // _setattr method PyObject* PySetPosition( |