The python export class for Rotation. More...

#include <RotationPy.h>

Public Types

typedef RotationPointerType
 
- Public Types inherited from Base::PyObjectBase
typedef void * PointerType
 
enum  Status { Valid = 0 , Immutable = 1 , Notify = 2 , NoTrack = 3 }
 

Public Member Functions

virtual PyTypeObject * GetType (void)
 
virtual int PyInit (PyObject *args, PyObject *k)
 PyInit method Override this method to initialize a newly created instance of the class (Constructor) More...
 
std::string representation (void) const
 
 RotationPy (Rotation *pcObject, PyTypeObject *T=&Type)
 
additional declarations and methods for the wrapper class
 RotationPy (const Rotation &mat, PyTypeObject *T=&Type)
 
Rotation value () const
 
- Public Member Functions inherited from Base::PyObjectBase
PyObjectBaseDecRef (void)
 decref method wrapper (see python extending manual) More...
 
PyObjectBaseIncRef (void)
 incref method wrapper (see python extending manual) More...
 
bool isConst ()
 
bool isNotTracking () const
 
bool isValid ()
 
 PyObjectBase (void *, PyTypeObject *T)
 Constructor Sets the Type of the object (for inheritance) and decrease the the reference count of the PyObject. More...
 
void setConst ()
 
void setInvalid ()
 
void setNotTracking (bool on=true)
 
void setShouldNotify (bool on)
 
bool shouldNotify () const
 
void startNotify ()
 

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)
 
static PyObjectrichCompare (PyObject *v, PyObject *w, int op)
 
callbacks and implementers for the python object number protocol
static PyObjectnumber_add_handler (PyObject *self, PyObject *other)
 callback for the number_add_handler More...
 
static PyObjectnumber_subtract_handler (PyObject *self, PyObject *other)
 callback for the number_subtract_handler More...
 
static PyObjectnumber_multiply_handler (PyObject *self, PyObject *other)
 callback for the number_multiply_handler More...
 
static PyObjectnumber_divide_handler (PyObject *self, PyObject *other)
 callback for the number_divide_handler More...
 
static PyObjectnumber_remainder_handler (PyObject *self, PyObject *other)
 callback for the number_remainder_handler More...
 
static PyObjectnumber_divmod_handler (PyObject *self, PyObject *other)
 callback for the number_divmod_handler More...
 
static PyObjectnumber_power_handler (PyObject *self, PyObject *other, PyObject *modulo)
 callback for the number_power_handler More...
 
static PyObjectnumber_negative_handler (PyObject *self)
 callback for the number_negative_handler More...
 
static PyObjectnumber_positive_handler (PyObject *self)
 callback for the number_positive_handler More...
 
static PyObjectnumber_absolute_handler (PyObject *self)
 callback for the number_absolute_handler More...
 
static int number_nonzero_handler (PyObject *self)
 callback for the number_nonzero_handler More...
 
static PyObjectnumber_invert_handler (PyObject *self)
 callback for the number_invert_handler More...
 
static PyObjectnumber_lshift_handler (PyObject *self, PyObject *other)
 callback for the number_lshift_handler More...
 
static PyObjectnumber_rshift_handler (PyObject *self, PyObject *other)
 callback for the number_rshift_handler More...
 
static PyObjectnumber_and_handler (PyObject *self, PyObject *other)
 callback for the number_and_handler More...
 
static PyObjectnumber_xor_handler (PyObject *self, PyObject *other)
 callback for the number_xor_handler More...
 
static PyObjectnumber_or_handler (PyObject *self, PyObject *other)
 callback for the number_or_handler More...
 
static int number_coerce_handler (PyObject **self, PyObject **other)
 callback for the number_coerce_handler More...
 
static PyObjectnumber_int_handler (PyObject *self)
 callback for the number_int_handler More...
 
static PyObjectnumber_long_handler (PyObject *self)
 callback for the number_long_handler More...
 
static PyObjectnumber_float_handler (PyObject *self)
 callback for the number_float_handler More...
 
static PyObjectnumber_oct_handler (PyObject *self)
 callback for the number_oct_handler More...
 
static PyObjectnumber_hex_handler (PyObject *self)
 callback for the number_hex_handler More...
 
