Show
Ignore:
Timestamp:
03/03/08 18:39:26 (10 months ago)
Author:
JonNeal
Message:

Transferred almost all of the ode functions and such to pyrex!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pysoy/include/ode.pxd

    r971 r1011  
    9090    dLastUserClass 
    9191    dMaxUserClasses 
    92  
     92     
    9393  ctypedef float dReal 
    94  
    9594  ctypedef dReal dVector3[4] 
    9695  ctypedef dReal dVector4[4] 
     
    10099  ctypedef dReal dQuaternion[4] 
    101100 
    102   cdef struct dxWorld : 
    103     void *none 
    104   cdef struct dxSpace : 
    105     void *none 
    106   cdef struct dxBody : 
    107     void *none 
    108   cdef struct dxGeom : 
    109     void *none 
    110   cdef struct dxJoint : 
    111     void *none 
    112   cdef struct dxJointGroup : 
    113     void *none 
    114   cdef struct dxTriMeshData : 
    115     void *none 
    116   cdef struct dxHeightfieldData : 
    117     void *none 
     101  cdef :  
     102    struct dxWorld 
     103    struct dxSpace 
     104    struct dxBody 
     105    struct dxGeom 
     106    struct dxJoint 
     107    struct dxJointGroup 
     108    struct dxTriMeshData 
     109    struct dxHeightfieldData 
    118110   
    119   ctypedef dxHeightfieldData* dHeightfieldDataID 
    120    
    121   ctypedef dReal dHeightfieldGetHeight ( void*, int, int ) 
    122  
    123111  ctypedef dxWorld* dWorldID 
    124112  ctypedef dxSpace* dSpaceID 
     
    127115  ctypedef dxJoint* dJointID 
    128116  ctypedef dxJointGroup*  dJointGroupID 
    129   ctypedef dxTriMeshData* dTryMeshDataID 
     117  ctypedef dxTriMeshData* dTriMeshDataID 
     118  ctypedef dxHeightfieldData* dHeightfieldDataID 
    130119 
    131120  cdef struct dMass : 
    132     dReal       mass 
    133     dVector4    c 
    134     dMatrix3    I 
     121    dReal     mass 
     122    dVector4  c 
     123    dMatrix3  I 
    135124 
    136125  cdef struct dJointFeedback : 
    137     dVector3 f1 
    138     dVector3 t1 
    139     dVector3 f2 
    140     dVector3 t2 
     126    dVector3  f1 
     127    dVector3  t1 
     128    dVector3  f2 
     129    dVector3  t2 
    141130 
    142131  cdef struct dContactGeom : 
    143     dVector3    pos 
    144     dVector3    normal 
    145     dReal       depth 
    146     dGeomID     g1, g2 
     132    dVector3  pos 
     133    dVector3  normal 
     134    dReal     depth 
     135    dGeomID   g1, g2 
     136    int       side1,side2 
    147137 
    148138  cdef struct dSurfaceParameters : 
    149     int                  mode 
    150     dReal                mu, mu2 
    151     dReal                bounce 
    152     dReal                bounce_vel 
    153     dReal                soft_erp 
    154     dReal                soft_cfm 
    155     dReal                motion1, motion2 
    156     dReal                slip1, slip2 
     139    int       mode 
     140    dReal     mu, mu2 
     141    dReal     bounce 
     142    dReal     bounce_vel 
     143    dReal     soft_erp 
     144    dReal     soft_cfm 
     145    dReal     motion1, motion2 
     146    dReal     slip1, slip2 
    157147 
    158148  cdef struct dContact : 
    159     dSurfaceParameters   surface 
    160     dContactGeom         geom 
    161     dVector3             fdir1 
    162  
    163   ctypedef void dGetAABBFn  ( dGeomID, dReal ) 
    164   ctypedef int  dColliderFn ( dGeomId, dGeomId, int, dContactGeom*, int ) 
     149    dSurfaceParameters  surface 
     150    dContactGeom        geom 
     151    dVector3            fdir1 
     152   
     153  cdef struct dStopwatch : 
     154    double time 
     155    unsigned long cc[2] 
     156     
     157  ctypedef void  dGetAABBFn       ( dGeomID, dReal ) 
     158  ctypedef int   dColliderFn      ( dGeomId, dGeomId, int, dContactGeom*, int ) 
    165159  ctypedef dColliderFn* dGetColliderFnFn ( int ) 
    166   ctypedef void dGeomDtorFn ( dGeomID ) 
    167   ctypedef int  dAABBTestFn ( dGeomID, dGeomID, dReal ) 
     160  ctypedef void  dGeomDtorFn      ( dGeomID ) 
     161  ctypedef int   dAABBTestFn      ( dGeomID, dGeomID, dReal ) 
     162  ctypedef void  dMessageFunction ( int, char*, va_list ) 
     163  ctypedef int   dTriCallback     ( dGeomID, dGeomID, int ) 
     164  ctypedef void  dTriArrayCallback( dGeomID, dGeomID, int*, int ) 
     165  ctypedef int   dTriRayCallback  ( dGeomID, dGeomID, int, dReal, dReal ) 
     166  ctypedef dReal dHeightfieldGetHeight( void*, int, int ) 
     167  ctypedef void  dNearCallback    ( void*, dGeomID, dGeomID ) 
     168  ctypedef void* dAllocFunction   ( size_t ) 
     169  ctypedef void* dReallocFunction ( void*, size_t, size_t ) 
     170  ctypedef void  dFreeFunction    ( void*, size_t ) 
     171   
    168172  cdef struct dGeomClass:  
    169     int                bytes 
     173    int               bytes 
    170174    dGetColliderFnFn  *collider 
    171175    dGetAABBFn        *aabb 
    172176    dAABBTestFn       *aabb_test 
    173177    dGeomDtorFn       *dtor 
    174    
    175  
    176  
    177   cdef void  dInitODE() 
    178   cdef void  dCloseODE() 
    179  
    180   cdef dWorldID dWorldCreate       ( ) 
    181   cdef void  dWorldDestroy         ( dWorldID ) 
    182   cdef void  dWorldSetGravity      ( dWorldID, dReal, dReal, dReal ) 
    183   cdef void  dWorldGetGravity      ( dWorldID, dVector3 ) 
    184   cdef void  dWorldSetERP          ( dWorldID, dReal ) 
    185   cdef dReal dWorldGetERP          ( dWorldID ) 
    186   cdef void  dWorldSetCFM          ( dWorldID, dReal ) 
    187   cdef dReal dWorldGetCFM          ( dWorldID ) 
    188   cdef void  dWorldQuickStep       ( dWorldID, dReal stepsize ) 
    189   cdef void  dWorldImpulseToForce  ( dWorldID, dReal, dReal, dReal, dReal,  
    190                                     dVector3 ) 
    191   cdef void  dBodyAddForce         ( dBodyID, dReal, dReal, dReal ) 
    192   cdef void  dBodyAddForceAtRelPos ( dBodyID, dReal, dReal, dReal, dReal, dReal, dReal ) 
    193  
    194   cdef void   dBodySetData         ( dBodyID, void *data ) 
    195   cdef void  *dBodyGetData         ( dBodyID ) 
    196    
    197   cdef dBodyID dBodyCreate        ( dWorldID ) 
    198   cdef void    dBodyDestroy       ( dBodyID ) 
    199   cdef void    dBodyGetMass       ( dBodyID, dMass* ) 
    200   cdef void    dBodySetMass       ( dBodyID, dMass* ) 
    201   cdef dReal  *dBodyGetPosition   ( dBodyID ) 
    202   cdef dReal  *dBodyGetRotation   ( dBodyID ) 
    203   cdef dReal  *dBodyGetQuaternion ( dBodyID ) 
    204   cdef dReal  *dBodyGetLinearVel  ( dBodyID ) 
    205   cdef dReal  *dBodyGetAngularVel ( dBodyID ) 
    206   cdef int     dBodyGetGravityMode( dBodyID ) 
    207   cdef void    dBodyCopyPosition  ( dBodyID, dVector3 ) 
    208   cdef void    dBodyCopyRotation  ( dBodyID, dMatrix3 ) 
    209   cdef void    dBodyCopyQuaternion( dBodyID, dQuaternion ) 
    210   cdef void    dBodySetPosition   ( dBodyID, dReal, dReal, dReal ) 
    211   cdef void    dBodySetRotation   ( dBodyID, dMatrix3 ) 
    212   cdef void    dBodySetQuaternion ( dBodyID, dQuaternion ) 
    213   cdef void    dBodySetLinearVel  ( dBodyID, dReal, dReal, dReal ) 
    214   cdef void    dBodySetAngularVel ( dBodyID, dReal, dReal, dReal ) 
    215   cdef void    dBodySetGravityMode( dBodyID, int ) 
    216  
    217   # Space functions 
    218  
    219   ctypedef void (*dNearCallback)     ( void*, dGeomID, dGeomID ) 
    220   cdef dSpaceID dSimpleSpaceCreate   ( dSpaceID ) 
    221   cdef dSpaceID dHashSpaceCreate     ( dSpaceID ) 
    222   cdef dSpaceID dQuadTreeSpaceCreate ( dSpaceID, dVector3, dVector3, int ) 
    223   cdef void     dSpaceDestroy        ( dSpaceID ) 
    224   cdef void     dHashSpaceSetLevels  ( dSpaceID, int, int ) 
    225   cdef void     dHashSpaceGetLevels  ( dSpaceID, int*, int* ) 
    226   cdef void     dSpaceSetCleanup     ( dSpaceID, int ) 
    227   cdef int      dSpaceGetCleanup     ( dSpaceID ) 
    228   cdef void     dSpaceAdd            ( dSpaceID, dGeomID ) 
    229   cdef void     dSpaceRemove         ( dSpaceID, dGeomID ) 
    230   cdef int      dSpaceQuery          ( dSpaceID, dGeomID ) 
    231   cdef void     dSpaceClean          ( dSpaceID ) 
    232   cdef int      dSpaceGetNumGeoms    ( dSpaceID ) 
    233   cdef dGeomID  dSpaceGetGeom        ( dSpaceID, int ) 
    234  
    235   # Collision functions 
    236  
    237   cdef void     dSpaceCollide        ( dSpaceID, void*, dNearCallback ) 
    238   cdef void     dSpaceCollide2       ( dGeomID, dGeomID, void*, dNearCallback ) 
    239   cdef int      dCollide             ( dGeomID, dGeomID, int, dContactGeom*, int ) 
    240  
    241   # General geom functions 
    242   cdef void           dGeomDestroy          ( dGeomID ) 
    243   cdef void           dGeomSetData          ( dGeomID, void* ) 
    244   cdef void*          dGeomGetData          ( dGeomID ) 
    245   cdef void           dGeomSetBody          ( dGeomID, dBodyID ) 
    246   cdef dBodyID        dGeomGetBody          ( dGeomID ) 
    247   cdef void           dGeomSetPosition      ( dGeomID, dReal , dReal, dReal ) 
    248   cdef void           dGeomSetRotation      ( dGeomID, dMatrix3 ) 
    249   cdef void           dGeomSetQuaternion    ( dGeomID, dQuaternion ) 
    250   cdef dReal*         dGeomGetPosition      ( dGeomID ) 
    251   cdef void           dGeomCopyPosition     ( dGeomID, dVector3 ) 
    252   cdef dReal*         dGeomGetRotation      ( dGeomID ) 
    253   cdef void           dGeomCopyRotation     ( dGeomID, dMatrix3 ) 
    254   cdef void           dGeomGetQuaternion    ( dGeomID, dQuaternion ) 
    255   cdef void           dGeomGetAABB          ( dGeomID, dReal[6] ) 
    256   cdef int            dGeomIsSpace          ( dGeomID ) 
    257   cdef dSpaceID       dGeomGetSpace         ( dGeomID ) 
    258   cdef int            dGeomGetClass         ( dGeomID ) 
    259   cdef void           dGeomSetCategoryBits  ( dGeomID, unsigned long ) 
    260   cdef void           dGeomSetCollideBits   ( dGeomID, unsigned long ) 
    261   cdef unsigned long  dGeomGetCategoryBits  ( dGeomID ) 
    262   cdef unsigned long  dGeomGetCollideBits   ( dGeomID ) 
    263   cdef void           dGeomEnable           ( dGeomID ) 
    264   cdef void           dGeomDisable          ( dGeomID ) 
    265   cdef int            dGeomIsEnabled        ( dGeomID ) 
    266    
    267   # Offset geom functions 
    268   cdef void           dGeomSetOffsetPosition        ( dGeomID, dReal, 
    269                                                       dReal, dReal ) 
    270   cdef void           dGeomSetOffsetRotation        ( dGeomID, dMatrix3 ) 
    271   cdef void           dGeomSetOffsetQuaternion      ( dGeomID, dQuaternion ) 
    272   cdef void           dGeomSetOffsetWorldPosition   ( dGeomID, dReal, 
    273                                                       dReal, dReal ) 
    274   cdef void           dGeomSetOffsetWorldRotation   ( dGeomID, dMatrix3 ) 
    275   cdef void           dGeomSetOffsetWorldQuaternion ( dGeomID, dQuaternion ) 
    276   cdef void           dGeomClearOffset              ( dGeomID ) 
    277   cdef int            dGeomIsOffset                 ( dGeomID ) 
    278   cdef dReal*         dGeomGetOffsetPosition        ( dGeomID ) 
    279   cdef void           dGeomCopyOffsetPosition       ( dGeomID, dVector3 ) 
    280   cdef dReal*         dGeomGetOffsetRotation        ( dGeomID ) 
    281   cdef void           dGeomCopyOffsetRotation       ( dGeomID, dMatrix3 ) 
    282   cdef void           dGeomGetOffsetQuaternion      ( dGeomID, dQuaternion ) 
    283  
    284   # Specific geom functions 
    285   cdef void           dGeomSphereSetRadius     ( dGeomID, dReal ) 
    286   cdef void           dGeomBoxSetLengths       ( dGeomID, dReal, dReal, dReal ) 
    287   cdef void           dGeomBoxGetLengths       ( dGeomID, dVector3 ) 
    288   cdef void           dGeomPlaneSetParams      ( dGeomID, dReal, dReal, dReal, 
    289                                                  dReal ) 
    290   cdef void           dGeomPlaneGetParams      ( dGeomID, dVector4 ) 
    291   cdef void           dGeomCCylinderSetParams  ( dGeomID, dReal, dReal ) 
    292   cdef void           dGeomCCylinderGetParams  ( dGeomID, dReal*, dReal* ) 
    293   cdef void           dGeomRaySetLength        ( dGeomID, dReal ) 
    294   cdef void           dGeomRaySet              ( dGeomID, dReal, dReal, dReal, 
    295                                                  dReal, dReal, dReal) 
    296   cdef void           dGeomRaySetParams        ( dGeomID, int, int ) 
    297   cdef void           dGeomRayGet              ( dGeomID, dVector3, dVector3 ) 
    298   cdef void           dGeomRayGetParams        ( dGeomID, int*, int* ) 
    299   cdef dReal          dGeomSphereGetRadius     ( dGeomID ) 
    300   cdef dReal          dGeomSpherePointDepth    ( dGeomID, dReal, dReal, dReal ) 
    301   cdef dGeomID        dCreateConvex            ( dSpaceID, dReal*, 
    302                                                  unsigned int, dReal*, 
    303                                                  unsigned int, unsigned int* ) 
    304   cdef void           dGeomSetConvex           ( dGeomID, dReal*,  
    305                                                  unsigned int, dReal*, 
    306                                                  unsigned int, unsigned int* ) 
    307   cdef dReal          dGeomBoxPointDepth       ( dGeomID, dReal, dReal, dReal ) 
    308   cdef dReal          dGeomPlanePointDepth     ( dGeomID, dReal, dReal, dReal ) 
    309   cdef dReal          dGeomCCylinderPointDepth ( dGeomID, dReal, dReal, dReal) 
    310   cdef dReal          dGeomRayGetLength        ( dGeomID ) 
    311   cdef dGeomID        dCreateSphere            ( dSpaceID, dReal ) 
    312   cdef dGeomID        dCreateBox               ( dSpaceID, dReal, dReal, 
    313                                                  dReal ) 
    314   cdef dGeomID        dCreatePlane             ( dSpaceID, dReal, dReal, 
    315                                                  dReal, dReal) 
    316   cdef dGeomID        dCreateCCylinder         ( dSpaceID, dReal, dReal ) 
    317   cdef dGeomID        dCreateRay               ( dSpaceID, dReal ) 
    318   cdef dGeomID        dCreateCapsule           ( dSpaceID, dReal, dReal ) 
    319   cdef void           dGeomCapsuleSetParams    ( dGeomID, dReal, dReal ) 
    320   cdef void           dGeomCapsuleGetParams    ( dGeomID, dReal*, dReal* ) 
    321   cdef dReal          dGeomCapsulePointDepth   ( dGeomID, dReal, dReal, dReal ) 
    322   cdef dGeomID        dCreateCylinder          ( dSpaceID, dReal, dReal ) 
    323   cdef void           dGeomCylinderSetParams   ( dGeomID, dReal, dReal ) 
    324   cdef void           dGeomCylinderGetParams   ( dGeomID, dReal*, dReal* ) 
    325   cdef void           dGeomRaySetClosestHit    ( dGeomID, int ) 
    326   cdef int            dGeomRayGetClosestHit    ( dGeomID ) 
    327   cdef dGeomID        dCreateGeomTransform     ( dSpaceID ) 
    328   cdef void           dGeomTransformSetGeom    ( dGeomID, dReal ) 
    329   cdef dGeomID        dGeomTransformGetGeom    ( dGeomID ) 
    330   cdef void           dGeomTransformSetCleanup ( dGeomID, int ) 
    331   cdef int            dGeomTransformGetCleanup ( dGeomID ) 
    332   cdef void           dGeomTransformSetInfo    ( dGeomID, int ) 
    333   cdef int            dGeomTransformGetInfo    ( dGeomID ) 
    334  
    335   cdef dJointID dJointCreateBall         ( dWorldID, dJointGroupID ) 
    336   cdef dJointID dJointCreateHinge        ( dWorldID, dJointGroupID ) 
    337   cdef dJointID dJointCreateSlider       ( dWorldID, dJointGroupID ) 
    338   cdef dJointID dJointCreateContact      ( dWorldID, dJointGroupID, dContact* ) 
    339   cdef dJointID dJointCreateHinge2       ( dWorldID, dJointGroupID ) 
    340   cdef dJointID dJointCreateUniversal    ( dWorldID, dJointGroupID ) 
    341   cdef dJointID dJointCreatePR           ( dWorldID, dJointGroupID ) 
    342   cdef dJointID dJointCreateFixed        ( dWorldID, dJointGroupID ) 
    343   cdef dJointID dJointCreateNull         ( dWorldID, dJointGroupID ) 
    344   cdef dJointID dJointCreateAMotor       ( dWorldID, dJointGroupID ) 
    345   cdef dJointID dJointCreateLMotor       ( dWorldID, dJointGroupID ) 
    346   cdef dJointID dJointCreatePlane2D      ( dWorldID, dJointGroupID ) 
    347   cdef void     dJointDestroy            ( dJointID ) 
    348   cdef dJointGroupID dJointGroupCreate   ( int ) 
    349   cdef void          dJointGroupDestroy  ( dJointGroupID ) 
    350   cdef void          dJointGroupEmpty    ( dJointGroupID ) 
    351   cdef void  dJointAttach                ( dJointID, dBodyID, dBodyID ) 
    352   cdef void  dJointSetData               ( dJointID, void* ) 
    353   cdef void  dJointGetData               ( dJointID ) 
    354   cdef void  dJointGetType               ( dJointID ) 
    355   cdef void  dJointGetBody               ( dJointID, int index ) 
    356   cdef void  dJointSetFeedback           ( dJointID, dJointFeedback* ) 
    357   cdef void  dJointGetFeedback           ( dJointID ) 
    358   cdef void  dJointSetBallAnchor         ( dJointID, dReal, dReal, dReal ) 
    359   cdef void  dJointSetBallAnchor2        ( dJointID, dReal, dReal, dReal ) 
    360   cdef void  dJointSetHingeAnchor        ( dJointID, dReal, dReal, dReal ) 
    361   cdef void  dJointSetHingeAnchorDelta   ( dJointID, dReal, dReal, dReal,  
    362                                                      dReal, dReal, dReal ) 
    363   cdef void  dJointSetHingeAxis          ( dJointID, dReal, dReal, dReal ) 
    364   cdef void  dJointSetHingeParam         ( dJointID, int, dReal ) 
    365   cdef void  dJointAddHingeTorque        ( dJointID, dReal ) 
    366   cdef void  dJointSetSliderAxis         ( dJointID, dReal, dReal, dReal ) 
    367   cdef void  dJointSetSliderAxisDelta    ( dJointID, dReal, dReal, dReal, 
    368                                                      dReal, dReal, dReal ) 
    369   cdef void  dJointSetSliderParam        ( dJointID, int, dReal ) 
    370   cdef void  dJointAddSliderForce        ( dJointID, dReal force ) 
    371   cdef void  dJointSetHinge2Anchor       ( dJointID, dReal, dReal, dReal ) 
    372   cdef void  dJointSetHinge2Axis1        ( dJointID, dReal, dReal, dReal ) 
    373   cdef void  dJointSetHinge2Axis2        ( dJointID, dReal, dReal, dReal ) 
    374   cdef void  dJointSetHinge2Param        ( dJointID, int, dReal ) 
    375   cdef void  dJointAddHinge2Torques      ( dJointID, dReal, dReal ) 
    376   cdef void  dJointSetUniversalAnchor    ( dJointID, dReal, dReal, dReal ) 
    377   cdef void  dJointSetUniversalAxis1     ( dJointID, dReal, dReal, dReal ) 
    378   cdef void  dJointSetUniversalAxis2     ( dJointID, dReal, dReal, dReal ) 
    379   cdef void  dJointSetUniversalParam     ( dJointID, int, dReal ) 
    380   cdef void  dJointAddUniversalTorques   ( dJointID, dReal, dReal ) 
    381   cdef void  dJointSetPRAnchor           ( dJointID, dReal, dReal, dReal ) 
    382   cdef void  dJointSetPRAxis1            ( dJointID, dReal, dReal, dReal ) 
    383   cdef void  dJointSetPRAxis2            ( dJointID, dReal, dReal, dReal ) 
    384   cdef void  dJointSetPRParam            ( dJointID, int, dReal ) 
    385   cdef void  dJointAddPRTorque           ( dJointID, dReal ) 
    386   cdef void  dJointSetFixed              ( dJointID ) 
    387   cdef void  dJointSetAMotorNumAxes      ( dJointID, int ) 
    388   cdef void  dJointSetAMotorAxis         ( dJointID, int, int,  
    389                                            dReal, dReal, dReal ) 
    390   cdef void  dJointSetAMotorAngle        ( dJointID, int, dReal ) 
    391   cdef void  dJointSetAMotorParam        ( dJointID, int, dReal ) 
    392   cdef void  dJointSetAMotorMode         ( dJointID, int ) 
    393   cdef void  dJointAddAMotorTorques      ( dJointID, dReal, dReal, dReal ) 
    394   cdef void  dJointSetLMotorNumAxes      ( dJointID, int ) 
    395   cdef void  dJointSetLMotorAxis         ( dJointID, int, int,  
    396                                            dReal, dReal, dReal ) 
    397   cdef void  dJointSetLMotorParam        ( dJointID, int, dReal ) 
    398   cdef void  dJointSetPlane2DXParam      ( dJointID, int, dReal ) 
    399   cdef void  dJointSetPlane2DYParam      ( dJointID, int, dReal ) 
    400   cdef void  dJointSetPlane2DAngleParam  ( dJointID, int, dReal ) 
    401   cdef void  dJointGetBallAnchor         ( dJointID, dVector3 ) 
    402   cdef void  dJointGetBallAnchor2        ( dJointID, dVector3 ) 
    403   cdef void  dJointGetHingeAnchor        ( dJointID, dVector3 ) 
    404   cdef void  dJointGetHingeAnchor2       ( dJointID, dVector3 ) 
    405   cdef void  dJointGetHingeAxis          ( dJointID, dVector3 ) 
    406   cdef dReal dJointGetHingeParam         ( dJointID, int ) 
    407   cdef dReal dJointGetHingeAngle         ( dJointID ) 
    408   cdef dReal dJointGetHingeAngleRate     ( dJointID ) 
    409   cdef dReal dJointGetSliderPosition     ( dJointID ) 
    410   cdef dReal dJointGetSliderPositionRate ( dJointID ) 
    411   cdef void  dJointGetSliderAxis         ( dJointID, dVector3 ) 
    412   cdef dReal dJointGetSliderParam        ( dJointID, int ) 
    413   cdef void  dJointGetHinge2Anchor       ( dJointID, dVector3 ) 
    414   cdef void  dJointGetHinge2Anchor2      ( dJointID, dVector3 ) 
    415   cdef void  dJointGetHinge2Axis1        ( dJointID, dVector3 ) 
    416   cdef void  dJointGetHinge2Axis2        ( dJointID, dVector3 ) 
    417   cdef dReal dJointGetHinge2Param        ( dJointID, int ) 
    418   cdef dReal dJointGetHinge2Angle1       ( dJointID ) 
    419   cdef dReal dJointGetHinge2Angle1Rate   ( dJointID ) 
    420   cdef dReal dJointGetHinge2Angle2Rate   ( dJointID ) 
    421   cdef void  dJointGetUniversalAnchor    ( dJointID, dVector3 ) 
    422   cdef void  dJointGetUniversalAnchor2   ( dJointID, dVector3 ) 
    423   cdef void  dJointGetUniversalAxis1     ( dJointID, dVector3 ) 
    424   cdef void  dJointGetUniversalAxis2     ( dJointID, dVector3 ) 
    425   cdef dReal dJointGetUniversalParam     ( dJointID, int ) 
    426   cdef void  dJointGetUnivernalAngles    ( dJointID, dReal*, dReal* ) 
    427   cdef dReal dJointGetUniversalAngle1    ( dJointID ) 
    428   cdef dReal dJointGetUniversalAngle2    ( dJointID ) 
    429   cdef dReal dJointGetUniversalAngle1Rate( dJointID ) 
    430   cdef dReal dJointGetUniversalAngle2Rate( dJointID ) 
    431   cdef void  dJointGetPRAnchor           ( dJointID, dVector3 ) 
    432   cdef dReal dJointGetPRPosition         ( dJointID ) 
    433   cdef dReal dJointGetPRPositionRate     ( dJointID ) 
    434   cdef void  dJointGetPRAxis1            ( dJointID, dVector3 ) 
    435   cdef void  dJointGetPRAxis2            ( dJointID, dVector3 ) 
    436   cdef dReal dJointGetPRParam            ( dJointID, int ) 
    437   cdef int   dJointGetAMotorNumAxes      ( dJointID ) 
    438   cdef void  dJointGetAMotorAxis         ( dJointID, int, dVector3 ) 
    439   cdef int   dJointGetAMotorAxisRel      ( dJointID, int ) 
    440   cdef dReal dJointGetAMotorAngle        ( dJointID, int ) 
    441   cdef dReal dJointGetAMotorAngleRate    ( dJointID, int ) 
    442   cdef dReal dJointGetAMotorParam        ( dJointID, int ) 
    443   cdef int   dJointGetAMotorMode         ( dJointID ) 
    444   cdef int   dJointGetLMotorNumAxes      ( dJointID ) 
    445   cdef void  dJointGetLMotorAxis         ( dJointID, int, dVector3 ) 
    446   cdef dReal dJointGetLMotorParam        ( dJointID, int ) 
    447   cdef dGeomID dCreateHeightField        ( dSpaceID,  
    448                                            dHeightfieldDataID, int ) 
    449  
    450   cdef dHeightfieldDataID dGeomHeightfieldDataCreate ( ) 
    451   cdef void dGeomHeightfieldDataDestroy              ( dHeightfieldDataID ) 
    452   cdef void dGeomHeightfieldDataBuildCallback        ( dHeightfieldDataID, 
    453  
    454   dHeightfieldGetHeight*,  
    455                                                        dReal, dReal, int, 
    456                                                        int, dReal, dReal,  
    457                                                        dReal, int ) 
    458   cdef void dGeomHeightfieldDataBuildByte            ( dHeightfieldDataID, 
    459                                                        int,dReal,dReal,int,  
    460                                                        int, dReal, dReal,  
    461                                                        dReal, int ) 
    462   cdef void dGeomHeightfieldDataBuildShort           ( dHeightfieldDataID,  
    463                                                        int, dReal, dReal,  
    464                                                        dReal, int, int, 
    465                                                        dReal, dReal, dReal, 
    466                                                        int ) 
    467   cdef void dGeomHeightfieldDataBuildSingle          ( dHeightfieldDataID, 
    468                                                        int, dReal, int, int, 
    469                                                        dReal, dReal, dReal, 
    470                                                        int ) 
    471   cdef void dGeomHeightfieldDataBuildDouble          ( dHeightfieldDataID, 
    472                                                        int, dReal, dReal, 
    473                                                        int, dReal, dReal, 
    474                                                        dReal, int )  
    475   cdef void dGeomHeightfieldDataSetBounds            ( dHeightfieldDataID, 
    476                                                        dReal, dReal ) 
    477   cdef void dGeomHeightfieldSetHeightfieldData       ( dHeightfieldDataID, 
    478                                                        dGeomID ) 
    479   cdef dHeightfieldDataID dGeomHeightfieldGetHeightfieldData \ 
    480                                                      ( dGeomID g ) 
    481   cdef void dClosestLineSegmentPoints                ( dVector3, dVector3 ) 
    482   cdef int dBoxTouchesBox                            ( ) 
    483   cdef int dBoxBox                                   ( dVector3, dReal*, 
    484                                                        int*, int,  
    485                                                        dContactGeom*, int ) 
    486   cdef void dInfiniteAABB                            ( dGeomID, dReal ) 
    487   cdef void dNormalize3                     ( dVector3 ) 
    488   cdef int dCreateGeomClass                ( ) 
    489   cdef dGeomID dCreateGeom                 ( int ) 
    490                                                         
    491   # Math Functions 
    492   cdef dReal   dSqrt                       ( dReal ) 
    493   cdef dReal   dRecipSqrt                  ( dReal ) 
    494   cdef dReal   dSin                        ( dReal ) 
    495   cdef dReal   dCos                        ( dReal ) 
    496   cdef dReal   dFabs                       ( dReal ) 
    497   cdef dReal   dAtan2                      ( dReal, dReal ) 
    498   cdef dReal   dFMod                       ( dReal, dReal ) 
    499   cdef dReal   dDISTANCE                   ( dVector3, dVector3 ) 
     178 
     179  cdef : 
     180    void    dGeomTriMeshDataSet           ( dTriMeshDataID, int, void* ) 
     181    dTriMeshDataID  dGeomTriMeshDataCreate( ) 
     182    void    dGeomTriMeshDataDestroy       ( dTriMeshDataID ) 
     183    void*   dGeomTriMeshDataGet           ( dTriMeshDataID, int ) 
     184    void    dGeomTriMeshSetLastTransform  ( dGeomID, dMatrix4 ) 
     185    dReal*  dGeomTriMeshGetLastTransform  ( dGeomID ) 
     186    void    dGeomTriMeshDataBuildSingle   ( dTriMeshDataID, void*, int, int, 
     187                                            void*, int, int ) 
     188    void    dGeomTriMeshDataBuildSingle1  ( dTriMeshDataID, void*, int, int, 
     189                                            void*, int, int, void* ) 
     190    void    dGeomTriMeshDataBuildDouble   ( dTriMeshDataID, void*,  int, int, 
     191                                            void*, int, int ) 
     192    void    dGeomTriMeshDataBuildDouble1  ( dTriMeshDataID, void*,  int, int, 
     193                                            void*, int, int, void* ) 
     194    void    dGeomTriMeshDataBuildSimple   ( dTriMeshDataID, dReal*, int, int*, 
     195                                            int ) 
     196    void    dGeomTriMeshDataBuildSimple1  ( dTriMeshDataID, dReal*, int, int*, 
     197                                            int, int* ) 
     198    void    dGeomTriMeshDataPreprocess    ( dTriMeshDataID ) 
     199    void    dGeomTriMeshDataGetBuffer     ( dTriMeshDataID, unsigned char**, 
     200                                            int* ) 
     201    void    dGeomTriMeshDataSetBuffer     ( dTriMeshDataID, unsigned char* ) 
     202    void    dGeomTriMeshSetCallback       ( dGeomID, dTriCallback* ) 
     203    dTriCallback* dGeomTriMeshGetCallback ( dGeomID ) 
     204    void    dGeomTriMeshSetArrayCallback  ( dGeomID, dTriArrayCallback* ) 
     205    dTriArrayCallback* dGeomTriMeshGetArrayCallback( dGeomID ) 
     206    void    dGeomTriMeshSetRayCallback    ( dGeomID, dTriRayCallback* ) 
     207    dTriRayCallback* dGeomTriMeshGetRayCallback( dGeomID ) 
     208    dGeomID dCreateTriMesh                ( dSpaceID, dTriMeshDataID, dTriCallback*, 
     209                                            dTriArrayCallback*, dTriRayCallback* ) 
     210    void    dGeomTriMeshSetData           ( dGeomID, dTriMeshDataID ) 
     211    dTriMeshDataID dGeomTriMeshGetData    ( dGeomID ) 
     212    void    dGeomTriMeshEnableTC          ( dGeomID, int, int ) 
     213    int     dGeomTriMeshIsTCEnabled       ( dGeomID, int ) 
     214    void    dGeomTriMeshClearTCCache      ( dGeomID ) 
     215    dTriMeshDataID dGeomTriMeshGetTriMeshDataID( dGeomID ) 
     216    void    dGeomTriMeshGetTriangle       ( dGeomID, int, dVector3*, dVector3*, 
     217                                            dVector3* ) 
     218    void    dGeomTriMeshGetPoint          ( dGeomID, int, dReal, dReal, dVector3 ) 
     219    int     dGeomTriMeshGetTriangleCount  ( dGeomID ) 
     220    void    dGeomTriMeshDataUpdate        ( dTriMeshDataID ) 
     221    int     dSafeNormalize3               ( dVector3 ) 
     222    int     dSafeNormalize4               ( dVector4 ) 
     223    void    dNormalize3                   ( dVector3 ) 
     224    void    dNormalize4                   ( dVector4 ) 
     225    void    dPlaneSpace                   ( dVector3, dVector3, dVector3 ) 
     226    int     dMassCheck                    ( dMass* ) 
     227    void    dMassSetZero                  ( dMass* ) 
     228    void    dMassSetParameters            ( dMass*, dReal, dReal, dReal, dReal, dReal, 
     229                                            dReal, dReal, dReal, dReal, dReal ) 
     230    void    dMassSetSphere                ( dMass*, dReal, dReal ) 
     231    void    dMassSetSphereTotal           ( dMass*, dReal, dReal ) 
     232    void    dMassSetCapsule               ( dMass*, dReal, int, dReal, dReal ) 
     233    void    dMassSetCapsuleTotal          ( dMass*, dReal, int, dReal, dReal ) 
     234    void    dMassSetCylinder              ( dMass*, dReal, int, dReal, dReal ) 
     235    void    dMassSetCylinderTotal         ( dMass*, dReal, int, dReal, dReal ) 
     236    void    dMassSetBox                   ( dMass*, dReal, dReal, dReal, dReal ) 
     237    void    dMassSetBoxTotal              ( dMass*, dReal, dReal, dReal, dReal ) 
     238    void    dMassSetTrimesh               ( dMass*, dReal, dGeomID ) 
     239    void    dMassSetTrimeshTotal          ( dMass*, dReal, dGeomID ) 
     240    void    dMassAdjust                   ( dMass*, dReal ) 
     241    void    dMassTranslate                ( dMass*, dReal, dReal, dReal ) 
     242    void    dMassRotate                   ( dMass*, dMatrix3 ) 
     243    void    dMassAdd                      ( dMass*, dMass* ) 
     244    void    dSetErrorHandler              ( dMessageFunction* ) 
     245    void    dSetDebugHandler              ( dMessageFunction* ) 
     246    void    dSetMessageHandler            ( dMessageFunction* ) 
     247    dMessageFunction* dGetErrorHandler    ( ) 
     248    dMessageFunction* dGetDebugHandler    ( ) 
     249    dMessageFunction* dGetMessageHandler  ( ) 
     250    void    dError                        ( int, char*, ... ) 
     251    void    dDebug                        ( int, char*, ... ) 
     252    void    dMessage                      ( int, char*, ... ) 
     253    void    dStopwatchReset               ( dStopwatch* ) 
     254    void    dStopwatchStart               ( dStopwatch* ) 
     255    void    dStopwatchStop                ( dStopwatch* ) 
     256    double  dStopwatchTime                ( dStopwatch* ) 
     257    void    dTimerStart                   ( char* ) 
     258    void    dTimerNow                     ( char* ) 
     259    void    dTimerEnd                     ( ) 
     260    void    dTimerReport                  ( void*, int ) 
     261    double  dTimerTicksPerSecond          ( ) 
     262    double  dTimerResolution              ( ) 
     263    void    dGeomDestroy                  ( dGeomID ) 
     264    void    dGeomSetData                  ( dGeomID, void* ) 
     265    void    *dGeomGetData                 ( dGeomID ) 
     266    void    dGeomSetBody                  ( dGeomID, dBodyID ) 
     267    dBodyID dGeomGetBody                  ( dGeomID ) 
     268    void    dGeomSetPosition              ( dGeomID, dReal, dReal, dReal ) 
     269    void    dGeomSetRotation              ( dGeomID, dMatrix3 ) 
     270    void    dGeomSetQuaternion            ( dGeomID, dQuaternion ) 
     271    dReal*  dGeomGetPosition              ( dGeomID ) 
     272    void    dGeomCopyPosition             ( dGeomID, dVector3 ) 
     273    dReal*  dGeomGetRotation              ( dGeomID ) 
     274    void    dGeomCopyRotation             ( dGeomID, dMatrix3 ) 
     275    void    dGeomGetQuaternion            ( dGeomID, dQuaternion ) 
     276    void    dGeomGetAABB                  ( dGeomID, dReal ) 
     277    int     dGeomIsSpace                  ( dGeomID ) 
     278    dSpaceID dGeomGetSpace                ( dGeomID ) 
     279    int     dGeomGetClass                 ( dGeomID ) 
     280    void    dGeomSetCategoryBits          ( dGeomID, unsigned long ) 
     281    void    dGeomSetCollideBits           ( dGeomID, unsigned long ) 
     282    unsigned long dGeomGetCategoryBits    ( dGeomID ) 
     283    unsigned long dGeomGetCollideBits     ( dGeomID ) 
     284    void    dGeomEnable                   ( dGeomID ) 
     285    void    dGeomDisable                  ( dGeomID ) 
     286    int     dGeomIsEnabled                ( dGeomID ) 
     287    void    dGeomSetOffsetPosition        ( dGeomID, dReal, dReal, dReal ) 
     288    void    dGeomSetOffsetRotation        ( dGeomID, dMatrix3 ) 
     289    void    dGeomSetOffsetQuaternion      ( dGeomID, dQuaternion ) 
     290    void    dGeomSetOffsetWorldPosition   ( dGeomID, dReal, dReal, dReal ) 
     291    void    dGeomSetOffsetWorldRotation   ( dGeomID, dMatrix3 ) 
     292    void    dGeomSetOffsetWorldQuaternion ( dGeomID, dQuaternion ) 
     293    void    dGeomClearOffset              ( dGeomID ) 
     294    int     dGeomIsOffset                 ( dGeomID )