29 #ifndef __PYTHONTYPES_H__
30 #define __PYTHONTYPES_H__
81 PyNodePtr() : refCountNode ( true ), ptr( NULL ) {
83 python_node_ptrs.insert(
this );
88 python_node_ptrs.erase(
this );
95 inline void setRefCountNode (
bool _refCountNode ) {
96 refCountNode= _refCountNode;
100 inline void setNodePtr( Node *_ptr ) {
102 python_node_ptrs.erase(
this );
105 if( refCountNode && ptr ) ptr->unref();
107 if( refCountNode && ptr ) ptr->ref();
109 if (ptr && refCountNode) {
110 python_node_ptrs.insert(
this );
114 inline Node *nodePtr() {
117 static H3DAPI_API std::set<PyNodePtr *> python_node_ptrs;
128 extern H3DAPI_API PyTypeObject PyNode_Type;
140 PyObject H3DAPI_API *
PyNode_FromNode( Node *v,
bool _refCountNode=
true );
147 return PyObject_TypeCheck(o,&PyNode_Type ) || o == Py_None;
154 static void installType( PyObject* H3D_module );
159 static PyObject*
create();
166 static int init(
PyNode *
self, PyObject *args, PyObject *kwds);
169 static PyObject*
repr(
PyNode *myself, PyObject *args);
173 static int compare( PyObject *veca, PyObject *vecb );
175 #if PY_MAJOR_VERSION >= 3
176 static PyObject* richCompare( PyObject *lhs, PyObject *rhs,
int operation );
180 static PyObject*
getField( PyObject *myself,
char* arg );
187 static PyObject*
getAttr( PyObject *myself,
char* arg );
190 static PyObject*
getFieldList( PyObject *myself, PyObject *args );
193 static PyObject*
getName( PyObject *myself, PyObject *args );
196 static PyObject*
getTypeName( PyObject *myself, PyObject *args );
199 static PyObject*
setName( PyObject *
self, PyObject *args );
202 static PyObject*
getSingleField( PyObject *
self, PyObject *args );
205 static PyObject*
addField( PyObject *
self, PyObject *args );
208 static PyObject*
removeField( PyObject *
self, PyObject *args);
211 static PyObject*
clearFields( PyObject*
self, PyObject *args );
214 static PyObject*
clone ( PyObject*
self, PyObject *args );
217 static PyObject*
closestPoint ( PyObject*
self, PyObject *args );
220 static PyObject*
lineIntersect ( PyObject*
self, PyObject *args );
227 extern H3DAPI_API PyTypeObject PyVec2f_Type;
240 return PyObject_TypeCheck(o,&PyVec2f_Type);
255 static int init(
PyVec2f *
self, PyObject *args, PyObject *kwds);
258 static PyObject*
length( PyObject *
self, PyObject *args );
261 static PyObject*
lengthSqr( PyObject *
self, PyObject *args );
264 static PyObject*
normalize( PyObject *
self, PyObject *args );
268 static PyObject*
normalizeSafe( PyObject *
self, PyObject *args );
271 static PyObject*
dotProduct( PyObject *
self, PyObject *args );
279 extern H3DAPI_API PyTypeObject PyVec2d_Type;
292 return PyObject_TypeCheck(o,&PyVec2d_Type);
295 namespace PythonInternals {
298 return PyObject_TypeCheck(o,&PyVec2d_Type) ||
299 PyObject_TypeCheck( o, &PyVec2f_Type );
303 Vec2d PyVec2d2f_AsVec2d( PyObject *o );
315 PythonInternals::PyVec2d2f_Check,
316 PythonInternals::PyVec2d2f_AsVec2d,
321 static int init(
PyVec2d *
self, PyObject *args, PyObject *kwds);
324 static PyObject*
length( PyObject *
self, PyObject *args );
327 static PyObject*
lengthSqr( PyObject *
self, PyObject *args );
330 static PyObject*
normalize( PyObject *
self, PyObject *args );
334 static PyObject*
normalizeSafe( PyObject *
self, PyObject *args );
337 static PyObject*
dotProduct( PyObject *
self, PyObject *args );
344 extern H3DAPI_API PyTypeObject PyVec3f_Type;
358 return PyObject_TypeCheck(o,&PyVec3f_Type);
369 PyVec3f_FromVec3f > {
373 static int init(
PyVec3f *
self, PyObject *args, PyObject *kwds);
376 static PyObject*
mod( PyObject *veca, PyObject *vecb );
379 static PyObject*
length( PyObject *
self, PyObject *args );
382 static PyObject*
lengthSqr( PyObject *
self, PyObject *args );
385 static PyObject*
normalize( PyObject *
self, PyObject *args );
389 static PyObject*
normalizeSafe( PyObject *
self, PyObject *args );
392 static PyObject*
dotProduct( PyObject *
self, PyObject *args );
395 static PyObject*
crossProduct( PyObject *
self, PyObject *args );
403 extern H3DAPI_API PyTypeObject PyVec3d_Type;
417 return PyObject_TypeCheck(o,&PyVec3d_Type);
420 namespace PythonInternals {
423 return PyObject_TypeCheck(o,&PyVec3d_Type) ||
424 PyObject_TypeCheck( o, &PyVec3f_Type );
428 Vec3d PyVec3d3f_AsVec3d( PyObject *o );
439 PythonInternals::PyVec3d3f_Check,
440 PythonInternals::PyVec3d3f_AsVec3d,
441 PyVec3d_FromVec3d > {
444 static int init(
PyVec3d *
self, PyObject *args, PyObject *kwds);
445 static PyObject* mod( PyObject *veca, PyObject *vecb );
447 static PyObject*
length( PyObject *
self, PyObject *args );
449 static PyObject*
lengthSqr( PyObject *
self, PyObject *args );
451 static PyObject*
normalize( PyObject *
self, PyObject *args );
454 static PyObject*
normalizeSafe( PyObject *
self, PyObject *args );
456 static PyObject*
dotProduct( PyObject *
self, PyObject *args );
459 static PyObject*
crossProduct( PyObject *
self, PyObject *args );
466 extern H3DAPI_API PyTypeObject PyVec4f_Type;
480 return PyObject_TypeCheck(o,&PyVec4f_Type);
490 PyVec4f_FromVec4f > {
494 static int init(
PyVec4f *
self, PyObject *args, PyObject *kwds);
502 extern H3DAPI_API PyTypeObject PyVec4d_Type;
516 return PyObject_TypeCheck(o,&PyVec4d_Type);
519 namespace PythonInternals {
522 return PyObject_TypeCheck(o,&PyVec4d_Type) ||
523 PyObject_TypeCheck( o, &PyVec4f_Type );
527 Vec4d PyVec4d4f_AsVec4d( PyObject *o );
535 PythonInternals::PyVec4d4f_Check,
536 PythonInternals::PyVec4d4f_AsVec4d,
537 PyVec4d_FromVec4d > {
541 static int init(
PyVec4d *
self, PyObject *args, PyObject *kwds);
548 extern H3DAPI_API PyTypeObject PyRotation_Type;
562 return PyObject_TypeCheck(o,&PyRotation_Type);
571 PyRotation_AsRotation,
572 PyRotation_FromRotation > {
576 static int init(
PyRotation *
self, PyObject *args, PyObject *kwds);
580 static PyObject *
toEulerAngles( PyObject *
self, PyObject *args );
583 static PyObject *
slerp( PyObject *
self, PyObject *args );
586 static PyObject*
mul( PyObject *rota, PyObject *rotb );
593 extern H3DAPI_API PyTypeObject PyQuaternion_Type;
607 return PyObject_TypeCheck(o,&PyQuaternion_Type);
616 PyQuaternion_AsQuaternion,
617 PyQuaternion_FromQuaternion > {
624 static PyObject*
mul( PyObject *rota, PyObject *rotb );
628 static PyObject *
toEulerAngles( PyObject *
self, PyObject *args );
631 static PyObject *
norm( PyObject *
self, PyObject *args );
635 static PyObject*
normalize( PyObject *
self, PyObject *args );
638 static PyObject*
conjugate( PyObject *
self, PyObject *args );
641 static PyObject*
inverse( PyObject *
self, PyObject *args );
644 static PyObject*
slerp( PyObject *
self, PyObject *args );
647 static PyObject*
dotProduct( PyObject *
self, PyObject *args );
654 extern H3DAPI_API PyTypeObject PyMatrix3f_Type;
668 return PyObject_TypeCheck(o,&PyMatrix3f_Type);
676 PyMatrix3f_AsMatrix3f,
677 PyMatrix3f_FromMatrix3f > {
681 static int init(
PyMatrix3f *
self, PyObject *args, PyObject *kwds);
684 static PyObject*
mul( PyObject *rota, PyObject *rotb );
687 static PyObject*
setToIdentity( PyObject *
self, PyObject *args );
690 static PyObject*
inverse( PyObject *
self, PyObject *args );
693 static PyObject*
transpose( PyObject *
self, PyObject *args );
697 static PyObject*
toEulerAngles( PyObject *
self, PyObject *args );
700 static PyObject*
getScalePart( PyObject *
self, PyObject *args );
703 static PyObject*
getRow( PyObject *
self, PyObject *args );
706 static PyObject*
getColumn( PyObject *
self, PyObject *args );
709 static PyObject*
getElement( PyObject *
self, PyObject *args );
712 static PyObject*
setElement( PyObject *
self, PyObject *args );
719 extern H3DAPI_API PyTypeObject PyMatrix4f_Type;
733 return PyObject_TypeCheck(o,&PyMatrix4f_Type);
741 PyMatrix4f_AsMatrix4f,
742 PyMatrix4f_FromMatrix4f > {
747 static int init(
PyMatrix4f *
self, PyObject *args, PyObject *kwds);
750 static PyObject*
mul( PyObject *rota, PyObject *rotb );
753 static PyObject*
setToIdentity( PyObject *
self, PyObject *args );
766 static PyObject*
inverse( PyObject *
self, PyObject *args );
769 static PyObject*
transpose( PyObject *
self, PyObject *args );
772 static PyObject*
getRow( PyObject *
self, PyObject *args );
775 static PyObject*
getColumn( PyObject *
self, PyObject *args );
784 static PyObject*
getScalePart( PyObject *
self, PyObject *args );
790 static PyObject*
getElement( PyObject *
self, PyObject *args );
793 static PyObject*
setElement( PyObject *
self, PyObject *args );
801 extern H3DAPI_API PyTypeObject PyMatrix3d_Type;
815 return PyObject_TypeCheck(o,&PyMatrix3d_Type);
818 namespace PythonInternals {
821 return PyObject_TypeCheck(o,&PyMatrix3d_Type) ||
822 PyObject_TypeCheck( o, &PyMatrix3f_Type );
826 Matrix3d PyMatrix3d3f_AsMatrix3d( PyObject *o );
834 PythonInternals::PyMatrix3d3f_Check,
835 PythonInternals::PyMatrix3d3f_AsMatrix3d,
836 PyMatrix3d_FromMatrix3d > {
840 static int init(
PyMatrix3d *
self, PyObject *args, PyObject *kwds);
843 static PyObject*
mul( PyObject *rota, PyObject *rotb );
846 static PyObject*
setToIdentity( PyObject *
self, PyObject *args );
849 static PyObject*
inverse( PyObject *
self, PyObject *args );
852 static PyObject*
transpose( PyObject *
self, PyObject *args );
856 static PyObject*
toEulerAngles( PyObject *
self, PyObject *args );
859 static PyObject*
getScalePart( PyObject *
self, PyObject *args );
862 static PyObject*
getRow( PyObject *
self, PyObject *args );
865 static PyObject*
getColumn( PyObject *
self, PyObject *args );
868 static PyObject*
getElement( PyObject *
self, PyObject *args );
871 static PyObject*
setElement( PyObject *
self, PyObject *args );
878 extern H3DAPI_API PyTypeObject PyMatrix4d_Type;
892 return PyObject_TypeCheck(o,&PyMatrix4d_Type);
895 namespace PythonInternals {
898 return PyObject_TypeCheck(o,&PyMatrix4d_Type) ||
899 PyObject_TypeCheck( o, &PyMatrix4f_Type );
903 Matrix4d PyMatrix4d4f_AsMatrix4d( PyObject *o );
911 PythonInternals::PyMatrix4d4f_Check,
912 PythonInternals::PyMatrix4d4f_AsMatrix4d,
913 PyMatrix4d_FromMatrix4d > {
918 static int init(
PyMatrix4d *
self, PyObject *args, PyObject *kwds);
921 static PyObject*
mul( PyObject *rota, PyObject *rotb );
924 static PyObject*
setToIdentity( PyObject *
self, PyObject *args );
937 static PyObject*
inverse( PyObject *
self, PyObject *args );
940 static PyObject*
transpose( PyObject *
self, PyObject *args );
943 static PyObject*
getRow( PyObject *
self, PyObject *args );
946 static PyObject*
getColumn( PyObject *
self, PyObject *args );
955 static PyObject*
getScalePart( PyObject *
self, PyObject *args );
961 static PyObject*
getElement( PyObject *
self, PyObject *args );
964 static PyObject*
setElement( PyObject *
self, PyObject *args );
971 extern H3DAPI_API PyTypeObject PyRGB_Type;
985 return PyObject_TypeCheck(o,&PyRGB_Type);
999 static int init(
PyRGB *
self, PyObject *args, PyObject *kwds);
1006 extern H3DAPI_API PyTypeObject PyRGBA_Type;
1020 return PyObject_TypeCheck(o,&PyRGBA_Type);
1034 static int init(
PyRGBA *
self, PyObject *args, PyObject *kwds);
1040 extern H3DAPI_API PyTypeObject PyConsole_Type;
1042 struct PyConsole:
public PyType {
1043 PyConsole() : log_level( LogLevel::Info ) {}
1047 static void installType( PyObject* H3D_module ) {
1048 if (PyType_Ready( &PyConsole_Type ) < 0 )
1051 Py_INCREF( &PyConsole_Type );
1052 PyModule_AddObject( H3D_module,
1054 (PyObject *)&PyConsole_Type );
1058 static int init(PyConsole *
self, PyObject *args, PyObject *kwds);
1061 static void dealloc( PyObject *
self ) {
1062 self->ob_type->tp_free(
self );
1065 static PyObject* write( PyObject *
self, PyObject *to_write );
1066 static PyObject* flush( PyObject *
self, PyObject *args );
1067 static PyObject* writeAtLevel( PyObject *
self, PyObject *args );
1081 return PyObject_TypeCheck(o,&PyConsole_Type);
Base header file that handles all configuration related settings.
Header file for PyTypeWrapper.
Defines and function for easy porting to Python 3.
bool PyMatrix3d3f_Check(PyObject *o)
Returns true if its argument is a PyVec3d or PyVec3f.
Definition: PythonTypes.h:820
bool PyVec2d2f_Check(PyObject *o)
Returns true if its argument is a PyVec2d or PyVec2f.
Definition: PythonTypes.h:297
bool PyVec4d4f_Check(PyObject *o)
Returns true if its argument is a PyVec3d or PyVec3f.
Definition: PythonTypes.h:521
bool PyMatrix4d4f_Check(PyObject *o)
Returns true if its argument is a PyVec3d or PyVec3f.
Definition: PythonTypes.h:897
bool PyVec3d3f_Check(PyObject *o)
Returns true if its argument is a PyVec3d or PyVec3f.
Definition: PythonTypes.h:422
This file contains functions for convertion from a string to a value of an X3D field type.
Header file containing all X3D types enumerated.
static bool inMainThread()
H3D API namespace.
Definition: Anchor.h:38
Vec2d H3DAPI_API PyVec2d_AsVec2d(PyObject *o)
Returns an Vec2d representation of the contents of o.
Definition: PythonTypes.cpp:1208
bool PyMatrix3d_Check(PyObject *o)
Returns true if its argument is a PyMatrix3d.
Definition: PythonTypes.h:814
string PyNode_Name()
Returns which is the name the PyNode is to be installed as in Python.
Definition: PythonTypes.h:131
string PyVec2d_Name()
Returns which is the name the PyVec2d is to be installed as in Python.
Definition: PythonTypes.h:282
bool PyQuaternion_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:606
bool PyVec4d_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:515
bool PyMatrix3f_Check(PyObject *o)
Returns true if its argument is a PyMatrix3f.
Definition: PythonTypes.h:667
string PyVec2f_Name()
Returns which is the name the PyVec2f is to be installed as in Python.
Definition: PythonTypes.h:230
string PyVec4d_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:506
string PyRGBA_Name()
Returns which is the name the PyRGBA is to be installed as in Python.
Definition: PythonTypes.h:1010
bool PyVec4f_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:479
PyObject * PyRotation_FromRotation(const Rotation &v)
Creates a new PyRotation object based on the value of v.
Definition: PythonTypes.cpp:4080
Matrix4f H3DAPI_API PyMatrix4f_AsMatrix4f(PyObject *o)
Returns an Matrix4f representation of the contents of o.
Definition: PythonTypes.cpp:2815
Node H3DAPI_API * PyNode_AsNode(PyObject *o)
Returns an Node * representation of the contents of o.
Definition: PythonTypes.cpp:263
PyObject * PyVec4f_FromVec4f(const Vec4f &v)
Creates a new PyVec4f object based on the value of v.
Definition: PythonTypes.cpp:2031
Vec3f H3DAPI_API PyVec3f_AsVec3f(PyObject *o)
Returns an Vec3f representation of the contents of o.
Definition: PythonTypes.cpp:1458
bool PyVec2d_Check(PyObject *o)
Returns true if its argument is a PyVec2d.
Definition: PythonTypes.h:291
PyObject * PyMatrix3f_FromMatrix3f(const Matrix3f &v)
Creates a new PyMatrix3f object based on the value of v.
Definition: PythonTypes.cpp:2519
Matrix4d H3DAPI_API PyMatrix4d_AsMatrix4d(PyObject *o)
Returns an Matrix4d representation of the contents of o.
Definition: PythonTypes.cpp:3626
PyObject * PyQuaternion_FromQuaternion(const Quaternion &v)
Creates a new PyQuaternion object based on the value of v.
Definition: PythonTypes.cpp:4404
string PyRotation_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:552
Vec3d H3DAPI_API PyVec3d_AsVec3d(PyObject *o)
Returns an Vec3d representation of the contents of o.
Definition: PythonTypes.cpp:1743
PyObject * PyVec2d_FromVec2d(const Vec2d &v)
Creates a new PyVec2d object based on the value of v.
Definition: PythonTypes.cpp:1218
RGBA H3DAPI_API PyRGBA_AsRGBA(PyObject *o)
Returns an RGBA representation of the contents of o.
Definition: PythonTypes.cpp:4888
PyObject * PyRGB_FromRGB(const RGB &v)
Creates a new PyRGB object based on the value of v.
Definition: PythonTypes.cpp:4702
Vec2f H3DAPI_API PyVec2f_AsVec2f(PyObject *o)
Returns an Vec2f representation of the contents of o.
Definition: PythonTypes.cpp:949
RGB H3DAPI_API PyRGB_AsRGB(PyObject *o)
Returns an RGB representation of the contents of o.
Definition: PythonTypes.cpp:4692
PyObject H3DAPI_API * PyNode_FromNode(Node *v, bool _refCountNode=true)
Creates a new PyNode object based on the value of v.
Definition: PythonTypes.cpp:276
string PyVec3d_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:407
string PyMatrix4f_Name()
Returns which is the name the PyMatrix4f is to be installed as in Python.
Definition: PythonTypes.h:723
string PyMatrix3d_Name()
Returns which is the name the PyMatrix3d is to be installed as in Python.
Definition: PythonTypes.h:805
PyObject * PyVec3d_FromVec3d(const Vec3d &v)
Creates a new PyVec3d object based on the value of v.
Definition: PythonTypes.cpp:1753
PyObject * PyMatrix3d_FromMatrix3d(const Matrix3d &v)
Creates a new PyMatrix3d object based on the value of v.
Definition: PythonTypes.cpp:3274
PyObject * PyVec3f_FromVec3f(const Vec3f &v)
Creates a new PyVec3f object based on the value of v.
Definition: PythonTypes.cpp:1468
bool PyRGBA_Check(PyObject *o)
Returns true if its argument is a PyRGBA.
Definition: PythonTypes.h:1019
string PyMatrix3f_Name()
Returns which is the name the PyMatrix3f is to be installed as in Python.
Definition: PythonTypes.h:658
Vec4f H3DAPI_API PyVec4f_AsVec4f(PyObject *o)
Returns an Vec4f representation of the contents of o.
Definition: PythonTypes.cpp:2021
bool PyVec2f_Check(PyObject *o)
Returns true if its argument is a PyVec2f.
Definition: PythonTypes.h:239
bool PyConsole_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:1080
Matrix3f H3DAPI_API PyMatrix3f_AsMatrix3f(PyObject *o)
Returns an Matrix3f representation of the contents of o.
Definition: PythonTypes.cpp:2453
bool PyRGB_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:984
bool PyNode_Check(PyObject *o)
Returns true if its argument is a PyNode.
Definition: PythonTypes.h:146
PyObject * PyMatrix4f_FromMatrix4f(const Matrix4f &v)
Creates a new PyMatrix4f object based on the value of v.
Definition: PythonTypes.cpp:2825
PyObject * PyVec2f_FromVec2f(const Vec2f &v)
Creates a new PyVec2f object based on the value of v.
Definition: PythonTypes.cpp:959
bool PyVec3f_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:357
string PyQuaternion_Name()
Returns which is the name the PyQuaternion is to be installed as in Python.
Definition: PythonTypes.h:597
bool PyRotation_Check(PyObject *o)
Returns true if its argument is a PyRotation.
Definition: PythonTypes.h:561
bool PyMatrix4d_Check(PyObject *o)
Returns true if its argument is a PyMatrix4d.
Definition: PythonTypes.h:891
string PyVec4f_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:470
string PyRGB_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:975
Quaternion H3DAPI_API PyQuaternion_AsQuaternion(PyObject *o)
Returns an Quaternion representation of the contents of o.
Definition: PythonTypes.cpp:4394
bool PyMatrix4f_Check(PyObject *o)
Returns true if its argument is a PyMatrix4f.
Definition: PythonTypes.h:732
Rotation H3DAPI_API PyRotation_AsRotation(PyObject *o)
Returns an Rotation representation of the contents of o.
Definition: PythonTypes.cpp:4070
string PyMatrix4d_Name()
Returns which is the name the PyMatrix4d is to be installed as in Python.
Definition: PythonTypes.h:882
string PyConsole_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:1077
PyObject * PyVec4d_FromVec4d(const Vec4d &v)
Creates a new PyVec4d object based on the value of v.
Definition: PythonTypes.cpp:2248
bool PyVec3d_Check(PyObject *o)
Returns true if its argument is a PyVec3f.
Definition: PythonTypes.h:416
PyObject * PyRGBA_FromRGBA(const RGBA &v)
Creates a new PyRGBA object based on the value of v.
Definition: PythonTypes.cpp:4898
Matrix3d H3DAPI_API PyMatrix3d_AsMatrix3d(PyObject *o)
Returns an Matrix3d representation of the contents of o.
Definition: PythonTypes.cpp:3264
string PyVec3f_Name()
Returns which is the name the PyVec3f is to be installed as in Python.
Definition: PythonTypes.h:348
Vec4d H3DAPI_API PyVec4d_AsVec4d(PyObject *o)
Returns an Vec4d representation of the contents of o.
Definition: PythonTypes.cpp:2238
PyObject * PyMatrix4d_FromMatrix4d(const Matrix4d &v)
Creates a new PyMatrix4d object based on the value of v.
Definition: PythonTypes.cpp:3636
Python C Type wrapper around Matrix3d.
Definition: PythonTypes.h:836
static int init(PyMatrix3d *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Matrix3d value from a python string argument list.
Definition: PythonTypes.cpp:3281
static PyObject * transpose(PyObject *self, PyObject *args)
Returns the transpose of the matrix.
Definition: PythonTypes.cpp:3421
static PyObject * inverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:3416
static PyObject * setElement(PyObject *self, PyObject *args)
Set an element in the matrix.
Definition: PythonTypes.cpp:3373
static PyObject * toEulerAngles(PyObject *self, PyObject *args)
Get the euler angles( yaw, pitch, roll ) representation of the rotation matrix.
Definition: PythonTypes.cpp:3426
static PyObject * getElement(PyObject *self, PyObject *args)
Get an element in the matrix.
Definition: PythonTypes.cpp:3352
static PyObject * getScalePart(PyObject *self, PyObject *args)
Get the scaling part of the matrix for each axis.
Definition: PythonTypes.cpp:3431
static PyObject * getColumn(PyObject *self, PyObject *args)
Get a column of the matrix.
Definition: PythonTypes.cpp:3447
static PyObject * setToIdentity(PyObject *self, PyObject *args)
Set to the identity matrix.
Definition: PythonTypes.cpp:3408
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two Matrix3d objects.
Definition: PythonTypes.cpp:3326
static PyObject * getRow(PyObject *self, PyObject *args)
Get a row of the matrix.
Definition: PythonTypes.cpp:3436
Python C Type wrapper around Matrix3f.
Definition: PythonTypes.h:677
static PyObject * setToIdentity(PyObject *self, PyObject *args)
Set to the identity matrix.
Definition: PythonTypes.cpp:2598
static PyObject * setElement(PyObject *self, PyObject *args)
Set an element in the matrix.
Definition: PythonTypes.cpp:2483
static PyObject * getRow(PyObject *self, PyObject *args)
Get a row of the matrix.
Definition: PythonTypes.cpp:2626
static PyObject * toEulerAngles(PyObject *self, PyObject *args)
Get the euler angles( yaw, pitch, roll ) representation of the rotation matrix.
Definition: PythonTypes.cpp:2616
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two Matrix3f objects.
Definition: PythonTypes.cpp:2572
static PyObject * getScalePart(PyObject *self, PyObject *args)
Get the scaling part of the matrix for each axis.
Definition: PythonTypes.cpp:2621
static PyObject * inverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:2606
static int init(PyMatrix3f *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Matrix3f value from a python string argument list.
Definition: PythonTypes.cpp:2526
static PyObject * getColumn(PyObject *self, PyObject *args)
Get a column of the matrix.
Definition: PythonTypes.cpp:2637
static PyObject * getElement(PyObject *self, PyObject *args)
Get an element in the matrix.
Definition: PythonTypes.cpp:2462
static PyObject * transpose(PyObject *self, PyObject *args)
Returns the transpose of the matrix.
Definition: PythonTypes.cpp:2611
Python C Type wrapper around Matrix4d.
Definition: PythonTypes.h:913
static PyObject * getColumn(PyObject *self, PyObject *args)
Get a column of the matrix.
Definition: PythonTypes.cpp:3874
static PyObject * transpose(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:3848
static PyObject * getElement(PyObject *self, PyObject *args)
Get an element in the matrix.
Definition: PythonTypes.cpp:3774
static PyObject * setElement(PyObject *self, PyObject *args)
Set an element in the matrix.
Definition: PythonTypes.cpp:3795
static PyObject * transformInverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix assuming that it is on the form.
Definition: PythonTypes.cpp:3838
static PyObject * getScalePart(PyObject *self, PyObject *args)
Returns the scaling part of the Matrix4d.
Definition: PythonTypes.cpp:3853
static int init(PyMatrix4d *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Matrix4d value from a python string argument list.
Definition: PythonTypes.cpp:3643
static PyObject * setToIdentity(PyObject *self, PyObject *args)
Set to the identity matrix.
Definition: PythonTypes.cpp:3830
static PyObject * getTranslationPart(PyObject *self, PyObject *args)
Returns the translation part of the Matrix4d.
Definition: PythonTypes.cpp:3858
static PyObject * getRotationPart(PyObject *self, PyObject *args)
Returns the rotation part of the Matrix4d.
Definition: PythonTypes.cpp:3891
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two Matrix4d objects.
Definition: PythonTypes.cpp:3742
static PyObject * getScaleRotationPart(PyObject *self, PyObject *args)
Returns the scale and rotation part of the Matrix4d.
Definition: PythonTypes.cpp:3885
static PyObject * getRow(PyObject *self, PyObject *args)
Get a row of the matrix.
Definition: PythonTypes.cpp:3863
static PyObject * inverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:3843
Python C Type wrapper around Matrix4f.
Definition: PythonTypes.h:742
static PyObject * getScaleRotationPart(PyObject *self, PyObject *args)
Returns the scale and rotation part of the Matrix4f.
Definition: PythonTypes.cpp:3086
static PyObject * getRotationPart(PyObject *self, PyObject *args)
Returns the rotation part of the Matrix4f.
Definition: PythonTypes.cpp:3092
static PyObject * getRow(PyObject *self, PyObject *args)
Get a row of the matrix.
Definition: PythonTypes.cpp:3064
static PyObject * setToIdentity(PyObject *self, PyObject *args)
Set to the identity matrix.
Definition: PythonTypes.cpp:3031
static PyObject * setElement(PyObject *self, PyObject *args)
Set an element in the matrix.
Definition: PythonTypes.cpp:2996
static PyObject * getElement(PyObject *self, PyObject *args)
Get an element in the matrix.
Definition: PythonTypes.cpp:2975
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two Matrix4f objects.
Definition: PythonTypes.cpp:2942
static PyObject * inverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:3044
static PyObject * getTranslationPart(PyObject *self, PyObject *args)
Returns the translation part of the Matrix4f.
Definition: PythonTypes.cpp:3059
static PyObject * getScalePart(PyObject *self, PyObject *args)
Returns the scaling part of the Matrix4f.
Definition: PythonTypes.cpp:3054
static PyObject * transpose(PyObject *self, PyObject *args)
Returns the inverse of the matrix.
Definition: PythonTypes.cpp:3049
static PyObject * getColumn(PyObject *self, PyObject *args)
Get a column of the matrix.
Definition: PythonTypes.cpp:3075
static int init(PyMatrix4f *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Matrix4f value from a python string argument list.
Definition: PythonTypes.cpp:2832
static PyObject * transformInverse(PyObject *self, PyObject *args)
Returns the inverse of the matrix assuming that it is on the form.
Definition: PythonTypes.cpp:3039
Python C Type wrapper around Node*.
Definition: PythonTypes.h:152
static PyObject * getFieldList(PyObject *myself, PyObject *args)
Get the list of fields available in this Node.
Definition: PythonTypes.cpp:746
static PyObject * getSingleField(PyObject *self, PyObject *args)
Get a field from the node database.
Definition: PythonTypes.cpp:725
static PyObject * getField(PyObject *myself, char *arg)
Get the field of a node. arg is the name of the field.
Definition: PythonTypes.cpp:714
static PyObject * removeField(PyObject *self, PyObject *args)
If this Node is a DynamicFieldsObject then the specified field is removed.
Definition: PythonTypes.cpp:350
static int init(PyNode *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Node value from a python string argument list.
Definition: PythonTypes.cpp:645
static PyObject * clearFields(PyObject *self, PyObject *args)
If this Node is a DynamicFieldsObject then all dynamic fields are removed.
Definition: PythonTypes.cpp:374
static PyObject * closestPoint(PyObject *self, PyObject *args)
Calculate the closest point to the node.
Definition: PythonTypes.cpp:414
static void dealloc(PyNode *self)
Python type deallocation.
Definition: PythonTypes.cpp:640
static PyObject * lineIntersect(PyObject *self, PyObject *args)
Calculate a line intersection with the node.
Definition: PythonTypes.cpp:493
static int compare(PyObject *veca, PyObject *vecb)
Test if two PyNode are equal or not.
Definition: PythonTypes.cpp:601
static PyObject * repr(PyNode *myself, PyObject *args)
Converts a PyNode to a char* string.
Definition: PythonTypes.cpp:653
static PyObject * getTypeName(PyObject *myself, PyObject *args)
Get the type name of this node, i.e. "Group".
Definition: PythonTypes.cpp:672
static PyObject * setName(PyObject *self, PyObject *args)
Set the name of this node.
Definition: PythonTypes.cpp:682
static PyObject * getName(PyObject *myself, PyObject *args)
Get the name of this node.
Definition: PythonTypes.cpp:662
static PyObject * addField(PyObject *self, PyObject *args)
If this Node is a DynamicFieldsObject a new field is added.
Definition: PythonTypes.cpp:291
static PyObject * getAttr(PyObject *myself, char *arg)
If myself encapsulates a node that is not a PythonScript node it works just as getField.
Definition: PythonTypes.cpp:696
static PyObject * create()
create() a new instance of PyNode using Python to allocate the memory and initialise the PyObject hea...
Definition: PythonTypes.cpp:597
static PyObject * clone(PyObject *self, PyObject *args)
Create a clone of the node.
Definition: PythonTypes.cpp:391
PyNumberTypeWrapper is the same as PyNumberTypeWrapperBase with the difference that its mul function ...
Definition: PyTypeWrapper.h:357
Python C Type wrapper around Quaternion.
Definition: PythonTypes.h:617
static PyObject * dotProduct(PyObject *self, PyObject *args)
dotProduct() returns the cos(angle) between two quaternions
Definition: PythonTypes.cpp:4473
static PyObject * normalize(PyObject *self, PyObject *args)
Normalize the Quaternion, i.e.
Definition: PythonTypes.cpp:4465
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two PyQuaternion objects.
Definition: PythonTypes.cpp:4373
static PyObject * slerp(PyObject *self, PyObject *args)
Spherical linear interpolation between two Quaternions.
Definition: PythonTypes.cpp:4484
static PyObject * toEulerAngles(PyObject *self, PyObject *args)
Get the euler angles( yaw, pitch, roll ) representation of the Rotation.
Definition: PythonTypes.cpp:4511
static PyObject * norm(PyObject *self, PyObject *args)
Returns the Quaternion norm.
Definition: PythonTypes.cpp:4506
static PyObject * inverse(PyObject *self, PyObject *args)
Returns the inverse of the Quaternion.
Definition: PythonTypes.cpp:4521
static int init(PyQuaternion *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Quaternion value from a python string argument list.
Definition: PythonTypes.cpp:4411
static PyObject * conjugate(PyObject *self, PyObject *args)
Returns the conjugate of the Quaternion.
Definition: PythonTypes.cpp:4516
Python C Type wrapper around RGBA.
Definition: PythonTypes.h:1030
static int init(PyRGBA *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the RGBA value from a python string argument list.
Definition: PythonTypes.cpp:4906
Python C Type wrapper around RGB.
Definition: PythonTypes.h:995
static int init(PyRGB *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the RGB value from a python string argument list.
Definition: PythonTypes.cpp:4709
Python C Type wrapper around Rotation.
Definition: PythonTypes.h:572
static PyObject * slerp(PyObject *self, PyObject *args)
Spherical linear interpolation between two Rotations.
Definition: PythonTypes.cpp:4087
static int init(PyRotation *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Rotation value from a python string argument list.
Definition: PythonTypes.cpp:4109
static PyObject * mul(PyObject *rota, PyObject *rotb)
Multiplies two Matrix3f objects.
Definition: PythonTypes.cpp:4173
static PyObject * toEulerAngles(PyObject *self, PyObject *args)
Get the euler angles( yaw, pitch, roll ) representation of the Rotation.
Definition: PythonTypes.cpp:4193
PyTypeWrapper is a template wrapper class to create new Python types from types already existing in t...
Definition: PyTypeWrapper.h:92
Base class for all Python C type wrappers.
Definition: PyTypeWrapper.h:71
Python C Type wrapper around Vec2d.
Definition: PythonTypes.h:317
static PyObject * normalizeSafe(PyObject *self, PyObject *args)
Normalize the vector to be of length 1.
Definition: PythonTypes.cpp:1276
static int init(PyVec2d *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec2d value from a python string argument list.
Definition: PythonTypes.cpp:1224
static PyObject * length(PyObject *self, PyObject *args)
Get the length of the PyVec2d. args is ignored.
Definition: PythonTypes.cpp:1253
static PyObject * dotProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:1195
static PyObject * normalize(PyObject *self, PyObject *args)
Normalizes the PyVec2d to be of length 1. args is ignored.
Definition: PythonTypes.cpp:1263
static PyObject * lengthSqr(PyObject *self, PyObject *args)
Get the length squared of the PyVec2d. args is ignored.
Definition: PythonTypes.cpp:1258
Python C Type wrapper around Vec2f.
Definition: PythonTypes.h:251
static PyObject * normalizeSafe(PyObject *self, PyObject *args)
Normalize the vector to be of length 1.
Definition: PythonTypes.cpp:1017
static PyObject * lengthSqr(PyObject *self, PyObject *args)
Get the length squared of the PyVec2f. args is ignored.
Definition: PythonTypes.cpp:999
static PyObject * dotProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:936
static int init(PyVec2f *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec2f value from a python string argument list.
Definition: PythonTypes.cpp:966
static PyObject * normalize(PyObject *self, PyObject *args)
Normalizes the PyVec2f to be of length 1. args is ignored.
Definition: PythonTypes.cpp:1004
static PyObject * length(PyObject *self, PyObject *args)
Get the length of the PyVec2f. args is ignored.
Definition: PythonTypes.cpp:994
Python C Type wrapper around Vec3d.
Definition: PythonTypes.h:441
static PyObject * lengthSqr(PyObject *self, PyObject *args)
Get the length squared of the PyVec3d.
Definition: PythonTypes.cpp:1828
static PyObject * crossProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:1772
static PyObject * dotProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:1760
static int init(PyVec3d *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec3d value from a python string argument list.
Definition: PythonTypes.cpp:1784
static PyObject * length(PyObject *self, PyObject *args)
Get the length of the PyVec3d.
Definition: PythonTypes.cpp:1823
static PyObject * normalizeSafe(PyObject *self, PyObject *args)
Normalize the vector to be of length 1.
Definition: PythonTypes.cpp:1846
static PyObject * normalize(PyObject *self, PyObject *args)
Normalizes the PyVec3d to be of length 1.
Definition: PythonTypes.cpp:1833
Python C Type wrapper around Vec3f.
Definition: PythonTypes.h:369
static PyObject * dotProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:1505
static PyObject * normalize(PyObject *self, PyObject *args)
Normalizes the PyVec3f to be of length 1. args is ignored.
Definition: PythonTypes.cpp:1549
static PyObject * mod(PyObject *veca, PyObject *vecb)
Performs Vec3f cross product of two PyVec3f instances.
Definition: PythonTypes.cpp:1529
static int init(PyVec3f *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec3f value from a python string argument list.
Definition: PythonTypes.cpp:1475
static PyObject * lengthSqr(PyObject *self, PyObject *args)
Get the length squared of the PyVec3f. args is ignored.
Definition: PythonTypes.cpp:1544
static PyObject * normalizeSafe(PyObject *self, PyObject *args)
Normalize the vector to be of length 1.
Definition: PythonTypes.cpp:1562
static PyObject * crossProduct(PyObject *self, PyObject *args)
Returns the dot product between two vectors.
Definition: PythonTypes.cpp:1517
static PyObject * length(PyObject *self, PyObject *args)
Get the length of the PyVec3f. args is ignored.
Definition: PythonTypes.cpp:1539
Python C Type wrapper around Vec4d.
Definition: PythonTypes.h:537
static int init(PyVec4d *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec4d value from a python string argument list.
Definition: PythonTypes.cpp:2255
Python C Type wrapper around Vec4f.
Definition: PythonTypes.h:490
static int init(PyVec4f *self, PyObject *args, PyObject *kwds)
Python type initialisation: will set the Vec4f value from a python string argument list.
Definition: PythonTypes.cpp:2038
PyVecTypeWrapper is the same as PyNumberTypeWrapperBase with the difference that its mul function als...
Definition: PyTypeWrapper.h:315