- Static Public Member Functions inherited from Base::PyObjectBase
static void PyDestructor (PyObject *P)
 Wrapper for the Python destructor. More...
 

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of RotationPy. More...
 
static PyMethodDef Methods []
 Methods structure of RotationPy. More...
 
static PyNumberMethods Number []
 
static PyTypeObject Type
 Type structure of RotationPy. More...
 
- Static Public Attributes inherited from Base::PyObjectBase
static PyMethodDef Methods []
 
static PyTypeObject Type
 Py_Header struct from python.h. More...
 

Protected Member Functions

 ~RotationPy ()
 
- Protected Member Functions inherited from Base::PyObjectBase
void setTwinPointer (void *ptr)
 Overrides the pointer to the twin object. More...
 
virtual ~PyObjectBase ()
 destructor More...
 

callbacks and implementers for the python object methods

static PyObjectstaticCallback_invert (PyObject *self, PyObject *args)
 callback for the invert() method More...
 
static PyObjectstaticCallback_inverted (PyObject *self, PyObject *args)
 callback for the inverted() method More...
 
static PyObjectstaticCallback_isSame (PyObject *self, PyObject *args)
 callback for the isSame() method More...
 
static PyObjectstaticCallback_multiply (PyObject *self, PyObject *args)
 callback for the multiply() method More...
 
static PyObjectstaticCallback_multVec (PyObject *self, PyObject *args)
 callback for the multVec() method More...
 
static PyObjectstaticCallback_slerp (PyObject *self, PyObject *args)
 callback for the slerp() method More...
 
static PyObjectstaticCallback_toEuler (PyObject *self, PyObject *args)
 callback for the toEuler() method More...
 
static PyObjectstaticCallback_toMatrix (PyObject *self, PyObject *args)
 callback for the toMatrix() method More...
 
static PyObjectstaticCallback_isNull (PyObject *self, PyObject *args)
 callback for the isNull() method More...
 
static PyObjectstaticCallback_isIdentity (PyObject *self, PyObject *args)
 callback for the isIdentity() method More...
 
PyObjectinvert (PyObject *args)
 implementer for the invert() method More...
 
PyObjectinverted (PyObject *args)
 implementer for the inverted() method More...
 
PyObjectisSame (PyObject *args)
 implementer for the isSame() method More...
 
PyObjectmultiply (PyObject *args)
 implementer for the multiply() method More...
 
PyObjectmultVec (PyObject *args)
 implementer for the multVec() method More...
 
PyObjectslerp (PyObject *args)
 implementer for the slerp() method More...
 
PyObjecttoEuler (PyObject *args)
 implementer for the toEuler() method More...
 
PyObjecttoMatrix (PyObject *args)
 implementer for the toMatrix() method More...
 
PyObjectisNull (PyObject *args)
 implementer for the isNull() method More...
 
PyObjectisIdentity (PyObject *args)
 implementer for the isIdentity() method More...
 

callbacks and implementers for the python object attributes

static PyObjectstaticCallback_getQ (PyObject *self, void *closure)
 getter callback for the Q attribute More...
 
static int staticCallback_setQ (PyObject *self, PyObject *value, void *closure)
 setter callback for the Q attribute More...
 
static PyObjectstaticCallback_getAxis (PyObject *self, void *closure)
 getter callback for the Axis attribute More...
 
static int staticCallback_setAxis (PyObject *self, PyObject *value, void *closure)
 setter callback for the Axis attribute More...
 
static PyObjectstaticCallback_getRawAxis (PyObject *self, void *closure)
 getter callback for the RawAxis attribute More...
 
static int staticCallback_setRawAxis (PyObject *self, PyObject *value, void *closure)
 setter callback for the RawAxis attribute More...
 
static PyObjectstaticCallback_getAngle (PyObject *self, void *closure)
 getter callback for the Angle attribute More...
 
static int staticCallback_setAngle (PyObject *self, PyObject *value, void *closure)
 setter callback for the Angle attribute More...
 
Py::Tuple getQ (void) const
 getter for the Q attribute More...
 
void setQ (Py::Tuple arg)
 setter for the Q attribute More...
 
Py::Object getAxis (void) const
 getter for the Axis attribute More...
 
void setAxis (Py::Object arg)
 setter for the Axis attribute More...
 
Py::Object getRawAxis (void) const
 getter for the RawAxis attribute More...
 
