Beispiel #1
0
PyObject* VRPyTransform::rotate(VRPyTransform* self, PyObject* args) {
    if (self->obj == 0) { PyErr_SetString(err, "VRPyTransform::rotate, Object is invalid"); return NULL; }
    OSG::Vec4f r = parseVec4f(args);

    OSG::Vec3f axis = OSG::Vec3f(r);
    float angle = r[3];

    OSG::VRTransform* e = (OSG::VRTransform*) self->obj;
    e->rotate(angle, axis);
    Py_RETURN_TRUE;
}
Beispiel #2
0
PyObject* VRPyTransform::rotate(VRPyTransform* self, PyObject* args) {
    if (!self->valid()) return NULL;
    OSG::Vec4f r = parseVec4f(args);

    OSG::Vec3f axis = OSG::Vec3f(r);
    float angle = r[3];

    OSG::VRTransformPtr e = (OSG::VRTransformPtr) self->objPtr;
    e->rotate(angle, axis);
    Py_RETURN_TRUE;
}
Beispiel #3
0
PyObject* VRPyAnnotationEngine::setBackground(VRPyAnnotationEngine* self, PyObject* args) {
    self->objPtr->setBackground(parseVec4f(args));
    Py_RETURN_TRUE;
}