add method multVec to MatrixPy class for better consistency
This commit is contained in:
@@ -67,6 +67,14 @@ Multiply a matrix or vector with this matrix
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="multVec" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
multVec(Vector) -> Vector
|
||||
Compute the transformed vector using the matrix
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="invert">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
@@ -242,4 +250,4 @@ Analyzes the type of transformation.
|
||||
{ return *(getMatrixPtr()); }
|
||||
</ClassDeclarations>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
</GenerateModel>
|
||||
|
||||
@@ -387,6 +387,16 @@ PyObject* MatrixPy::multiply(PyObject * args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::multVec(PyObject * args)
|
||||
{
|
||||
PyObject *obj;
|
||||
if (!PyArg_ParseTuple(args, "O!", &(VectorPy::Type), &obj))
|
||||
return NULL;
|
||||
Base::Vector3d vec(static_cast<VectorPy*>(obj)->value());
|
||||
getMatrixPtr()->multVec(vec, vec);
|
||||
return new VectorPy(new Vector3d(vec));
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::invert(PyObject * args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
|
||||
Reference in New Issue
Block a user