示例#1
0
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));
}
示例#2
0
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));
}
示例#3
0
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());
}
示例#6
0
static PyObject* pyMatrix44_inverse(pyMatrix44* self) {
    return pyMatrix44_FromMatrix44(self->fThis->inverse());
}
示例#7
0
static PyObject* pyMatrix44_Identity(PyObject*) {
    return pyMatrix44_FromMatrix44(hsMatrix44::Identity());
}
示例#8
0
static PyObject* pyViewFaceModifier_getP2L(pyViewFaceModifier* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getParentToLocal());
}
示例#9
0
static PyObject* pySpanInstance_getL2W(pySpanInstance* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getLocalToWorld());
}
示例#10
0
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;
}
示例#11
0
static PyObject* pyGeometrySpan_getWorldToLocal(pyGeometrySpan* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getWorldToLocal());
}
示例#12
0
static PyObject* pyLightInfo_getW2L(pyLightInfo* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getWorldToLight());
}
示例#13
0
static PyObject* pyLightInfo_getL2W(pyLightInfo* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getLightToWorld());
}
示例#14
0
static PyObject* pyLightInfo_getLoc2Light(pyLightInfo* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getLocalToLight());
}
示例#15
0
static PyObject* pyMobileOccluder_getWorldToLocal(pyMobileOccluder* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->getWorldToLocal());
}
示例#16
0
static PyObject* pyMatrix44Key_getValue(pyMatrix44Key* self, void*) {
    return pyMatrix44_FromMatrix44(self->fThis->fValue);
}