_new point class and update_

- adds a new point class
  * point/ vector math (p + v = p, p - p = v, etc.)
  * points can be transformed by matrices/quats
  * wraps 'place vector' type vectors that have no magnitude
- wrapped toXXX() methods work correctly
  * toXXX() will NOT wrap data (this is due to the fact that wrapped data cannot be converted)
  * added a 'wrapped' attribute to mathutils classes to determine wether the object is accessing python or blender data
- added the ability to negate vectors/points with "-vec"
  * deprecated vector.negate()
- added the ability to shorhand inverse matrices with "~mat" (tilde)
- conversion between vector/point with toXXX() methods
This commit is contained in:
2005-07-23 13:46:40 +00:00
parent 32255b65df
commit 6a9e7ab3f2
14 changed files with 919 additions and 138 deletions

View File

@@ -39,11 +39,15 @@
#include "matrix.h"
#include "quat.h"
#include "euler.h"
#include "point.h"
#include "Types.h"
PyObject *Mathutils_Init( void );
PyObject *row_vector_multiplication(VectorObject* vec, MatrixObject * mat);
PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject* vec);
PyObject *row_point_multiplication(PointObject* pt, MatrixObject * mat);
PyObject *column_point_multiplication(MatrixObject * mat, PointObject* pt);
PyObject *quat_rotation(PyObject *arg1, PyObject *arg2);
PyObject *M_Mathutils_Rand(PyObject * self, PyObject * args);
PyObject *M_Mathutils_Vector(PyObject * self, PyObject * args);