The python export class for Rotation. More...
#include <RotationPy.h>
Public Types | |
typedef Rotation * | PointerType |
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
virtual PyParentObject * | GetParents (void) |
Rotation * | getRotationPtr (void) const |
getter for the object handled by this class | |
virtual PyTypeObject * | GetType (void) |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
RotationPy (Rotation *pcObject, PyTypeObject *T=&Type) | |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
~RotationPy () | |
additional declarations and methods for the wrapper class | |
RotationPy (const Rotation &mat, PyTypeObject *T=&Type) | |
Rotation | value () const |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of RotationPy. | |
static PyMethodDef | Methods [] |
Methods structure of RotationPy. | |
static PyParentObject | Parents [] = { PARENTSBaseRotationPy } |
static PyTypeObject | Type |
Type structure of RotationPy. | |
callbacks and implementers for the python object attributes | |
| |
Py::Float | getAngle (void) const |
getter for the Angle attribute | |
Py::Object | getAxis (void) const |
getter for the Axis attribute | |
Py::Tuple | getQ (void) const |
getter for the Q attribute | |
void | setQ (Py::Tuple arg) |
setter for the Q attribute | |
static PyObject * | staticCallback_getAngle (PyObject *self, void *closure) |
getter callback for the Angle attribute | |
static PyObject * | staticCallback_getAxis (PyObject *self, void *closure) |
getter callback for the Axis attribute | |
static PyObject * | staticCallback_getQ (PyObject *self, void *closure) |
getter callback for the Q attribute | |
static int | staticCallback_setAngle (PyObject *self, PyObject *value, void *closure) |
setter callback for the Angle attribute | |
static int | staticCallback_setAxis (PyObject *self, PyObject *value, void *closure) |
setter callback for the Axis attribute | |
static int | staticCallback_setQ (PyObject *self, PyObject *value, void *closure) |
setter callback for the Q attribute | |
callbacks and implementers for the python object methods | |
| |
PyObject * | invert (PyObject *args) |
implementer for the invert() method | |
PyObject * | multiply (PyObject *args) |
implementer for the multiply() method | |
PyObject * | multVec (PyObject *args) |
implementer for the multVec() method | |
PyObject * | toEuler (PyObject *args) |
implementer for the toEuler() method | |
static PyObject * | staticCallback_invert (PyObject *self, PyObject *args) |
callback for the invert() method | |
static PyObject * | staticCallback_multiply (PyObject *self, PyObject *args) |
callback for the multiply() method | |
static PyObject * | staticCallback_multVec (PyObject *self, PyObject *args) |
callback for the multVec() method | |
static PyObject * | staticCallback_toEuler (PyObject *self, PyObject *args) |
callback for the toEuler() method |
The python export class for Rotation.
Definition at line 20 of file RotationPy.h.
typedef Rotation* Base::RotationPy::PointerType |
Reimplemented from Base::PyObjectBase.
Definition at line 36 of file RotationPy.h.
Definition at line 545 of file RotationPy.cpp.
Referenced by multiply(), and PyMake().
RotationPy::~RotationPy | ( | ) |
Definition at line 554 of file RotationPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Definition at line 102 of file RotationPy.h.
PyObject * RotationPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Base::PyObjectBase.
Definition at line 572 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * RotationPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Base::PyObjectBase.
Definition at line 564 of file RotationPy.cpp.
References representation().
int RotationPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Base::PyObjectBase.
Definition at line 640 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
Py::Float RotationPy::getAngle | ( | void | ) | const |
getter for the Angle attribute
Definition at line 176 of file RotationPyImp.cpp.
References draftlibs::fcvec::angle(), getRotationPtr(), and Base::Rotation::getValue().
Referenced by staticCallback_getAngle().
Py::Object RotationPy::getAxis | ( | void | ) | const |
getter for the Axis attribute
Definition at line 169 of file RotationPyImp.cpp.
References draftlibs::fcvec::angle(), getRotationPtr(), and Base::Rotation::getValue().
Referenced by staticCallback_getAxis().
PyObject * RotationPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Definition at line 183 of file RotationPyImp.cpp.
Referenced by _getattr().
virtual PyParentObject* Base::RotationPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 28 of file RotationPy.h.
Py::Tuple RotationPy::getQ | ( | void | ) | const |
getter for the Q attribute
Definition at line 147 of file RotationPyImp.cpp.
References getRotationPtr(), Base::Rotation::getValue(), and Py::Tuple::setItem().
Referenced by staticCallback_getQ().
Rotation * RotationPy::getRotationPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 699 of file RotationPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by getAngle(), getAxis(), getQ(), invert(), multiply(), multVec(), PyInit(), setQ(), and toEuler().
virtual PyTypeObject* Base::RotationPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 27 of file RotationPy.h.
implementer for the invert() method
Definition at line 106 of file RotationPyImp.cpp.
References getRotationPtr(), Base::Rotation::invert(), and Py_Return.
implementer for the multiply() method
Definition at line 114 of file RotationPyImp.cpp.
References getRotationPtr(), RotationPy(), and Type.
implementer for the multVec() method
Definition at line 123 of file RotationPyImp.cpp.
References getRotationPtr(), Base::Rotation::multVec(), Base::VectorPy::Type, value(), and draftlibs::fcgeo::vec().
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PyObjectBase.
Definition at line 56 of file RotationPyImp.cpp.
References draftlibs::fcvec::angle(), getRotationPtr(), Base::Rotation::getValue(), draftTools::p, Base::Rotation::setValue(), Base::Rotation::setYawPitchRoll(), Py::Vector::toVector(), Base::VectorPy::Type, Type, draftlibs::fcgeo::v1(), value(), and MovieTool::y.
Definition at line 49 of file RotationPyImp.cpp.
References RotationPy().
std::string RotationPy::representation | ( | void | ) | const |
Definition at line 38 of file RotationPyImp.cpp.
References Base::PyObjectBase::_pcTwinPointer, and Base::Rotation::getValue().
Referenced by _repr().
int RotationPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Definition at line 188 of file RotationPyImp.cpp.
Referenced by _setattr().
void RotationPy::setQ | ( | Py::Tuple | arg | ) |
setter for the Q attribute
Definition at line 160 of file RotationPyImp.cpp.
References Py::SeqBase< T >::getItem(), getRotationPtr(), and Base::Rotation::setValue().
getter callback for the Angle attribute
Definition at line 506 of file RotationPy.cpp.
References getAngle(), Base::PyObjectBase::isValid(), and Py::new_reference_to().
getter callback for the Axis attribute
Definition at line 474 of file RotationPy.cpp.
References getAxis(), Base::PyObjectBase::isValid(), and Py::new_reference_to().
getter callback for the Q attribute
Definition at line 430 of file RotationPy.cpp.
References getQ(), Base::PyObjectBase::isValid(), and Py::new_reference_to().
callback for the invert() method
Definition at line 126 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the multiply() method
Definition at line 202 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the multVec() method
Definition at line 278 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
int RotationPy::staticCallback_setAngle | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Angle attribute
Definition at line 524 of file RotationPy.cpp.
References Base::PyObjectBase::isValid().
int RotationPy::staticCallback_setAxis | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Axis attribute
Definition at line 492 of file RotationPy.cpp.
References Base::PyObjectBase::isValid().
setter callback for the Q attribute
Definition at line 448 of file RotationPy.cpp.
References Base::PyObjectBase::isConst(), and Base::PyObjectBase::isValid().
callback for the toEuler() method
Definition at line 354 of file RotationPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the toEuler() method
Definition at line 133 of file RotationPyImp.cpp.
References getRotationPtr(), Base::Rotation::getYawPitchRoll(), Py::new_reference_to(), and Py::Tuple::setItem().
Rotation Base::RotationPy::value | ( | ) | const [inline] |
Definition at line 104 of file RotationPy.h.
PyGetSetDef RotationPy::GetterSetter [static] |
{ {"Q", (getter) staticCallback_getQ, (setter) staticCallback_setQ, "The rotation elements (as quaternion)", NULL }, {"Axis", (getter) staticCallback_getAxis, (setter) staticCallback_setAxis, "The rotation axis of the quaternion", NULL }, {"Angle", (getter) staticCallback_getAngle, (setter) staticCallback_setAngle, "The rotation angle of the quaternion", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of RotationPy.
Definition at line 25 of file RotationPy.h.
PyMethodDef RotationPy::Methods [static] |
{ {"invert", (PyCFunction) staticCallback_invert, METH_VARARGS, "\n move(Vector)\n Move the matrix along the vector\n " }, {"multiply", (PyCFunction) staticCallback_multiply, METH_VARARGS, "\n multiply(Rotation)\n Multiply this quaternion with another quaternion\n " }, {"multVec", (PyCFunction) staticCallback_multVec, METH_VARARGS, "\n multVec(Vector) -> Vector\n Compute the transformed vector using the rotation\n " }, {"toEuler", (PyCFunction) staticCallback_toEuler, METH_VARARGS, "\n toEuler(Vector) -> list\n Get the Euler angles of this rotation\n " }, {NULL, NULL, 0, NULL} }
Methods structure of RotationPy.
Reimplemented from Base::PyObjectBase.
Definition at line 24 of file RotationPy.h.
Referenced by _getattr().
PyParentObject RotationPy::Parents = { PARENTSBaseRotationPy } [static] |
Reimplemented from Base::PyObjectBase.
Definition at line 26 of file RotationPy.h.
PyTypeObject RotationPy::Type [static] |
Type structure of RotationPy.
Reimplemented from Base::PyObjectBase.
Definition at line 23 of file RotationPy.h.
Referenced by multiply(), PyInit(), and Base::PlacementPy::PyInit().