diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-04-23 16:03:37 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2005-04-23 16:03:37 +0400 |
commit | 10acf20645729d7c06eec1b091a0bf21417d613f (patch) | |
tree | dc4f7e740c63a5a7d8e211325db59e201af29b79 /source/gameengine | |
parent | 32daf2cdc463cfbecc37a098e200edc3ed7b3839 (diff) |
Support reinstancing the physics mesh from Python.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_MeshProxy.cpp | 8 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MeshProxy.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 66306a44aba..b8176c05ec3 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -42,6 +42,7 @@ #include "KX_PolygonMaterial.h" #include "KX_PyMath.h" +#include "KX_ConvertPhysicsObject.h" PyTypeObject KX_MeshProxy::Type = { PyObject_HEAD_INIT(&PyType_Type) @@ -75,6 +76,7 @@ PyMethodDef KX_MeshProxy::Methods[] = { {"getTextureName", (PyCFunction)KX_MeshProxy::sPyGetTextureName,METH_VARARGS}, {"getVertexArrayLength", (PyCFunction)KX_MeshProxy::sPyGetVertexArrayLength,METH_VARARGS}, {"getVertex", (PyCFunction)KX_MeshProxy::sPyGetVertex,METH_VARARGS}, +KX_PYMETHODTABLE(KX_MeshProxy, reinstancePhysicsMesh), //{"getIndexArrayLength", (PyCFunction)KX_MeshProxy::sPyGetIndexArrayLength,METH_VARARGS}, {NULL,NULL} //Sentinel @@ -207,3 +209,9 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* self, return vertexob; } + +KX_PYMETHODDEF_DOC(KX_MeshProxy, reinstancePhysicsMesh, +"Reinstance the physics mesh.") +{ + return PyInt_FromLong(KX_ReInstanceShapeFromMesh(m_meshobj)); +} diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h index d40f8b514d2..6aa832ea224 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.h +++ b/source/gameengine/Ketsji/KX_MeshProxy.h @@ -62,6 +62,7 @@ public: // both take materialid (int) KX_PYMETHOD(KX_MeshProxy,GetVertexArrayLength); KX_PYMETHOD(KX_MeshProxy,GetVertex); + KX_PYMETHOD_DOC(KX_MeshProxy, reinstancePhysicsMesh); }; #endif //__KX_MESHPROXY |