Base: use NoArgs in MatrixPy
This commit is contained in:
@@ -97,28 +97,28 @@ if it's not a scale matrix.
|
||||
tol : float</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="nullify">
|
||||
<Methode Name="nullify" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>nullify() -> None
|
||||
|
||||
Make this the null matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isNull" Const="true">
|
||||
<Methode Name="isNull" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>isNull() -> bool
|
||||
|
||||
Check if this is the null matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="unity">
|
||||
<Methode Name="unity" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>unity() -> None
|
||||
|
||||
Make this matrix to unity (4D identity matrix).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isUnity" Const="true">
|
||||
<Methode Name="isUnity" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>isUnity() -> bool
|
||||
|
||||
@@ -185,7 +185,7 @@ index : int
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="diagonal" Const="true">
|
||||
<Methode Name="diagonal" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>diagonal() -> Base.Vector
|
||||
|
||||
@@ -252,34 +252,34 @@ Compute the transformed vector using the matrix.
|
||||
vector : Base.Vector</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="invert">
|
||||
<Methode Name="invert" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>invert() -> None
|
||||
|
||||
Compute the inverse matrix in-place, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="inverse" Const="true">
|
||||
<Methode Name="inverse" Const="true" NoArgs="true">
|
||||
<Documentation><UserDocu>inverse() -> Base.Matrix
|
||||
|
||||
Compute the inverse matrix, if possible.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transpose">
|
||||
<Methode Name="transpose" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>transpose() -> None
|
||||
|
||||
Transpose the matrix in-place.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transposed" Const="true">
|
||||
<Methode Name="transposed" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>transposed() -> Base.Matrix
|
||||
|
||||
Returns a transposed copy of this matrix.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="determinant" Const="true">
|
||||
<Methode Name="determinant" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>determinant() -> float
|
||||
|
||||
@@ -309,7 +309,7 @@ dim : int
|
||||
Dimension parameter must be in the range [1,4].</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="analyze" Const="true">
|
||||
<Methode Name="analyze" Const="true" NoArgs="true">
|
||||
<Documentation>
|
||||
<UserDocu>analyze() -> str
|
||||
|
||||
|
||||
@@ -352,11 +352,8 @@ PyObject* MatrixPy::hasScale(PyObject * args)
|
||||
return Py::new_reference_to(mod.callMemberFunction("ScaleType", Py::TupleN(Py::Int(static_cast<int>(type)))));
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::nullify(PyObject * args)
|
||||
PyObject* MatrixPy::nullify()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
getMatrixPtr()->nullify();
|
||||
Py_Return;
|
||||
@@ -364,11 +361,8 @@ PyObject* MatrixPy::nullify(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::isNull(PyObject * args)
|
||||
PyObject* MatrixPy::isNull()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
bool ok = getMatrixPtr()->isNull();
|
||||
return Py::new_reference_to(Py::Boolean(ok));
|
||||
@@ -376,11 +370,8 @@ PyObject* MatrixPy::isNull(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::unity(PyObject * args)
|
||||
PyObject* MatrixPy::unity()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
getMatrixPtr()->setToUnity();
|
||||
Py_Return;
|
||||
@@ -388,11 +379,8 @@ PyObject* MatrixPy::unity(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::isUnity(PyObject * args)
|
||||
PyObject* MatrixPy::isUnity()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
bool ok = getMatrixPtr()->isUnity();
|
||||
return Py::new_reference_to(Py::Boolean(ok));
|
||||
@@ -487,11 +475,8 @@ PyObject* MatrixPy::setRow(PyObject * args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::diagonal(PyObject * args)
|
||||
PyObject* MatrixPy::diagonal()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
Matrix4D* mat = getMatrixPtr();
|
||||
Base::Vector3d v = mat->diagonal();
|
||||
return Py::new_reference_to(Py::Vector(v));
|
||||
@@ -628,11 +613,8 @@ PyObject* MatrixPy::multVec(PyObject * args)
|
||||
return new VectorPy(new Vector3d(vec));
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::invert(PyObject * args)
|
||||
PyObject* MatrixPy::invert()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
if (fabs(getMatrixPtr()->determinant()) > DBL_EPSILON) {
|
||||
getMatrixPtr()->inverseGauss();
|
||||
@@ -646,11 +628,8 @@ PyObject* MatrixPy::invert(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::inverse(PyObject * args)
|
||||
PyObject* MatrixPy::inverse()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
if (fabs(getMatrixPtr()->determinant()) > DBL_EPSILON) {
|
||||
Base::Matrix4D m = *getMatrixPtr();
|
||||
@@ -665,11 +644,8 @@ PyObject* MatrixPy::inverse(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::determinant(PyObject * args)
|
||||
PyObject* MatrixPy::determinant()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
return PyFloat_FromDouble(getMatrixPtr()->determinant());
|
||||
}
|
||||
|
||||
@@ -741,11 +717,8 @@ PyObject* MatrixPy::isOrthogonal(PyObject * args)
|
||||
return Py::new_reference_to(Py::Float(ok ? mult : 0.0));
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::transposed(PyObject * args)
|
||||
PyObject* MatrixPy::transposed()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
Base::Matrix4D m = *getMatrixPtr();
|
||||
m.transpose();
|
||||
@@ -754,11 +727,8 @@ PyObject* MatrixPy::transposed(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::transpose(PyObject * args)
|
||||
PyObject* MatrixPy::transpose()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
getMatrixPtr()->transpose();
|
||||
Py_Return;
|
||||
@@ -766,11 +736,8 @@ PyObject* MatrixPy::transpose(PyObject * args)
|
||||
PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::analyze(PyObject * args)
|
||||
PyObject* MatrixPy::analyze()
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
std::string type = getMatrixPtr()->analyse();
|
||||
return PyUnicode_FromString(type.c_str());
|
||||
|
||||
Reference in New Issue
Block a user