Py::Float getAngle (void) const
 getter for the Angle attribute More...
 
void setAngle (Py::Float arg)
 setter for the Angle attribute More...
 
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
RotationgetRotationPtr (void) const
 getter for the object handled by this class More...
 

Additional Inherited Members

- Protected Attributes inherited from Base::PyObjectBase
std::bitset< 32 > StatusBits
 

Detailed Description

The python export class for Rotation.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~RotationPy()

RotationPy::~RotationPy ( )
protected

◆ RotationPy() [1/2]

RotationPy::RotationPy ( Rotation pcObject,
PyTypeObject *  T = &Type 
)

◆ RotationPy() [2/2]

Base::RotationPy::RotationPy ( const Rotation mat,
PyTypeObject *  T = &Type 
)

Member Function Documentation

◆ getAngle()

◆ getAxis()

Py::Object RotationPy::getAxis ( void  ) const

getter for the Axis attribute

References DraftVecUtils::angle(), getRotationPtr(), and Base::Rotation::getValue().

Referenced by staticCallback_getAxis().

◆ getCustomAttributes()

PyObject * RotationPy::getCustomAttributes ( const char *  attr) const

getter method for special attributes (e.g. dynamic ones)

References getRotationPtr(), Base::Rotation::getValue(), and Base::Rotation::getYawPitchRoll().

◆ getQ()

Py::Tuple RotationPy::getQ ( void  ) const

getter for the Q attribute

References getRotationPtr(), and Base::Rotation::getValue().

Referenced by staticCallback_getQ().

◆ getRawAxis()

Py::Object RotationPy::getRawAxis ( void  ) const

getter for the RawAxis attribute

References DraftVecUtils::angle(), Base::Rotation::getRawValue(), and getRotationPtr().

Referenced by staticCallback_getRawAxis().

◆ getRotationPtr()

Rotation * RotationPy::getRotationPtr ( void  ) const

◆ GetType()

virtual PyTypeObject* Base::RotationPy::GetType ( void  )
virtual

Reimplemented from Base::PyObjectBase.

◆ invert()

◆ inverted()

PyObject * RotationPy::inverted ( PyObject args)

implementer for the inverted() method

References getRotationPtr(), Base::Rotation::inverse(), and RotationPy().

Referenced by staticCallback_inverted().

◆ isIdentity()

◆ isNull()

PyObject * RotationPy::isNull ( PyObject args)

implementer for the isNull() method

References getRotationPtr(), and Base::Rotation::isNull().

Referenced by staticCallback_isNull().

◆ isSame()

PyObject * RotationPy::isSame ( PyObject args)

implementer for the isSame() method

References getRotationPtr(), Base::Rotation::isSame(), and Type.

Referenced by staticCallback_isSame().

◆ multiply()

◆ multVec()

PyObject * RotationPy::multVec ( PyObject args)

◆ number_absolute_handler()

PyObject * RotationPy::number_absolute_handler ( PyObject self)
static

callback for the number_absolute_handler

◆ number_add_handler()

PyObject * RotationPy::number_add_handler ( PyObject self,
PyObject other 
)
static

callback for the number_add_handler

◆ number_and_handler()

PyObject * RotationPy::number_and_handler ( PyObject self,
PyObject other 
)
static

callback for the number_and_handler

◆ number_coerce_handler()

int RotationPy::number_coerce_handler ( PyObject **  self,
PyObject **  other 
)
static

callback for the number_coerce_handler

◆ number_divide_handler()

PyObject * RotationPy::number_divide_handler ( PyObject self,
PyObject other 
)
static

callback for the number_divide_handler

◆ number_divmod_handler()

PyObject * RotationPy::number_divmod_handler ( PyObject self,
PyObject other 
)
static

callback for the number_divmod_handler

◆ number_float_handler()

PyObject * RotationPy::number_float_handler ( PyObject self)
static

callback for the number_float_handler

◆ number_hex_handler()

PyObject * RotationPy::number_hex_handler ( PyObject self)
static

callback for the number_hex_handler

◆ number_int_handler()

PyObject * RotationPy::number_int_handler ( PyObject self)
static

callback for the number_int_handler

◆ number_invert_handler()

PyObject * RotationPy::number_invert_handler ( PyObject self)
static

callback for the number_invert_handler

◆ number_long_handler()

