Expose Matrix4D::analyse to python

This commit is contained in:
wmayer 2012-06-13 11:02:24 +02:00
parent 750129d04c
commit 11620c4f41
2 changed files with 20 additions and 0 deletions

View File

@ -125,6 +125,14 @@ Get the sub-matrix. The parameter must be in the range [1,4].
</UserDocu>
</Documentation>
</Methode>
<Methode Name="analyze">
<Documentation>
<UserDocu>
analyze() -> string
Analyzes the type of transformation.
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="A11" ReadOnly="false">
<Documentation>
<UserDocu>The matrix elements</UserDocu>

View File

@ -474,6 +474,18 @@ PyObject* MatrixPy::transpose(PyObject * args)
PY_CATCH;
}
PyObject* MatrixPy::analyze(PyObject * args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
PY_TRY {
std::string type = getMatrixPtr()->analyse();
return PyString_FromString(type.c_str());
}
PY_CATCH;
}
Py::Float MatrixPy::getA11(void) const
{
double val = (*this->getMatrixPtr())[0][0];