Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-26 16:09:17 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-26 16:09:17 +0400
commit8253d3e0411276ca09995fcbd826abd2c0c8b930 (patch)
tree2d6ad13d242ee41e0ed3f1adcaf9bd12ae63b404 /source/gameengine/Ketsji/KX_PyMath.h
parent3dd18c5c34390316ac95b972aaa989455cf8ead6 (diff)
Python fixes:
Reenabled the setScript/getScript methods for python controller bricks. Set the ray source point to MouseFocusSensor.getRaySource works. Added: Python -> MT_Quaternion MT_Matrix4x4, MT_Matrix3x3, MT_Vector3, MT_Point3 -> Python Correct transform of frustum bound sphere centre point to world coordinates
Diffstat (limited to 'source/gameengine/Ketsji/KX_PyMath.h')
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index 2496fd09635..7fdf207e435 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -56,6 +56,12 @@ MT_Point3 MT_Point3FromPyList(PyObject* pylist);
* Converts a python list to an MT_Vector4
*/
MT_Vector4 MT_Vector4FromPyList(PyObject* pylist);
+
+/**
+ * Converts a python list to an MT_Quaternion
+ */
+MT_Quaternion MT_QuaternionFromPyList(PyObject* pylist);
+
/**
* Converts a python list of lists to an MT_Matrix4x4.
* Any object that supports the sequence protocol will work.
@@ -76,4 +82,25 @@ MT_Matrix3x3 MT_Matrix3x3FromPyObject(PyObject *pymat);
*/
PyObject* PyObjectFromMT_Matrix4x4(const MT_Matrix4x4 &mat);
+/**
+ * Converts an MT_Matrix3x3 to a python object.
+ */
+PyObject* PyObjectFromMT_Matrix3x3(const MT_Matrix3x3 &mat);
+
+/**
+ * Converts an MT_Vector3 to a python object.
+ */
+PyObject* PyObjectFromMT_Vector3(const MT_Vector3 &vec);
+
+/**
+ * Converts an MT_Vector3 to a python object.
+ */
+PyObject* PyObjectFromMT_Point3(const MT_Point3 &pos);
+
+/**
+ * True if the given PyObject can be converted to an MT_Matrix
+ * @param rank = 3 (for MT_Matrix3x3) or 4 (for MT_Matrix4x4)
+ */
+bool PyObject_IsMT_Matrix(PyObject *pymat, unsigned int rank);
+
#endif