PyObject * RotationPy::number_long_handler ( PyObject self)
static

callback for the number_long_handler

◆ number_lshift_handler()

PyObject * RotationPy::number_lshift_handler ( PyObject self,
PyObject other 
)
static

callback for the number_lshift_handler

◆ number_multiply_handler()

PyObject * RotationPy::number_multiply_handler ( PyObject self,
PyObject other 
)
static

◆ number_negative_handler()

PyObject * RotationPy::number_negative_handler ( PyObject self)
static

callback for the number_negative_handler

◆ number_nonzero_handler()

int RotationPy::number_nonzero_handler ( PyObject self)
static

callback for the number_nonzero_handler

◆ number_oct_handler()

PyObject * RotationPy::number_oct_handler ( PyObject self)
static

callback for the number_oct_handler

◆ number_or_handler()

PyObject * RotationPy::number_or_handler ( PyObject self,
PyObject other 
)
static

callback for the number_or_handler

◆ number_positive_handler()

PyObject * RotationPy::number_positive_handler ( PyObject self)
static

callback for the number_positive_handler

◆ number_power_handler()

PyObject * RotationPy::number_power_handler ( PyObject self,
PyObject other,
PyObject modulo 
)
static

callback for the number_power_handler

References RotationPy(), Type, and value().

◆ number_remainder_handler()

PyObject * RotationPy::number_remainder_handler ( PyObject self,
PyObject other 
)
static

callback for the number_remainder_handler

◆ number_rshift_handler()

PyObject * RotationPy::number_rshift_handler ( PyObject self,
PyObject other 
)
static

callback for the number_rshift_handler

◆ number_subtract_handler()

PyObject * RotationPy::number_subtract_handler ( PyObject self,
PyObject other 
)
static

callback for the number_subtract_handler

◆ number_xor_handler()

PyObject * RotationPy::number_xor_handler ( PyObject self,
PyObject other 
)
static

callback for the number_xor_handler

◆ PyInit()

int RotationPy::PyInit ( PyObject ,
PyObject  
)
virtual

◆ PyMake()

PyObject * RotationPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
)
static

References RotationPy().

◆ representation()

◆ richCompare()

PyObject * RotationPy::richCompare ( PyObject v,
PyObject w,
int  op 
)
static

References getRotationPtr(), and Type.

◆ setAngle()

void RotationPy::setAngle ( Py::Float  arg)

◆ setAxis()

void RotationPy::setAxis ( Py::Object  arg)

◆ setCustomAttributes()

int RotationPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

setter for special attributes (e.g.

dynamic ones) Output: Success=1, Failure=-1, Ignore=0

References getRotationPtr(), Base::Rotation::getYawPitchRoll(), Base::Rotation::setValue(), Base::Rotation::setYawPitchRoll(), Base::MatrixPy::Type, and Base::VectorPy::Type.

◆ setQ()

void RotationPy::setQ ( Py::Tuple  arg)

setter for the Q attribute

References getRotationPtr(), and Base::Rotation::setValue().

Referenced by staticCallback_setQ().

◆ slerp()

PyObject * RotationPy::slerp ( PyObject args)

implementer for the slerp() method

References getRotationPtr(), RotationPy(), Base::Rotation::slerp(), and Type.

Referenced by staticCallback_slerp().

◆ staticCallback_getAngle()

PyObject * RotationPy::staticCallback_getAngle ( PyObject self,
void *  closure 
)
static

getter callback for the Angle attribute

References Base::BaseExceptionFreeCADError, getAngle(), and Base::PyObjectBase::isValid().

◆ staticCallback_getAxis()

PyObject * RotationPy::staticCallback_getAxis ( PyObject self,
void *  closure 
)
static

getter callback for the Axis attribute

References Base::BaseExceptionFreeCADError, getAxis(), and Base::PyObjectBase::isValid().

◆ staticCallback_getQ()

PyObject * RotationPy::staticCallback_getQ ( PyObject self,
void *  closure 
)
static

getter callback for the Q attribute

References Base::BaseExceptionFreeCADError, getQ(), and Base::PyObjectBase::isValid().

◆ staticCallback_getRawAxis()

PyObject * RotationPy::staticCallback_getRawAxis ( PyObject self,
void *  closure 
)
static

getter callback for the RawAxis attribute

