static PyObject* pyMatrix44_RotateMat(PyObject*, PyObject* args) { int axis; float angle; if (!PyArg_ParseTuple(args, "if", &axis, &angle)) { PyErr_SetString(PyExc_TypeError, "RotateMat expects int, float"); return NULL; } return pyMatrix44_FromMatrix44(hsMatrix44::RotateMat(axis, angle)); }
static PyObject* pyMatrix44_ScaleMat(PyObject*, PyObject* args) { pyVector3* vec; if (!PyArg_ParseTuple(args, "O", &vec)) { PyErr_SetString(PyExc_TypeError, "ScaleMat expects an hsVector3"); return NULL; } if (!pyVector3_Check((PyObject*)vec)) { PyErr_SetString(PyExc_TypeError, "ScaleMat expects an hsVector3"); return NULL; } return pyMatrix44_FromMatrix44(hsMatrix44::ScaleMat(*vec->fThis)); }
static PyObject* pyMatrix44_multiply(PyObject* left, PyObject* right) { if (pyMatrix44_Check(left)) { if (pyMatrix44_Check(right)) { return pyMatrix44_FromMatrix44(*((pyMatrix44*)left)->fThis * *((pyMatrix44*)right)->fThis); } else { PyErr_SetString(PyExc_TypeError, "Multiplication operand is not another matrix"); return NULL; } } else if (pyMatrix44_Check(right)) { PyErr_SetString(PyExc_TypeError, "Multiplication operand is not another matrix"); return NULL; } // This should not happen... return NULL; }
static PyObject* pyCoordinateInterface_getP2L(pyCoordinateInterface* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getParentToLocal()); }
static PyObject* pyCoordinateInterface_getL2W(pyCoordinateInterface* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getLocalToWorld()); }
static PyObject* pyMatrix44_inverse(pyMatrix44* self) { return pyMatrix44_FromMatrix44(self->fThis->inverse()); }
static PyObject* pyMatrix44_Identity(PyObject*) { return pyMatrix44_FromMatrix44(hsMatrix44::Identity()); }
static PyObject* pyViewFaceModifier_getP2L(pyViewFaceModifier* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getParentToLocal()); }
static PyObject* pySpanInstance_getL2W(pySpanInstance* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getLocalToWorld()); }
static PyObject* pyDrawableSpans_getB2Ls(pyDrawableSpans* self, void*) { PyObject* list = PyList_New(self->fThis->getNumTransforms()); for (size_t i=0; i<self->fThis->getNumTransforms(); i++) PyList_SET_ITEM(list, i, pyMatrix44_FromMatrix44(self->fThis->getBoneToLocal(i))); return list; }
static PyObject* pyGeometrySpan_getWorldToLocal(pyGeometrySpan* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getWorldToLocal()); }
static PyObject* pyLightInfo_getW2L(pyLightInfo* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getWorldToLight()); }
static PyObject* pyLightInfo_getL2W(pyLightInfo* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getLightToWorld()); }
static PyObject* pyLightInfo_getLoc2Light(pyLightInfo* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getLocalToLight()); }
static PyObject* pyMobileOccluder_getWorldToLocal(pyMobileOccluder* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->getWorldToLocal()); }
static PyObject* pyMatrix44Key_getValue(pyMatrix44Key* self, void*) { return pyMatrix44_FromMatrix44(self->fThis->fValue); }