References Base::BaseExceptionFreeCADError, getRawAxis(), and Base::PyObjectBase::isValid().

◆ staticCallback_invert()

◆ staticCallback_inverted()

◆ staticCallback_isIdentity()

PyObject * RotationPy::staticCallback_isIdentity ( PyObject self,
PyObject args 
)
static

◆ staticCallback_isNull()

PyObject * RotationPy::staticCallback_isNull ( PyObject self,
PyObject args 
)
static

◆ staticCallback_isSame()

◆ staticCallback_multiply()

PyObject * RotationPy::staticCallback_multiply ( PyObject self,
PyObject args 
)
static

◆ staticCallback_multVec()

PyObject * RotationPy::staticCallback_multVec ( PyObject self,
PyObject args 
)
static

◆ staticCallback_setAngle()

int RotationPy::staticCallback_setAngle ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_setAxis()

int RotationPy::staticCallback_setAxis ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_setQ()

int RotationPy::staticCallback_setQ ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_setRawAxis()

int RotationPy::staticCallback_setRawAxis ( PyObject self,
PyObject value,
void *  closure 
)
static

setter callback for the RawAxis attribute

References Base::PyObjectBase::isValid().

◆ staticCallback_slerp()

PyObject * RotationPy::staticCallback_slerp ( PyObject self,
PyObject args 
)
static

◆ staticCallback_toEuler()

PyObject * RotationPy::staticCallback_toEuler ( PyObject self,
PyObject args 
)
static

◆ staticCallback_toMatrix()

PyObject * RotationPy::staticCallback_toMatrix ( PyObject self,
PyObject args 
)
static

◆ toEuler()

PyObject * RotationPy::toEuler ( PyObject args)

implementer for the toEuler() method

References getRotationPtr(), and Base::Rotation::getYawPitchRoll().

Referenced by staticCallback_toEuler().

◆ toMatrix()

PyObject * RotationPy::toMatrix ( PyObject args)

implementer for the toMatrix() method

References getRotationPtr(), and Base::Rotation::getValue().

Referenced by staticCallback_toMatrix().

◆ value()

Member Data Documentation

◆ GetterSetter

PyGetSetDef RotationPy::GetterSetter
static
Initial value:
= {
{"Q",
"The rotation elements (as quaternion)",
NULL
},
{"Axis",
"The rotation axis of the quaternion",
NULL
},
{"RawAxis",
"The rotation axis without normalization",
NULL
},
{"Angle",
"The rotation angle of the quaternion",
NULL
},
{NULL, NULL, NULL, NULL, NULL}
}
static PyObject * staticCallback_getAngle(PyObject *self, void *closure)
getter callback for the Angle attribute
Definition: RotationPy.cpp:1005
static int staticCallback_setQ(PyObject *self, PyObject *value, void *closure)
setter callback for the Q attribute
Definition: RotationPy.cpp:903
static int staticCallback_setAxis(PyObject *self, PyObject *value, void *closure)
setter callback for the Axis attribute
Definition: RotationPy.cpp:947
static int staticCallback_setAngle(PyObject *self, PyObject *value, void *closure)
setter callback for the Angle attribute
Definition: RotationPy.cpp:1023
static PyObject * staticCallback_getAxis(PyObject *self, void *closure)
getter callback for the Axis attribute
Definition: RotationPy.cpp:929
static PyObject * staticCallback_getRawAxis(PyObject *self, void *closure)
getter callback for the RawAxis attribute
Definition: RotationPy.cpp:973
static int staticCallback_setRawAxis(PyObject *self, PyObject *value, void *closure)
setter callback for the RawAxis attribute
Definition: RotationPy.cpp:991
static PyObject * staticCallback_getQ(PyObject *self, void *closure)
getter callback for the Q attribute
Definition: RotationPy.cpp:885

Attribute structure of RotationPy.

◆ Methods

PyMethodDef RotationPy::Methods
static

Methods structure of RotationPy.

◆ Number

PyNumberMethods RotationPy::Number
static

◆ Type


The documentation for this class was generated from the following files:
  • Sources/FreeCAD-SourceDocs/src/Base/RotationPy.h
  • Sources/FreeCAD/src/Base/RotationPyImp.cpp
  • Sources/FreeCAD-SourceDocs/src/Base/RotationPy.cpp