PyODE-1.2.0/0000755000175000001440000000000010561403670012026 5ustar zefirisusersPyODE-1.2.0/src/0000755000175000001440000000000010561403670012615 5ustar zefirisusersPyODE-1.2.0/src/trimeshdata.pyx0000644000175000001440000000556710146207204015673 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### cdef class TriMeshData: """This class stores the mesh data. """ cdef dTriMeshDataID tmdid cdef dReal* vertex_buffer cdef int* face_buffer def __new__(self): self.tmdid = dGeomTriMeshDataCreate() self.vertex_buffer = NULL self.face_buffer = NULL def __dealloc__(self): if self.tmdid!=NULL: dGeomTriMeshDataDestroy(self.tmdid) if self.vertex_buffer!=NULL: free(self.vertex_buffer) if self.face_buffer!=NULL: free(self.face_buffer) def build(self, verts, faces): """build(verts, faces) @param verts: Vertices @type verts: Sequence of 3-sequences of floats @param faces: Face definitions (three indices per face) @type faces: Sequence of 3-sequences of ints """ cdef int numverts cdef int numfaces cdef dReal* vp cdef int* fp cdef int a,b,c numverts = len(verts) numfaces = len(faces) # Allocate the vertex and face buffer self.vertex_buffer = malloc(numverts*4*sizeof(dReal)) self.face_buffer = malloc(numfaces*3*sizeof(int)) # Fill the vertex buffer vp = self.vertex_buffer for v in verts: vp[0] = v[0] vp[1] = v[1] vp[2] = v[2] vp[3] = 0 vp = vp+4 # Fill the face buffer fp = self.face_buffer for f in faces: a = f[0] b = f[1] c = f[2] if a<0 or b<0 or c<0 or a>=numverts or b>=numverts or c>=numverts: raise ValueError, "Vertex index out of range" fp[0] = a fp[1] = b fp[2] = c fp = fp+3 # Pass the data to ODE dGeomTriMeshDataBuildSimple(self.tmdid, self.vertex_buffer, numverts, self.face_buffer, numfaces*3)PyODE-1.2.0/src/space.pyx0000644000175000001440000002610110417446646014464 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # _SpaceIterator class _SpaceIterator: """Iterates over the geoms inside a Space. """ def __init__(self, space): self.space = space self.idx = 0 def __iter__(self): return self def next(self): if self.idx>=self.space.getNumGeoms(): raise StopIteration else: res = self.space.getGeom(self.idx) self.idx = self.idx+1 return res # SpaceBase cdef class SpaceBase(GeomObject): """Space class (container for geometry objects). A Space object is a container for geometry objects which are used to do collision detection. The space does high level collision culling, which means that it can identify which pairs of geometry objects are potentially touching. This Space class can be used for both, a SimpleSpace and a HashSpace (see ODE documentation). >>> space = Space(type=0) # Create a SimpleSpace >>> space = Space(type=1) # Create a HashSpace """ # The id of the space. Actually this is a copy of the value in self.gid # (as the Space is derived from GeomObject) which can be used without # casting whenever a *space* id is required. cdef dSpaceID sid # Dictionary with Geomobjects. Key is the ID (geom._id()) and the value # is the geom object (Python wrapper). This is used in collide_callback() # cdef object geom_dict def __new__(self, *a, **kw): pass def __init__(self, *a, **kw): raise NotImplementedError, "The SpaceBase class can't be used directly." def __dealloc__(self): if self.gid!=NULL: dSpaceDestroy(self.sid) self.sid = NULL self.gid = NULL # def _addgeom(self, geom): # """Insert the geom object into the dictionary (internal method). # # This method has to called in the constructor of a geom object. # """ # self.geom_dict[geom._id()]=geom # def _id2geom(self, id): # """Get the Python wrapper that corresponds to an ID. # # The ID is the integer value, as returned by geom._id(). # If the ID is unknown then None is returned. # """ # if id in self.geom_dict: # return self.geom_dict[id] # else: # return None def _id(self): cdef long id id = self.sid return id def __len__(self): return self.getNumGeoms() def __iter__(self): return _SpaceIterator(self) def add(self, GeomObject geom): """add(geom) Add a geom to a space. This does nothing if the geom is already in the space. @param geom: Geom object to add @type geom: GeomObject """ dSpaceAdd(self.sid, geom.gid) def remove(self, GeomObject geom): """remove(geom) Remove a geom from a space. @param geom: Geom object to remove @type geom: GeomObject """ dSpaceRemove(self.sid, geom.gid) def query(self, GeomObject geom): """query(geom) -> bool Return True if the given geom is in the space. @param geom: Geom object to check @type geom: GeomObject """ return dSpaceQuery(self.sid, geom.gid) def getNumGeoms(self): """getNumGeoms() -> int Return the number of geoms contained within the space. """ return dSpaceGetNumGeoms(self.sid) def getGeom(self, int idx): """getGeom(idx) -> GeomObject Return the geom with the given index contained within the space. @param idx: Geom index (0,1,...,getNumGeoms()-1) @type idx: int """ cdef dGeomID gid # Check the index if idx<0 or idx>=dSpaceGetNumGeoms(self.sid): raise IndexError, "geom index out of range" gid = dSpaceGetGeom(self.sid, idx) if gid not in _geom_c2py_lut: raise RuntimeError, "geom id cannot be translated to a Python object" return _geom_c2py_lut[gid] def collide(self, arg, callback): """collide(arg, callback) Call a callback function one or more times, for all potentially intersecting objects in the space. The callback function takes 3 arguments: def NearCallback(arg, geom1, geom2): The arg parameter is just passed on to the callback function. Its meaning is user defined. The geom1 and geom2 arguments are the geometry objects that may be near each other. The callback function can call the function collide() (not the Space method) on geom1 and geom2, perhaps first determining whether to collide them at all based on other information. @param arg: A user argument that is passed to the callback function @param callback: Callback function @type callback: callable """ cdef void* data cdef object tup tup = (callback, arg) data = tup dSpaceCollide(self.sid, data, collide_callback) # Callback function for the dSpaceCollide() call in the Space.collide() method # The data parameter is a tuple (Python-Callback, Arguments). # The function calls a Python callback function with 3 arguments: # def callback(UserArg, Geom1, Geom2) # Geom1 and Geom2 are instances of GeomXyz classes. cdef void collide_callback(void* data, dGeomID o1, dGeomID o2): cdef object tup # cdef Space space cdef long id1, id2 # if (dGeomGetBody(o1)==dGeomGetBody(o2)): # return tup = data callback, arg = tup id1 = o1 id2 = o2 g1=_geom_c2py_lut[id1] g2=_geom_c2py_lut[id2] callback(arg,g1,g2) # SimpleSpace cdef class SimpleSpace(SpaceBase): """Simple space. This does not do any collision culling - it simply checks every possible pair of geoms for intersection, and reports the pairs whose AABBs overlap. The time required to do intersection testing for n objects is O(n**2). This should not be used for large numbers of objects, but it can be the preferred algorithm for a small number of objects. This is also useful for debugging potential problems with the collision system. """ def __new__(self, space=None): cdef SpaceBase sp cdef dSpaceID parentid parentid = NULL if space!=None: sp = space parentid = sp.sid self.sid = dSimpleSpaceCreate(parentid) # Copy the ID self.gid = self.sid dSpaceSetCleanup(self.sid, 0) _geom_c2py_lut[self.sid]=self def __init__(self, space=None): pass # HashSpace cdef class HashSpace(SpaceBase): """Multi-resolution hash table space. This uses an internal data structure that records how each geom overlaps cells in one of several three dimensional grids. Each grid has cubical cells of side lengths 2**i, where i is an integer that ranges from a minimum to a maximum value. The time required to do intersection testing for n objects is O(n) (as long as those objects are not clustered together too closely), as each object can be quickly paired with the objects around it. """ def __new__(self, space=None): cdef SpaceBase sp cdef dSpaceID parentid parentid = NULL if space!=None: sp = space parentid = sp.sid self.sid = dHashSpaceCreate(parentid) # Copy the ID self.gid = self.sid dSpaceSetCleanup(self.sid, 0) _geom_c2py_lut[self.sid]=self def __init__(self, space=None): pass def setLevels(self, int minlevel, int maxlevel): """setLevels(minlevel, maxlevel) Sets the size of the smallest and largest cell used in the hash table. The actual size will be 2^minlevel and 2^maxlevel respectively. """ if minlevel>maxlevel: raise ValueError, "minlevel (%d) must be less than or equal to maxlevel (%d)"%(minlevel, maxlevel) dHashSpaceSetLevels(self.sid, minlevel, maxlevel) def getLevels(self): """getLevels() -> (minlevel, maxlevel) Gets the size of the smallest and largest cell used in the hash table. The actual size is 2^minlevel and 2^maxlevel respectively. """ cdef int minlevel cdef int maxlevel dHashSpaceGetLevels(self.sid, &minlevel, &maxlevel) return (minlevel, maxlevel) # QuadTreeSpace cdef class QuadTreeSpace(SpaceBase): """Quadtree space. This uses a pre-allocated hierarchical grid-based AABB tree to quickly cull collision checks. It's exceptionally quick for large amounts of objects in landscape-shaped worlds. The amount of memory used is 4**depth * 32 bytes. Currently getGeom() is not implemented for the quadtree space. """ def __new__(self, center, extents, depth, space=None): cdef SpaceBase sp cdef dSpaceID parentid cdef dVector3 c cdef dVector3 e parentid = NULL if space!=None: sp = space parentid = sp.sid c[0] = center[0] c[1] = center[1] c[2] = center[2] e[0] = extents[0] e[1] = extents[1] e[2] = extents[2] self.sid = dQuadTreeSpaceCreate(parentid, c, e, depth) # Copy the ID self.gid = self.sid dSpaceSetCleanup(self.sid, 0) _geom_c2py_lut[self.sid]=self def __init__(self, center, extents, depth, space=None): pass def Space(type=0): """Space factory function. Depending on the type argument this function either returns a SimpleSpace (type=0) or a HashSpace (type=1). This function is provided to remain compatible with previous versions of PyODE where there was only one Space class. >>> space = Space(type=0) # Create a SimpleSpace >>> space = Space(type=1) # Create a HashSpace """ if type==0: return SimpleSpace() elif type==1: return HashSpace() else: raise ValueError, "Unknown space type (%d)"%type PyODE-1.2.0/src/trimesh_dummy.pyx0000644000175000001440000000320310146207203016234 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # These classes are included by the file _trimesh_switch.pyx if the # variable TRIMESH_SUPPORT was set to False in the setup script. cdef class TriMeshData: """This class stores the mesh data. This is only a dummy class that's used when trimesh support was disabled. """ def __init__(self): raise NotImplementedError, "Trimesh support is disabled" cdef class GeomTriMesh(GeomObject): """Trimesh object. This is only a dummy class that's used when trimesh support was disabled. """ def __init__(self, TriMeshData data not None, space=None): raise NotImplementedError, "Trimesh support is disabled" PyODE-1.2.0/src/world.pyx0000644000175000001440000002734410146207204014512 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # World cdef class World: """Dynamics world. The world object is a container for rigid bodies and joints. Constructor:: World() """ cdef dWorldID wid def __new__(self): self.wid = dWorldCreate() def __dealloc__(self): if self.wid!=NULL: dWorldDestroy(self.wid) # setGravity def setGravity(self, gravity): """setGravity(gravity) Set the world's global gravity vector. @param gravity: Gravity vector @type gravity: 3-sequence of floats """ dWorldSetGravity(self.wid, gravity[0], gravity[1], gravity[2]) # getGravity def getGravity(self): """getGravity() -> 3-tuple Return the world's global gravity vector as a 3-tuple of floats. """ cdef dVector3 g dWorldGetGravity(self.wid, g) return (g[0],g[1],g[2]) # setERP def setERP(self, erp): """setERP(erp) Set the global ERP value, that controls how much error correction is performed in each time step. Typical values are in the range 0.1-0.8. The default is 0.2. @param erp: Global ERP value @type erp: float """ dWorldSetERP(self.wid, erp) # getERP def getERP(self): """getERP() -> float Get the global ERP value, that controls how much error correction is performed in each time step. Typical values are in the range 0.1-0.8. The default is 0.2. """ return dWorldGetERP(self.wid) # setCFM def setCFM(self, cfm): """setCFM(cfm) Set the global CFM (constraint force mixing) value. Typical values are in the range 10E-9 - 1. The default is 10E-5 if single precision is being used, or 10E-10 if double precision is being used. @param cfm: Constraint force mixing value @type cfm: float """ dWorldSetCFM(self.wid, cfm) # getCFM def getCFM(self): """getCFM() -> float Get the global CFM (constraint force mixing) value. Typical values are in the range 10E-9 - 1. The default is 10E-5 if single precision is being used, or 10E-10 if double precision is being used. """ return dWorldGetCFM(self.wid) # step def step(self, stepsize): """step(stepsize) Step the world. This uses a "big matrix" method that takes time on the order of O(m3) and memory on the order of O(m2), where m is the total number of constraint rows. For large systems this will use a lot of memory and can be very slow, but this is currently the most accurate method. @param stepsize: Time step @type stepsize: float """ dWorldStep(self.wid, stepsize) # quickStep def quickStep(self, stepsize): """quickStep(stepsize) Step the world. This uses an iterative method that takes time on the order of O(m*N) and memory on the order of O(m), where m is the total number of constraint rows and N is the number of iterations. For large systems this is a lot faster than dWorldStep, but it is less accurate. @param stepsize: Time step @type stepsize: float """ dWorldQuickStep(self.wid, stepsize) # setQuickStepNumIterations def setQuickStepNumIterations(self, num): """setQuickStepNumIterations(num) Set the number of iterations that the QuickStep method performs per step. More iterations will give a more accurate solution, but will take longer to compute. The default is 20 iterations. @param num: Number of iterations @type num: int """ dWorldSetQuickStepNumIterations(self.wid, num) # getQuickStepNumIterations def getQuickStepNumIterations(self): """getQuickStepNumIterations() -> int Get the number of iterations that the QuickStep method performs per step. More iterations will give a more accurate solution, but will take longer to compute. The default is 20 iterations. """ return dWorldGetQuickStepNumIterations(self.wid) # setQuickStepNumIterations def setContactMaxCorrectingVel(self, vel): """setContactMaxCorrectingVel(vel) Set the maximum correcting velocity that contacts are allowed to generate. The default value is infinity (i.e. no limit). Reducing this value can help prevent "popping" of deeply embedded objects. @param vel: Maximum correcting velocity @type vel: float """ dWorldSetContactMaxCorrectingVel(self.wid, vel) # getQuickStepNumIterations def getContactMaxCorrectingVel(self): """getContactMaxCorrectingVel() -> float Get the maximum correcting velocity that contacts are allowed to generate. The default value is infinity (i.e. no limit). Reducing this value can help prevent "popping" of deeply embedded objects. """ return dWorldGetContactMaxCorrectingVel(self.wid) # setContactSurfaceLayer def setContactSurfaceLayer(self, depth): """setContactSurfaceLayer(depth) Set the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is zero. Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken. @param depth: Surface layer depth @type depth: float """ dWorldSetContactSurfaceLayer(self.wid, depth) # getContactSurfaceLayer def getContactSurfaceLayer(self): """getContactSurfaceLayer() Get the depth of the surface layer around all geometry objects. Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. The default value is zero. Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken. """ return dWorldGetContactSurfaceLayer(self.wid) # setAutoDisableFlag def setAutoDisableFlag(self, flag): """setAutoDisableFlag(flag) Set the default auto-disable flag for newly created bodies. @param flag: True = Do auto disable @type flag: bool """ dWorldSetAutoDisableFlag(self.wid, flag) # getAutoDisableFlag def getAutoDisableFlag(self): """getAutoDisableFlag() -> bool Get the default auto-disable flag for newly created bodies. """ return dWorldGetAutoDisableFlag(self.wid) # setAutoDisableLinearThreshold def setAutoDisableLinearThreshold(self, threshold): """setAutoDisableLinearThreshold(threshold) Set the default auto-disable linear threshold for newly created bodies. @param threshold: Linear threshold @type threshold: float """ dWorldSetAutoDisableLinearThreshold(self.wid, threshold) # getAutoDisableLinearThreshold def getAutoDisableLinearThreshold(self): """getAutoDisableLinearThreshold() -> float Get the default auto-disable linear threshold for newly created bodies. """ return dWorldGetAutoDisableLinearThreshold(self.wid) # setAutoDisableAngularThreshold def setAutoDisableAngularThreshold(self, threshold): """setAutoDisableAngularThreshold(threshold) Set the default auto-disable angular threshold for newly created bodies. @param threshold: Angular threshold @type threshold: float """ dWorldSetAutoDisableAngularThreshold(self.wid, threshold) # getAutoDisableAngularThreshold def getAutoDisableAngularThreshold(self): """getAutoDisableAngularThreshold() -> float Get the default auto-disable angular threshold for newly created bodies. """ return dWorldGetAutoDisableAngularThreshold(self.wid) # setAutoDisableSteps def setAutoDisableSteps(self, steps): """setAutoDisableSteps(steps) Set the default auto-disable steps for newly created bodies. @param steps: Auto disable steps @type steps: int """ dWorldSetAutoDisableSteps(self.wid, steps) # getAutoDisableSteps def getAutoDisableSteps(self): """getAutoDisableSteps() -> int Get the default auto-disable steps for newly created bodies. """ return dWorldGetAutoDisableSteps(self.wid) # setAutoDisableTime def setAutoDisableTime(self, time): """setAutoDisableTime(time) Set the default auto-disable time for newly created bodies. @param time: Auto disable time @type time: float """ dWorldSetAutoDisableTime(self.wid, time) # getAutoDisableTime def getAutoDisableTime(self): """getAutoDisableTime() -> float Get the default auto-disable time for newly created bodies. """ return dWorldGetAutoDisableTime(self.wid) # impulseToForce def impulseToForce(self, stepsize, impulse): """impulseToForce(stepsize, impulse) -> 3-tuple If you want to apply a linear or angular impulse to a rigid body, instead of a force or a torque, then you can use this function to convert the desired impulse into a force/torque vector before calling the dBodyAdd... function. @param stepsize: Time step @param impulse: Impulse vector @type stepsize: float @type impulse: 3-tuple of floats """ cdef dVector3 force dWorldImpulseToForce(self.wid, stepsize, impulse[0], impulse[1], impulse[2], force) return (force[0], force[1], force[2]) # createBody # def createBody(self): # return Body(self) # createBallJoint # def createBallJoint(self, jointgroup=None): # return BallJoint(self, jointgroup) # createHingeJoint # def createHingeJoint(self, jointgroup=None): # return HingeJoint(self, jointgroup) # createHinge2Joint # def createHinge2Joint(self, jointgroup=None): # return Hinge2Joint(self, jointgroup) # createSliderJoint # def createSliderJoint(self, jointgroup=None): # return SliderJoint(self, jointgroup) # createFixedJoint # def createFixedJoint(self, jointgroup=None): # return FixedJoint(self, jointgroup) # createContactJoint # def createContactJoint(self, jointgroup, contact): # return ContactJoint(self, jointgroup, contact) PyODE-1.2.0/src/mass.pyx0000644000175000001440000002765310437052560014337 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### cdef class Mass: """Mass parameters of a rigid body. This class stores mass parameters of a rigid body which can be accessed through the following attributes: - mass: The total mass of the body (float) - c: The center of gravity position in body frame (3-tuple of floats) - I: The 3x3 inertia tensor in body frame (3-tuple of 3-tuples) This class wraps the dMass structure from the C API. @ivar mass: The total mass of the body @ivar c: The center of gravity position in body frame (cx, cy, cz) @ivar I: The 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22, I23), (I13, I23, I33)) @type mass: float @type c: 3-tuple of floats @type I: 3-tuple of 3-tuples of floats """ cdef dMass _mass def __new__(self): dMassSetZero(&self._mass) def setZero(self): """setZero() Set all the mass parameters to zero.""" dMassSetZero(&self._mass) def setParameters(self, mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23): """setParameters(mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23) Set the mass parameters to the given values. @param mass: Total mass of the body. @param cgx: Center of gravity position in the body frame (x component). @param cgy: Center of gravity position in the body frame (y component). @param cgz: Center of gravity position in the body frame (z component). @param I11: Inertia tensor @param I22: Inertia tensor @param I33: Inertia tensor @param I12: Inertia tensor @param I13: Inertia tensor @param I23: Inertia tensor @type mass: float @type cgx: float @type cgy: float @type cgz: float @type I11: float @type I22: float @type I33: float @type I12: float @type I13: float @type I23: float """ dMassSetParameters(&self._mass, mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23) def setSphere(self, density, radius): """setSphere(density, radius) Set the mass parameters to represent a sphere of the given radius and density, with the center of mass at (0,0,0) relative to the body. @param density: The density of the sphere @param radius: The radius of the sphere @type density: float @type radius: float """ dMassSetSphere(&self._mass, density, radius) def setSphereTotal(self, total_mass, radius): """setSphereTotal(total_mass, radius) Set the mass parameters to represent a sphere of the given radius and mass, with the center of mass at (0,0,0) relative to the body. @param total_mass: The total mass of the sphere @param radius: The radius of the sphere @type total_mass: float @type radius: float """ dMassSetSphere(&self._mass, total_mass, radius) def setCappedCylinder(self, density, direction, r, h): """setCappedCylinder(density, direction, r, h) Set the mass parameters to represent a capped cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder (and the spherical cap) is r. The length of the cylinder (not counting the spherical cap) is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z). @param density: The density of the cylinder @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) @param r: The radius of the cylinder @param h: The length of the cylinder (without the caps) @type density: float @type direction: int @type r: float @type h: float """ dMassSetCappedCylinder(&self._mass, density, direction, r, h) def setCappedCylinderTotal(self, total_mass, direction, r, h): """setCappedCylinderTotal(total_mass, direction, r, h) Set the mass parameters to represent a capped cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder (and the spherical cap) is r. The length of the cylinder (not counting the spherical cap) is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z). @param total_mass: The total mass of the cylinder @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) @param r: The radius of the cylinder @param h: The length of the cylinder (without the caps) @type total_mass: float @type direction: int @type r: float @type h: float """ dMassSetCappedCylinderTotal(&self._mass, total_mass, direction, r, h) def setCylinder(self, density, direction, r, h): """setCylinder(density, direction, r, h) Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder is r. The length of the cylinder is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z). @param density: The density of the cylinder @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) @param r: The radius of the cylinder @param h: The length of the cylinder @type density: float @type direction: int @type r: float @type h: float """ dMassSetCylinder(&self._mass, density, direction, r, h) def setCylinderTotal(self, total_mass, direction, r, h): """setCylinderTotal(total_mass, direction, r, h) Set the mass parameters to represent a flat-ended cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder is r. The length of the cylinder is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z). @param total_mass: The total mass of the cylinder @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) @param r: The radius of the cylinder @param h: The length of the cylinder @type total_mass: float @type direction: int @type r: float @type h: float """ dMassSetCylinderTotal(&self._mass, total_mass, direction, r, h) def setBox(self, density, lx, ly, lz): """setBox(density, lx, ly, lz) Set the mass parameters to represent a box of the given dimensions and density, with the center of mass at (0,0,0) relative to the body. The side lengths of the box along the x, y and z axes are lx, ly and lz. @param density: The density of the box @param lx: The length along the x axis @param ly: The length along the y axis @param lz: The length along the z axis @type density: float @type lx: float @type ly: float @type lz: float """ dMassSetBox(&self._mass, density, lx, ly, lz) def setBoxTotal(self, total_mass, lx, ly, lz): """setBoxTotal(total_mass, lx, ly, lz) Set the mass parameters to represent a box of the given dimensions and mass, with the center of mass at (0,0,0) relative to the body. The side lengths of the box along the x, y and z axes are lx, ly and lz. @param total_mass: The total mass of the box @param lx: The length along the x axis @param ly: The length along the y axis @param lz: The length along the z axis @type total_mass: float @type lx: float @type ly: float @type lz: float """ dMassSetBoxTotal(&self._mass, total_mass, lx, ly, lz) def adjust(self, newmass): """adjust(newmass) Adjust the total mass. Given mass parameters for some object, adjust them so the total mass is now newmass. This is useful when using the setXyz() methods to set the mass parameters for certain objects - they take the object density, not the total mass. @param newmass: The new total mass @type newmass: float """ dMassAdjust(&self._mass, newmass) def translate(self, t): """translate(t) Adjust mass parameters. Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. @param t: Translation vector (x, y, z) @type t: 3-tuple of floats """ dMassTranslate(&self._mass, t[0], t[1], t[2]) # def rotate(self, R): # """ # Given mass parameters for some object, adjust them to # represent the object rotated by R relative to the body frame. # """ # pass def add(self, Mass b): """add(b) Add the mass b to the mass object. Masses can also be added using the + operator. @param b: The mass to add to this mass @type b: Mass """ dMassAdd(&self._mass, &b._mass) def __getattr__(self, name): if name=="mass": return self._mass.mass elif name=="c": return (self._mass.c[0], self._mass.c[1], self._mass.c[2]) elif name=="I": return ((self._mass.I[0],self._mass.I[1],self._mass.I[2]), (self._mass.I[4],self._mass.I[5],self._mass.I[6]), (self._mass.I[8],self._mass.I[9],self._mass.I[10])) else: raise AttributeError,"Mass object has no attribute '"+name+"'" def __setattr__(self, name, value): if name=="mass": self.adjust(value) elif name=="c": raise AttributeError,"Use the setParameter() method to change c" elif name=="I": raise AttributeError,"Use the setParameter() method to change I" else: raise AttributeError,"Mass object has no attribute '"+name+"'" def __add__(self, Mass b): self.add(b) return self def __str__(self): m = str(self._mass.mass) sc0 = str(self._mass.c[0]) sc1 = str(self._mass.c[1]) sc2 = str(self._mass.c[2]) I11 = str(self._mass.I[0]) I22 = str(self._mass.I[5]) I33 = str(self._mass.I[10]) I12 = str(self._mass.I[1]) I13 = str(self._mass.I[2]) I23 = str(self._mass.I[6]) return "Mass=%s\nCg=(%s, %s, %s)\nI11=%s I22=%s I33=%s\nI12=%s I13=%s I23=%s"%(m,sc0,sc1,sc2,I11,I22,I33,I12,I13,I23) # return "Mass=%s / Cg=(%s, %s, %s) / I11=%s I22=%s I33=%s I12=%s I13=%s I23=%s"%(m,sc0,sc1,sc2,I11,I22,I33,I12,I13,I23) PyODE-1.2.0/src/joints.pyx0000644000175000001440000010127110525053713014666 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # For every joint type there is a separate class that wraps that joint. # These classes are derived from the base class "Joint" that contains # all the common stuff (including destruction). # The ODE joint is created in the constructor and destroyed in the destructor. # So it's the respective Python wrapper class that has ownership of the # ODE joint. If joint groups are used it can happen that an ODE joint gets # destroyed outside of its Python wrapper (whenever you empty the group). # In such cases the Python wrapper has to be notified so that it dismisses # its pointer. This is done by calling _destroyed() on the respective # Python wrapper (which is done by the JointGroup wrapper). ###################################################################### # JointGroup cdef class JointGroup: """Joint group. Constructor:: JointGroup() """ # JointGroup ID cdef dJointGroupID gid # A list of Python joints that were added to the group cdef object jointlist def __new__(self): self.gid = dJointGroupCreate(0) def __init__(self): self.jointlist = [] def __dealloc__(self): if self.gid!=NULL: for j in self.jointlist: j._destroyed() dJointGroupDestroy(self.gid) # empty def empty(self): """empty() Destroy all joints in the group. """ dJointGroupEmpty(self.gid) for j in self.jointlist: j._destroyed() self.jointlist = [] def _addjoint(self, j): """_addjoint(j) Add a joint to the group. This is an internal method that is called by the joints. The group has to know the Python wrappers because it has to notify them when the group is emptied (so that the ODE joints won't get destroyed twice). The notification is done by calling _destroyed() on the Python joints. @param j: The joint to add @type j: Joint """ self.jointlist.append(j) ###################################################################### # Joint cdef class Joint: """Base class for all joint classes.""" # Joint id as returned by dJointCreateXxx() cdef dJointID jid # A reference to the world so that the world won't be destroyed while # there are still joints using it. cdef object world # The feedback buffer cdef dJointFeedback* feedback cdef object body1 cdef object body2 # A dictionary with user attributes # (set via __getattr__ and __setattr__) cdef object userattribs def __new__(self, *a, **kw): self.jid = NULL self.world = None self.feedback = NULL self.body1 = None self.body2 = None self.userattribs = {} def __init__(self, *a, **kw): raise NotImplementedError, "The Joint base class can't be used directly." def __dealloc__(self): self.setFeedback(False) if self.jid!=NULL: dJointDestroy(self.jid) def __getattr__(self, name): try: return self.userattribs[name] except: raise AttributeError, "Joint object has no attribute '%s'"%name def __setattr__(self, name, value): self.userattribs[name] = value def __delattr__(self, name): try: del self.userattribs[name] except: raise AttributeError, "Joint object has no attribute '%s'"%name # _destroyed def _destroyed(self): """Notify the joint object about an external destruction of the ODE joint. This method has to be called when the underlying ODE object was destroyed by someone else (e.g. by a joint group). The Python wrapper will then refrain from destroying it again. """ self.jid = NULL # attach def attach(self, Body body1, Body body2): """attach(body1, body2) Attach the joint to some new bodies. A body can be attached to the environment by passing None as second body. @param body1: First body @param body2: Second body @type body1: Body @type body2: Body """ cdef dBodyID id1, id2 if body1==None: id1 = NULL else: id1 = body1.bid if body2==None: id2 = NULL else: id2 = body2.bid self.body1 = body1 self.body2 = body2 dJointAttach(self.jid, id1, id2) # getBody def getBody(self, index): """getBody(index) -> Body Return the bodies that this joint connects. If index is 0 the "first" body will be returned, corresponding to the body1 argument of the attach() method. If index is 1 the "second" body will be returned, corresponding to the body2 argument of the attach() method. @param index: Bodx index (0 or 1). @type index: int """ if (index == 0): return self.body1 elif (index == 1): return self.body2 else: raise IndexError() # setFeedback def setFeedback(self, flag=1): """setFeedback(flag=True) Create a feedback buffer. If flag is True then a buffer is allocated and the forces/torques applied by the joint can be read using the getFeedback() method. If flag is False the buffer is released. @param flag: Specifies whether a buffer should be created or released @type flag: bool """ if flag: # Was there already a buffer allocated? then we're finished if self.feedback!=NULL: return # Allocate a buffer and pass it to ODE self.feedback = malloc(sizeof(dJointFeedback)) if self.feedback==NULL: raise MemoryError("can't allocate feedback buffer") dJointSetFeedback(self.jid, self.feedback) else: if self.feedback!=NULL: # Free a previously allocated buffer dJointSetFeedback(self.jid, NULL) free(self.feedback) self.feedback = NULL # getFeedback def getFeedback(self): """getFeedback() -> (force1, torque1, force2, torque2) Get the forces/torques applied by the joint. If feedback is activated (i.e. setFeedback(True) was called) then this method returns a tuple (force1, torque1, force2, torque2) with the forces and torques applied to body 1 and body 2. The forces/torques are given as 3-tuples. If feedback is deactivated then the method always returns None. """ cdef dJointFeedback* fb fb = dJointGetFeedback(self.jid) if (fb==NULL): return None f1 = (fb.f1[0], fb.f1[1], fb.f1[2]) t1 = (fb.t1[0], fb.t1[1], fb.t1[2]) f2 = (fb.f2[0], fb.f2[1], fb.f2[2]) t2 = (fb.t2[0], fb.t2[1], fb.t2[2]) return (f1,t1,f2,t2) ###################################################################### # BallJoint cdef class BallJoint(Joint): """Ball joint. Constructor:: BallJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateBall(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setAnchor def setAnchor(self, pos): """setAnchor(pos) Set the joint anchor point which must be specified in world coordinates. @param pos: Anchor position @type pos: 3-sequence of floats """ dJointSetBallAnchor(self.jid, pos[0], pos[1], pos[2]) # getAnchor def getAnchor(self): """getAnchor() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2. """ cdef dVector3 p dJointGetBallAnchor(self.jid, p) return (p[0],p[1],p[2]) # getAnchor2 def getAnchor2(self): """getAnchor2() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 2. If the joint is perfectly satisfied, this will be the same as the point on body 1. """ cdef dVector3 p dJointGetBallAnchor2(self.jid, p) return (p[0],p[1],p[2]) # setParam def setParam(self, param, value): pass # getParam def getParam(self, param): return 0.0 # HingeJoint cdef class HingeJoint(Joint): """Hinge joint. Constructor:: HingeJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateHinge(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setAnchor def setAnchor(self, pos): """setAnchor(pos) Set the hinge anchor which must be given in world coordinates. @param pos: Anchor position @type pos: 3-sequence of floats """ dJointSetHingeAnchor(self.jid, pos[0], pos[1], pos[2]) # getAnchor def getAnchor(self): """getAnchor() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2. """ cdef dVector3 p dJointGetHingeAnchor(self.jid, p) return (p[0],p[1],p[2]) # getAnchor2 def getAnchor2(self): """getAnchor2() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 2. If the joint is perfectly satisfied, this will be the same as the point on body 1. """ cdef dVector3 p dJointGetHingeAnchor2(self.jid, p) return (p[0],p[1],p[2]) # setAxis def setAxis(self, axis): """setAxis(axis) Set the hinge axis. @param axis: Hinge axis @type axis: 3-sequence of floats """ dJointSetHingeAxis(self.jid, axis[0], axis[1], axis[2]) # getAxis def getAxis(self): """getAxis() -> 3-tuple of floats Get the hinge axis. """ cdef dVector3 a dJointGetHingeAxis(self.jid, a) return (a[0],a[1],a[2]) # getAngle def getAngle(self): """getAngle() -> float Get the hinge angle. The angle is measured between the two bodies, or between the body and the static environment. The angle will be between -pi..pi. When the hinge anchor or axis is set, the current position of the attached bodies is examined and that position will be the zero angle. """ return dJointGetHingeAngle(self.jid) # getAngleRate def getAngleRate(self): """getAngleRate() -> float Get the time derivative of the angle. """ return dJointGetHingeAngleRate(self.jid) # addTorque def addTorque(self, torque): """addTorque(torque) Applies the torque about the hinge axis. @param torque: Torque magnitude @type torque: float """ dJointAddHingeTorque(self.jid, torque) # setParam def setParam(self, param, value): """setParam(param, value) Set limit/motor parameters for the joint. param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax, ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM, ParamSuspensionERP, ParamSuspensionCFM. These parameter names can be optionally followed by a digit (2 or 3) to indicate the second or third set of parameters. @param param: Selects the parameter to set @param value: Parameter value @type param: int @type value: float """ dJointSetHingeParam(self.jid, param, value) # getParam def getParam(self, param): """getParam(param) -> float Get limit/motor parameters for the joint. param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax, ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM, ParamSuspensionERP, ParamSuspensionCFM. These parameter names can be optionally followed by a digit (2 or 3) to indicate the second or third set of parameters. @param param: Selects the parameter to read @type param: int """ return dJointGetHingeParam(self.jid, param) # SliderJoint cdef class SliderJoint(Joint): """Slider joint. Constructor:: SlideJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateSlider(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setAxis def setAxis(self, axis): """setAxis(axis) Set the slider axis parameter. @param axis: Slider axis @type axis: 3-sequence of floats """ dJointSetSliderAxis(self.jid, axis[0], axis[1], axis[2]) # getAxis def getAxis(self): """getAxis() -> 3-tuple of floats Get the slider axis parameter. """ cdef dVector3 a dJointGetSliderAxis(self.jid, a) return (a[0],a[1],a[2]) # getPosition def getPosition(self): """getPosition() -> float Get the slider linear position (i.e. the slider's "extension"). When the axis is set, the current position of the attached bodies is examined and that position will be the zero position. """ return dJointGetSliderPosition(self.jid) # getPositionRate def getPositionRate(self): """getPositionRate() -> float Get the time derivative of the position. """ return dJointGetSliderPositionRate(self.jid) # addForce def addForce(self, force): """addForce(force) Applies the given force in the slider's direction. @param force: Force magnitude @type force: float """ dJointAddSliderForce(self.jid, force) # setParam def setParam(self, param, value): dJointSetSliderParam(self.jid, param, value) # getParam def getParam(self, param): return dJointGetSliderParam(self.jid, param) # UniversalJoint cdef class UniversalJoint(Joint): """Universal joint. Constructor:: UniversalJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateUniversal(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setAnchor def setAnchor(self, pos): """setAnchor(pos) Set the universal anchor. @param pos: Anchor position @type pos: 3-sequence of floats """ dJointSetUniversalAnchor(self.jid, pos[0], pos[1], pos[2]) # getAnchor def getAnchor(self): """getAnchor() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2. """ cdef dVector3 p dJointGetUniversalAnchor(self.jid, p) return (p[0],p[1],p[2]) # getAnchor2 def getAnchor2(self): """getAnchor2() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 2. If the joint is perfectly satisfied, this will be the same as the point on body 1. """ cdef dVector3 p dJointGetUniversalAnchor2(self.jid, p) return (p[0],p[1],p[2]) # setAxis1 def setAxis1(self, axis): """setAxis1(axis) Set the first universal axis. Axis 1 and axis 2 should be perpendicular to each other. @param axis: Joint axis @type axis: 3-sequence of floats """ dJointSetUniversalAxis1(self.jid, axis[0], axis[1], axis[2]) # getAxis1 def getAxis1(self): """getAxis1() -> 3-tuple of floats Get the first univeral axis. """ cdef dVector3 a dJointGetUniversalAxis1(self.jid, a) return (a[0],a[1],a[2]) # setAxis2 def setAxis2(self, axis): """setAxis2(axis) Set the second universal axis. Axis 1 and axis 2 should be perpendicular to each other. @param axis: Joint axis @type axis: 3-sequence of floats """ dJointSetUniversalAxis2(self.jid, axis[0], axis[1], axis[2]) # getAxis2 def getAxis2(self): """getAxis2() -> 3-tuple of floats Get the second univeral axis. """ cdef dVector3 a dJointGetUniversalAxis2(self.jid, a) return (a[0],a[1],a[2]) # addTorques def addTorques(self, torque1, torque2): """addTorques(torque1, torque2) Applies torque1 about axis 1, and torque2 about axis 2. @param torque1: Torque 1 magnitude @param torque2: Torque 2 magnitude @type torque1: float @type torque2: float """ dJointAddUniversalTorques(self.jid, torque1, torque2) # setParam def setParam(self, param, value): dJointSetUniversalParam(self.jid, param, value) # getParam def getParam(self, param): return dJointGetUniversalParam(self.jid, param) # Hinge2Joint cdef class Hinge2Joint(Joint): """Hinge2 joint. Constructor:: Hinge2Joint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateHinge2(world.wid, jgid) def __init__(self, World world, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setAnchor def setAnchor(self, pos): """setAnchor(pos) Set the hinge-2 anchor. @param pos: Anchor position @type pos: 3-sequence of floats """ dJointSetHinge2Anchor(self.jid, pos[0], pos[1], pos[2]) # getAnchor def getAnchor(self): """getAnchor() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 1. If the joint is perfectly satisfied, this will be the same as the point on body 2. """ cdef dVector3 p dJointGetHinge2Anchor(self.jid, p) return (p[0],p[1],p[2]) # getAnchor2 def getAnchor2(self): """getAnchor2() -> 3-tuple of floats Get the joint anchor point, in world coordinates. This returns the point on body 2. If the joint is perfectly satisfied, this will be the same as the point on body 1. """ cdef dVector3 p dJointGetHinge2Anchor2(self.jid, p) return (p[0],p[1],p[2]) # setAxis1 def setAxis1(self, axis): """setAxis1(axis) Set the first hinge-2 axis. Axis 1 and axis 2 must not lie along the same line. @param axis: Joint axis @type axis: 3-sequence of floats """ dJointSetHinge2Axis1(self.jid, axis[0], axis[1], axis[2]) # getAxis1 def getAxis1(self): """getAxis1() -> 3-tuple of floats Get the first hinge-2 axis. """ cdef dVector3 a dJointGetHinge2Axis1(self.jid, a) return (a[0],a[1],a[2]) # setAxis2 def setAxis2(self, axis): """setAxis2(axis) Set the second hinge-2 axis. Axis 1 and axis 2 must not lie along the same line. @param axis: Joint axis @type axis: 3-sequence of floats """ dJointSetHinge2Axis2(self.jid, axis[0], axis[1], axis[2]) # getAxis2 def getAxis2(self): """getAxis2() -> 3-tuple of floats Get the second hinge-2 axis. """ cdef dVector3 a dJointGetHinge2Axis2(self.jid, a) return (a[0],a[1],a[2]) # getAngle def getAngle1(self): """getAngle1() -> float Get the first hinge-2 angle (around axis 1). When the anchor or axis is set, the current position of the attached bodies is examined and that position will be the zero angle. """ return dJointGetHinge2Angle1(self.jid) # getAngle1Rate def getAngle1Rate(self): """getAngle1Rate() -> float Get the time derivative of the first hinge-2 angle. """ return dJointGetHinge2Angle1Rate(self.jid) # getAngle2Rate def getAngle2Rate(self): """getAngle2Rate() -> float Get the time derivative of the second hinge-2 angle. """ return dJointGetHinge2Angle2Rate(self.jid) # addTorques def addTorques(self, torque1, torque2): """addTorques(torque1, torque2) Applies torque1 about axis 1, and torque2 about axis 2. @param torque1: Torque 1 magnitude @param torque2: Torque 2 magnitude @type torque1: float @type torque2: float """ dJointAddHinge2Torques(self.jid, torque1, torque2) # setParam def setParam(self, param, value): dJointSetHinge2Param(self.jid, param, value) # getParam def getParam(self, param): return dJointGetHinge2Param(self.jid, param) # FixedJoint cdef class FixedJoint(Joint): """Fixed joint. Constructor:: FixedJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateFixed(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setFixed def setFixed(self): """setFixed() Call this on the fixed joint after it has been attached to remember the current desired relative offset and desired relative rotation between the bodies. """ dJointSetFixed(self.jid) # ContactJoint cdef class ContactJoint(Joint): """Contact joint. Constructor:: ContactJoint(world, jointgroup, contact) """ def __new__(self, World world not None, jointgroup, Contact contact): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreateContact(world.wid, jgid, &contact._contact) def __init__(self, World world not None, jointgroup, Contact contact): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # AMotor cdef class AMotor(Joint): """AMotor joint. Constructor:: AMotor(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid = NULL if jointgroup!=None: jg = jointgroup jgid = jg.gid self.jid = dJointCreateAMotor(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setMode def setMode(self, mode): """setMode(mode) Set the angular motor mode. mode must be either AMotorUser or AMotorEuler. @param mode: Angular motor mode @type mode: int """ dJointSetAMotorMode(self.jid, mode) # getMode def getMode(self): """getMode() Return the angular motor mode (AMotorUser or AMotorEuler). """ return dJointGetAMotorMode(self.jid) # setNumAxes def setNumAxes(self, int num): """setNumAxes(num) Set the number of angular axes that will be controlled by the AMotor. num may be in the range from 0 to 3. @param num: Number of axes (0-3) @type num: int """ dJointSetAMotorNumAxes(self.jid, num) # getNumAxes def getNumAxes(self): """getNumAxes() -> int Get the number of angular axes that are controlled by the AMotor. """ return dJointGetAMotorNumAxes(self.jid) # setAxis def setAxis(self, int anum, int rel, axis): """setAxis(anum, rel, axis) Set an AMotor axis. The anum argument selects the axis to change (0,1 or 2). Each axis can have one of three "relative orientation" modes, selected by rel: 0: The axis is anchored to the global frame. 1: The axis is anchored to the first body. 2: The axis is anchored to the second body. The axis vector is always specified in global coordinates regardless of the setting of rel. @param anum: Axis number @param rel: Relative orientation mode @param axis: Axis @type anum: int @type rel: int @type axis: 3-sequence of floats """ dJointSetAMotorAxis(self.jid, anum, rel, axis[0], axis[1], axis[2]) # getAxis def getAxis(self, int anum): """getAxis(anum) Get an AMotor axis. @param anum: Axis index (0-2) @type anum: int """ cdef dVector3 a dJointGetAMotorAxis(self.jid, anum, a) return (a[0],a[1],a[2]) # getAxisRel def getAxisRel(self, int anum): """getAxisRel(anum) -> int Get the relative mode of an axis. @param anum: Axis index (0-2) @type anum: int """ return dJointGetAMotorAxisRel(self.jid, anum) # setAngle def setAngle(self, int anum, angle): """setAngle(anum, angle) Tell the AMotor what the current angle is along axis anum. @param anum: Axis index @param angle: Angle @type anum: int @type angle: float """ dJointSetAMotorAngle(self.jid, anum, angle) # getAngle def getAngle(self, int anum): """getAngle(anum) -> float Return the current angle for axis anum. @param anum: Axis index @type anum: int """ return dJointGetAMotorAngle(self.jid, anum) # getAngleRate def getAngleRate(self, int anum): """getAngleRate(anum) -> float Return the current angle rate for axis anum. @param anum: Axis index @type anum: int """ return dJointGetAMotorAngleRate(self.jid, anum) # addTorques def addTorques(self, torque0, torque1, torque2): """addTorques(torque0, torque1, torque2) Applies torques about the AMotor's axes. @param torque0: Torque 0 magnitude @param torque1: Torque 1 magnitude @param torque2: Torque 2 magnitude @type torque0: float @type torque1: float @type torque2: float """ dJointAddAMotorTorques(self.jid, torque0, torque1, torque2) # setParam def setParam(self, param, value): dJointSetAMotorParam(self.jid, param, value) # getParam def getParam(self, param): return dJointGetAMotorParam(self.jid, param) # LMotor cdef class LMotor(Joint): """LMotor joint. Constructor:: LMotor(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid = NULL if jointgroup!=None: jg = jointgroup jgid = jg.gid self.jid = dJointCreateLMotor(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) # setNumAxes def setNumAxes(self, int num): """setNumAxes(num) Set the number of angular axes that will be controlled by the LMotor. num may be in the range from 0 to 3. @param num: Number of axes (0-3) @type num: int """ dJointSetLMotorNumAxes(self.jid, num) # getNumAxes def getNumAxes(self): """getNumAxes() -> int Get the number of angular axes that are controlled by the LMotor. """ return dJointGetLMotorNumAxes(self.jid) # setAxis def setAxis(self, int anum, int rel, axis): """setAxis(anum, rel, axis) Set an LMotor axis. The anum argument selects the axis to change (0,1 or 2). Each axis can have one of three "relative orientation" modes, selected by rel: 0: The axis is anchored to the global frame. 1: The axis is anchored to the first body. 2: The axis is anchored to the second body. @param anum: Axis number @param rel: Relative orientation mode @param axis: Axis @type anum: int @type rel: int @type axis: 3-sequence of floats """ dJointSetLMotorAxis(self.jid, anum, rel, axis[0], axis[1], axis[2]) # getAxis def getAxis(self, int anum): """getAxis(anum) Get an LMotor axis. @param anum: Axis index (0-2) @type anum: int """ cdef dVector3 a dJointGetLMotorAxis(self.jid, anum, a) return (a[0],a[1],a[2]) # setParam def setParam(self, param, value): dJointSetLMotorParam(self.jid, param, value) # getParam def getParam(self, param): return dJointGetLMotorParam(self.jid, param) # Plane2DJoint cdef class Plane2DJoint(Joint): """Plane-2D Joint. Constructor:: Plane2DJoint(world, jointgroup=None) """ def __new__(self, World world not None, jointgroup=None): cdef JointGroup jg cdef dJointGroupID jgid jgid=NULL if jointgroup!=None: jg=jointgroup jgid=jg.gid self.jid = dJointCreatePlane2D(world.wid, jgid) def __init__(self, World world not None, jointgroup=None): self.world = world if jointgroup!=None: jointgroup._addjoint(self) def setXParam(self, param, value): dJointSetPlane2DXParam(self.jid, param, value) def setYParam(self, param, value): dJointSetPlane2DYParam(self.jid, param, value) def setAngleParam(self, param, value): dJointSetPlane2DAngleParam(self.jid, param, value) PyODE-1.2.0/src/ode.pyx0000644000175000001440000001630510525055064014133 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # Open Dynamics Engine # Copyright (c) 2001-2003, Russell L. Smith. # All rights reserved. #################################################################### include "declarations.pyx" # The World should keep a reference to joints/bodies, so that they won't # be deleted. # Excplicitly assign the module doc string to __doc__ # (otherwise it won't show up which is probably a "bug" in Pyrex (v0.9.2.1)) __doc__ = """Python Open Dynamics Engine (ODE) wrapper. This module contains classes and functions that wrap the functionality of the Open Dynamics Engine (ODE) which can be found at http://opende.sourceforge.net. There are the following classes and functions: - World - Body - JointGroup - Contact - Space - Mass Joint classes: - BallJoint - HingeJoint - Hinge2Joint - SliderJoint - UniversalJoint - FixedJoint - ContactJoint - AMotor - LMotor - Plane2DJoint Geom classes: - GeomSphere - GeomBox - GeomPlane - GeomCapsule - GeomCylinder - GeomRay - GeomTransform - GeomTriMesh / TriMeshData Functions: - CloseODE() - collide() """ ############################# Constants ############################### paramLoStop = 0 paramHiStop = 1 paramVel = 2 paramFMax = 3 paramFudgeFactor = 4 paramBounce = 5 paramCFM = 6 paramStopERP = 7 paramStopCFM = 8 paramSuspensionERP = 9 paramSuspensionCFM = 10 ParamLoStop = 0 ParamHiStop = 1 ParamVel = 2 ParamFMax = 3 ParamFudgeFactor = 4 ParamBounce = 5 ParamCFM = 6 ParamStopERP = 7 ParamStopCFM = 8 ParamSuspensionERP = 9 ParamSuspensionCFM = 10 ParamLoStop2 = 256+0 ParamHiStop2 = 256+1 ParamVel2 = 256+2 ParamFMax2 = 256+3 ParamFudgeFactor2 = 256+4 ParamBounce2 = 256+5 ParamCFM2 = 256+6 ParamStopERP2 = 256+7 ParamStopCFM2 = 256+8 ParamSuspensionERP2 = 256+9 ParamSuspensionCFM2 = 256+10 ParamLoStop3 = 512+0 ParamHiStop3 = 512+1 ParamVel3 = 512+2 ParamFMax3 = 512+3 ParamFudgeFactor3 = 512+4 ParamBounce3 = 512+5 ParamCFM3 = 512+6 ParamStopERP3 = 512+7 ParamStopCFM3 = 512+8 ParamSuspensionERP3 = 512+9 ParamSuspensionCFM3 = 512+10 ParamGroup = 256 ContactMu2 = 0x001 ContactFDir1 = 0x002 ContactBounce = 0x004 ContactSoftERP = 0x008 ContactSoftCFM = 0x010 ContactMotion1 = 0x020 ContactMotion2 = 0x040 ContactSlip1 = 0x080 ContactSlip2 = 0x100 ContactApprox0 = 0x0000 ContactApprox1_1 = 0x1000 ContactApprox1_2 = 0x2000 ContactApprox1 = 0x3000 AMotorUser = dAMotorUser AMotorEuler = dAMotorEuler Infinity = dInfinity ###################################################################### # Lookup table for geom objects: C ptr -> Python object _geom_c2py_lut = {} # Mass include "mass.pyx" # Contact include "contact.pyx" # World include "world.pyx" # Body include "body.pyx" # Joint classes include "joints.pyx" # Geom base include "geomobject.pyx" # Space include "space.pyx" # Geom classes include "geoms.pyx" # Include the generated trimesh switch file that either includes the real # trimesh wrapper (trimesh.pyx/trimeshdata.pyx) or a dummy wrapper # (trimesh_dummy.pyx) if trimesh support is not available/desired. include "_trimesh_switch.pyx" def collide(geom1, geom2): """collide(geom1, geom2) -> contacts Generate contact information for two objects. Given two geometry objects that potentially touch (geom1 and geom2), generate contact information for them. Internally, this just calls the correct class-specific collision functions for geom1 and geom2. [flags specifies how contacts should be generated if the objects touch. Currently the lower 16 bits of flags specifies the maximum number of contact points to generate. If this number is zero, this function just pretends that it is one - in other words you can not ask for zero contacts. All other bits in flags must be zero. In the future the other bits may be used to select other contact generation strategies.] If the objects touch, this returns a list of Contact objects, otherwise it returns an empty list. @param geom1: First Geom @type geom1: GeomObject @param geom2: Second Geom @type geom2: GeomObject @returns: Returns a list of Contact objects. """ cdef dContactGeom c[150] cdef long id1 cdef long id2 cdef int i, n cdef Contact cont id1 = geom1._id() id2 = geom2._id() n = dCollide(id1, id2, 150, c, sizeof(dContactGeom)) res = [] i=0 while itup # collide_callback is defined in space.pyx dSpaceCollide2(id1, id2, data, collide_callback) def areConnected(Body body1, Body body2): """areConnected(body1, body2) -> bool Return True if the two bodies are connected together by a joint, otherwise return False. @param body1: First body @type body1: Body @param body2: Second body @type body2: Body @returns: True if the bodies are connected """ if (body1 is environment): return False if (body2 is environment): return False return bool(dAreConnected( body1.bid, body2.bid)) def CloseODE(): """CloseODE() Deallocate some extra memory used by ODE that can not be deallocated using the normal destroy functions. """ dCloseODE() ###################################################################### #environment = Body(None) environment = None PyODE-1.2.0/src/body.pyx0000644000175000001440000004137610251045412014317 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # Body cdef class Body: """The rigid body class encapsulating the ODE body. This class represents a rigid body that has a location and orientation in space and that stores the mass properties of an object. When creating a Body object you have to pass the world it belongs to as argument to the constructor:: >>> import ode >>> w = ode.World() >>> b = ode.Body(w) """ cdef dBodyID bid # A reference to the world so that the world won't be destroyed while # there are still joints using it. cdef object world # A dictionary with user attributes # (set via __getattr__ and __setattr__) cdef object userattribs def __new__(self, World world not None): self.bid = dBodyCreate(world.wid) def __init__(self, World world not None): """Constructor. @param world: The world in which the body should be created. @type world: World """ self.world = world self.userattribs = {} def __dealloc__(self): if self.bid!=NULL: dBodyDestroy(self.bid) def __getattr__(self, name): try: return self.userattribs[name] except: raise AttributeError, "Body object has no attribute '%s'"%name def __setattr__(self, name, value): self.userattribs[name] = value def __delattr__(self, name): try: del self.userattribs[name] except: raise AttributeError, "Body object has no attribute '%s'"%name # setPosition def setPosition(self, pos): """setPosition(pos) Set the position of the body. @param pos: The new position @type pos: 3-sequence of floats """ dBodySetPosition(self.bid, pos[0], pos[1], pos[2]) # getPosition def getPosition(self): """getPosition() -> 3-tuple Return the current position of the body. """ cdef dReal* p # The "const" in the original return value is cast away p = dBodyGetPosition(self.bid) return (p[0],p[1],p[2]) # setRotation def setRotation(self, R): """setRotation(R) Set the orientation of the body. The rotation matrix must be given as a sequence of 9 floats which are the elements of the matrix in row-major order. @param R: Rotation matrix @type R: 9-sequence of floats """ cdef dMatrix3 m m[0] = R[0] m[1] = R[1] m[2] = R[2] m[3] = 0 m[4] = R[3] m[5] = R[4] m[6] = R[5] m[7] = 0 m[8] = R[6] m[9] = R[7] m[10] = R[8] m[11] = 0 dBodySetRotation(self.bid, m) # getRotation def getRotation(self): """getRotation() -> 9-tuple Return the current rotation matrix as a tuple of 9 floats (row-major order). """ cdef dReal* m # The "const" in the original return value is cast away m = dBodyGetRotation(self.bid) return (m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]) # getQuaternion def getQuaternion(self): """getQuaternion() -> 4-tuple Return the current rotation as a quaternion. The return value is a list of 4 floats. """ cdef dReal* q q = dBodyGetQuaternion(self.bid) return (q[0], q[1], q[2], q[3]) # setQuaternion def setQuaternion(self, q): """setQuaternion(q) Set the orientation of the body. The quaternion must be given as a sequence of 4 floats. @param q: Quaternion @type q: 4-sequence of floats """ cdef dQuaternion w w[0] = q[0] w[1] = q[1] w[2] = q[2] w[3] = q[3] dBodySetQuaternion(self.bid, w) # setLinearVel def setLinearVel(self, vel): """setLinearVel(vel) Set the linear velocity of the body. @param vel: New velocity @type vel: 3-sequence of floats """ dBodySetLinearVel(self.bid, vel[0], vel[1], vel[2]) # getLinearVel def getLinearVel(self): """getLinearVel() -> 3-tuple Get the current linear velocity of the body. """ cdef dReal* p # The "const" in the original return value is cast away p = dBodyGetLinearVel(self.bid) return (p[0],p[1],p[2]) # setAngularVel def setAngularVel(self, vel): """setAngularVel(vel) Set the angular velocity of the body. @param vel: New angular velocity @type vel: 3-sequence of floats """ dBodySetAngularVel(self.bid, vel[0], vel[1], vel[2]) # getAngularVel def getAngularVel(self): """getAngularVel() -> 3-tuple Get the current angular velocity of the body. """ cdef dReal* p # The "const" in the original return value is cast away p = dBodyGetAngularVel(self.bid) return (p[0],p[1],p[2]) # setMass def setMass(self, Mass mass): """setMass(mass) Set the mass properties of the body. The argument mass must be an instance of a Mass object. @param mass: Mass properties @type mass: Mass """ dBodySetMass(self.bid, &mass._mass) # getMass def getMass(self): """getMass() -> mass Return the mass properties as a Mass object. """ cdef Mass m m=Mass() dBodyGetMass(self.bid, &m._mass) return m # addForce def addForce(self, f): """addForce(f) Add an external force f given in absolute coordinates. The force is applied at the center of mass. @param f: Force @type f: 3-sequence of floats """ dBodyAddForce(self.bid, f[0], f[1], f[2]) # addTorque def addTorque(self, t): """addTorque(t) Add an external torque t given in absolute coordinates. @param t: Torque @type t: 3-sequence of floats """ dBodyAddTorque(self.bid, t[0], t[1], t[2]) # addRelForce def addRelForce(self, f): """addRelForce(f) Add an external force f given in relative coordinates (relative to the body's own frame of reference). The force is applied at the center of mass. @param f: Force @type f: 3-sequence of floats """ dBodyAddRelForce(self.bid, f[0], f[1], f[2]) # addRelTorque def addRelTorque(self, t): """addRelTorque(t) Add an external torque t given in relative coordinates (relative to the body's own frame of reference). @param t: Torque @type t: 3-sequence of floats """ dBodyAddRelTorque(self.bid, t[0], t[1], t[2]) # addForceAtPos def addForceAtPos(self, f, p): """addForceAtPos(f, p) Add an external force f at position p. Both arguments must be given in absolute coordinates. @param f: Force @param p: Position @type f: 3-sequence of floats @type p: 3-sequence of floats """ dBodyAddForceAtPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) # addForceAtRelPos def addForceAtRelPos(self, f, p): """addForceAtRelPos(f, p) Add an external force f at position p. f is given in absolute coordinates and p in absolute coordinates. @param f: Force @param p: Position @type f: 3-sequence of floats @type p: 3-sequence of floats """ dBodyAddForceAtRelPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) # addRelForceAtPos def addRelForceAtPos(self, f, p): """addRelForceAtPos(f, p) Add an external force f at position p. f is given in relative coordinates and p in relative coordinates. @param f: Force @param p: Position @type f: 3-sequence of floats @type p: 3-sequence of floats """ dBodyAddRelForceAtPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) # addRelForceAtRelPos def addRelForceAtRelPos(self, f, p): """addRelForceAtRelPos(f, p) Add an external force f at position p. Both arguments must be given in relative coordinates. @param f: Force @param p: Position @type f: 3-sequence of floats @type p: 3-sequence of floats """ dBodyAddRelForceAtRelPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) # getForce def getForce(self): """getForce() -> 3-tuple Return the current accumulated force. """ cdef dReal* f # The "const" in the original return value is cast away f = dBodyGetForce(self.bid) return (f[0],f[1],f[2]) # getTorque def getTorque(self): """getTorque() -> 3-tuple Return the current accumulated torque. """ cdef dReal* f # The "const" in the original return value is cast away f = dBodyGetTorque(self.bid) return (f[0],f[1],f[2]) # setForce def setForce(self, f): """setForce(f) Set the body force accumulation vector. @param f: Force @type f: 3-tuple of floats """ dBodySetForce(self.bid, f[0], f[1], f[2]) # setTorque def setTorque(self, t): """setTorque(t) Set the body torque accumulation vector. @param t: Torque @type t: 3-tuple of floats """ dBodySetTorque(self.bid, t[0], t[1], t[2]) # getRelPointPos def getRelPointPos(self, p): """getRelPointPos(p) -> 3-tuple Utility function that takes a point p on a body and returns that point's position in global coordinates. The point p must be given in body relative coordinates. @param p: Body point (local coordinates) @type p: 3-sequence of floats """ cdef dVector3 res dBodyGetRelPointPos(self.bid, p[0], p[1], p[2], res) return (res[0], res[1], res[2]) # getRelPointVel def getRelPointVel(self, p): """getRelPointVel(p) -> 3-tuple Utility function that takes a point p on a body and returns that point's velocity in global coordinates. The point p must be given in body relative coordinates. @param p: Body point (local coordinates) @type p: 3-sequence of floats """ cdef dVector3 res dBodyGetRelPointVel(self.bid, p[0], p[1], p[2], res) return (res[0], res[1], res[2]) # getPointVel def getPointVel(self, p): """getPointVel(p) -> 3-tuple Utility function that takes a point p on a body and returns that point's velocity in global coordinates. The point p must be given in global coordinates. @param p: Body point (global coordinates) @type p: 3-sequence of floats """ cdef dVector3 res dBodyGetPointVel(self.bid, p[0], p[1], p[2], res) return (res[0], res[1], res[2]) # getPosRelPoint def getPosRelPoint(self, p): """getPosRelPoint(p) -> 3-tuple This is the inverse of getRelPointPos(). It takes a point p in global coordinates and returns the point's position in body-relative coordinates. @param p: Body point (global coordinates) @type p: 3-sequence of floats """ cdef dVector3 res dBodyGetPosRelPoint(self.bid, p[0], p[1], p[2], res) return (res[0], res[1], res[2]) # vectorToWorld def vectorToWorld(self, v): """vectorToWorld(v) -> 3-tuple Given a vector v expressed in the body coordinate system, rotate it to the world coordinate system. @param v: Vector in body coordinate system @type v: 3-sequence of floats """ cdef dVector3 res dBodyVectorToWorld(self.bid, v[0], v[1], v[2], res) return (res[0], res[1], res[2]) # vectorFromWorld def vectorFromWorld(self, v): """vectorFromWorld(v) -> 3-tuple Given a vector v expressed in the world coordinate system, rotate it to the body coordinate system. @param v: Vector in world coordinate system @type v: 3-sequence of floats """ cdef dVector3 res dBodyVectorFromWorld(self.bid, v[0], v[1], v[2], res) return (res[0], res[1], res[2]) # Enable def enable(self): """enable() Manually enable a body. """ dBodyEnable(self.bid) # Disable def disable(self): """disable() Manually disable a body. Note that a disabled body that is connected through a joint to an enabled body will be automatically re-enabled at the next simulation step. """ dBodyDisable(self.bid) # isEnabled def isEnabled(self): """isEnabled() -> bool Check if a body is currently enabled. """ return dBodyIsEnabled(self.bid) # setFiniteRotationMode def setFiniteRotationMode(self, mode): """setFiniteRotationMode(mode) This function controls the way a body's orientation is updated at each time step. The mode argument can be: - 0: An "infinitesimal" orientation update is used. This is fast to compute, but it can occasionally cause inaccuracies for bodies that are rotating at high speed, especially when those bodies are joined to other bodies. This is the default for every new body that is created. - 1: A "finite" orientation update is used. This is more costly to compute, but will be more accurate for high speed rotations. Note however that high speed rotations can result in many types of error in a simulation, and this mode will only fix one of those sources of error. @param mode: Rotation mode (0/1) @type mode: int """ dBodySetFiniteRotationMode(self.bid, mode) # getFiniteRotationMode def getFiniteRotationMode(self): """getFiniteRotationMode() -> mode (0/1) Return the current finite rotation mode of a body (0 or 1). See setFiniteRotationMode(). """ return dBodyGetFiniteRotationMode(self.bid) # setFiniteRotationAxis def setFiniteRotationAxis(self, a): """setFiniteRotationAxis(a) Set the finite rotation axis of the body. This axis only has a meaning when the finite rotation mode is set (see setFiniteRotationMode()). @param a: Axis @type a: 3-sequence of floats """ dBodySetFiniteRotationAxis(self.bid, a[0], a[1], a[2]) # getFiniteRotationAxis def getFiniteRotationAxis(self): """getFiniteRotationAxis() -> 3-tuple Return the current finite rotation axis of the body. """ cdef dVector3 p # The "const" in the original return value is cast away dBodyGetFiniteRotationAxis(self.bid, p) return (p[0],p[1],p[2]) # getNumJoints def getNumJoints(self): """getNumJoints() -> int Return the number of joints that are attached to this body. """ return dBodyGetNumJoints(self.bid) # setGravityMode def setGravityMode(self, mode): """setGravityMode(mode) Set whether the body is influenced by the world's gravity or not. If mode is True it is, otherwise it isn't. Newly created bodies are always influenced by the world's gravity. @param mode: Gravity mode @type mode: bool """ dBodySetGravityMode(self.bid, mode) # getGravityMode def getGravityMode(self): """getGravityMode() -> bool Return True if the body is influenced by the world's gravity. """ return dBodyGetGravityMode(self.bid) PyODE-1.2.0/src/geoms.pyx0000644000175000001440000003206210525055064014474 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # GeomSphere cdef class GeomSphere(GeomObject): """Sphere geometry. This class represents a sphere centered at the origin. Constructor:: GeomSphere(space=None, radius=1.0) """ def __new__(self, space=None, radius=1.0): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateSphere(sid, radius) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, radius=1.0): self.space = space self.body = None def placeable(self): return True def _id(self): cdef long id id = self.gid return id def setRadius(self, radius): """setRadius(radius) Set the radius of the sphere. @param radius: New radius @type radius: float """ dGeomSphereSetRadius(self.gid, radius) def getRadius(self): """getRadius() -> float Return the radius of the sphere. """ return dGeomSphereGetRadius(self.gid) def pointDepth(self, p): """pointDepth(p) -> float Return the depth of the point p in the sphere. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. @param p: Point @type p: 3-sequence of floats """ return dGeomSpherePointDepth(self.gid, p[0], p[1], p[2]) # GeomBox cdef class GeomBox(GeomObject): """Box geometry. This class represents a box centered at the origin. Constructor:: GeomBox(space=None, lengths=(1.0, 1.0, 1.0)) """ def __new__(self, space=None, lengths=(1.0, 1.0, 1.0)): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateBox(sid, lengths[0],lengths[1],lengths[2]) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, lengths=(1.0, 1.0, 1.0)): self.space = space self.body = None def placeable(self): return True def _id(self): cdef long id id = self.gid return id def setLengths(self, lengths): dGeomBoxSetLengths(self.gid, lengths[0], lengths[1], lengths[2]) def getLengths(self): cdef dVector3 res dGeomBoxGetLengths(self.gid, res) return (res[0], res[1], res[2]) def pointDepth(self, p): """pointDepth(p) -> float Return the depth of the point p in the box. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. @param p: Point @type p: 3-sequence of floats """ return dGeomBoxPointDepth(self.gid, p[0], p[1], p[2]) # GeomPlane cdef class GeomPlane(GeomObject): """Plane geometry. This class represents an infinite plane. The plane equation is: n.x*x + n.y*y + n.z*z = dist This object can't be attached to a body. If you call getBody() on this object it always returns ode.environment. Constructor:: GeomPlane(space=None, normal=(0,0,1), dist=0) """ def __new__(self, space=None, normal=(0,0,1), dist=0): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreatePlane(sid, normal[0], normal[1], normal[2], dist) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, normal=(0,0,1), dist=0): self.space = space def _id(self): cdef long id id = self.gid return id def setParams(self, normal, dist): dGeomPlaneSetParams(self.gid, normal[0], normal[1], normal[2], dist) def getParams(self): cdef dVector4 res dGeomPlaneGetParams(self.gid, res) return ((res[0], res[1], res[2]), res[3]) def pointDepth(self, p): """pointDepth(p) -> float Return the depth of the point p in the plane. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. @param p: Point @type p: 3-sequence of floats """ return dGeomPlanePointDepth(self.gid, p[0], p[1], p[2]) # GeomCapsule cdef class GeomCapsule(GeomObject): """Capped cylinder geometry. This class represents a capped cylinder aligned along the local Z axis and centered at the origin. Constructor:: GeomCapsule(space=None, radius=0.5, length=1.0) The length parameter does not include the caps. """ def __new__(self, space=None, radius=0.5, length=1.0): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateCapsule(sid, radius, length) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, radius=0.5, length=1.0): self.space = space self.body = None def placeable(self): return True def _id(self): cdef long id id = self.gid return id def setParams(self, radius, length): dGeomCapsuleSetParams(self.gid, radius, length) def getParams(self): cdef dReal radius, length dGeomCapsuleGetParams(self.gid, &radius, &length) return (radius, length) def pointDepth(self, p): """pointDepth(p) -> float Return the depth of the point p in the cylinder. Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth. @param p: Point @type p: 3-sequence of floats """ return dGeomCapsulePointDepth(self.gid, p[0], p[1], p[2]) GeomCCylinder = GeomCapsule # backwards compatibility # GeomCylinder cdef class GeomCylinder(GeomObject): """Plain cylinder geometry. This class represents an uncapped cylinder aligned along the local Z axis and centered at the origin. Constructor:: GeomCylinder(space=None, radius=0.5, length=1.0) """ def __new__(self, space=None, radius=0.5, length=1.0): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateCylinder(sid, radius, length) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, radius=0.5, length=1.0): self.space = space self.body = None def placeable(self): return True def _id(self): cdef long id id = self.gid return id def setParams(self, radius, length): dGeomCylinderSetParams(self.gid, radius, length) def getParams(self): cdef dReal radius, length dGeomCylinderGetParams(self.gid, &radius, &length) return (radius, length) ## dGeomCylinderPointDepth not implemented upstream in ODE 0.7 # GeomRay cdef class GeomRay(GeomObject): """Ray object. A ray is different from all the other geom classes in that it does not represent a solid object. It is an infinitely thin line that starts from the geom's position and extends in the direction of the geom's local Z-axis. Constructor:: GeomRay(space=None, rlen=1.0) """ def __new__(self, space=None, rlen=1.0): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateRay(sid, rlen) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None, rlen=1.0): self.space = space self.body = None def _id(self): cdef long id id = self.gid return id def setLength(self, rlen): dGeomRaySetLength(self.gid, rlen) def getLength(self): return dGeomRayGetLength(self.gid) def set(self, p, u): dGeomRaySet(self.gid, p[0],p[1],p[2], u[0],u[1],u[2]) def get(self): cdef dVector3 start cdef dVector3 dir dGeomRayGet(self.gid, start, dir) return ((start[0],start[1],start[2]), (dir[0],dir[1],dir[2])) # GeomTransform cdef class GeomTransform(GeomObject): """GeomTransform. A geometry transform "T" is a geom that encapsulates another geom "E", allowing E to be positioned and rotated arbitrarily with respect to its point of reference. Constructor:: GeomTransform(space=None) """ cdef object geom def __new__(self, space=None): cdef SpaceBase sp cdef dSpaceID sid sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateGeomTransform(sid) # Set cleanup mode to 0 as a contained geom will be deleted # by its Python wrapper class dGeomTransformSetCleanup(self.gid, 0) # if space!=None: # space._addgeom(self) _geom_c2py_lut[self.gid]=self def __init__(self, space=None): self.space = space self.body = None self.geom = None self.attribs={} def placeable(self): return True def _id(self): cdef long id id = self.gid return id def setGeom(self, GeomObject geom not None): """setGeom(geom) Set the geom that the geometry transform encapsulates. A ValueError exception is thrown if a) the geom is not placeable, b) the geom was already inserted into a space or c) the geom is already associated with a body. @param geom: Geom object to encapsulate @type geom: GeomObject """ cdef long id if not geom.placeable(): raise ValueError, "Only placeable geoms can be encapsulated by a GeomTransform" if dGeomGetSpace(geom.gid)!=0: raise ValueError, "The encapsulated geom was already inserted into a space." if dGeomGetBody(geom.gid)!=0: raise ValueError, "The encapsulated geom is already associated with a body." id = geom._id() dGeomTransformSetGeom(self.gid, id) self.geom = geom def getGeom(self): """getGeom() -> GeomObject Get the geom that the geometry transform encapsulates. """ return self.geom def setInfo(self, int mode): """setInfo(mode) Set the "information" mode of the geometry transform. With mode 0, when a transform object is collided with another object, the geom field of the ContactGeom structure is set to the geom that is encapsulated by the transform object. With mode 1, the geom field of the ContactGeom structure is set to the transform object itself. @param mode: Information mode (0 or 1) @type mode: int """ if mode<0 or mode>1: raise ValueError, "Invalid information mode (%d). Must be either 0 or 1."%mode dGeomTransformSetInfo(self.gid, mode) def getInfo(self): """getInfo() -> int Get the "information" mode of the geometry transform (0 or 1). With mode 0, when a transform object is collided with another object, the geom field of the ContactGeom structure is set to the geom that is encapsulated by the transform object. With mode 1, the geom field of the ContactGeom structure is set to the transform object itself. """ return dGeomTransformGetInfo(self.gid) PyODE-1.2.0/src/trimesh.pyx0000644000175000001440000000532410146207203015027 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # This file is included by _trimesh_switch.pyx if the variable # TRIMESH_SUPPORT was set to True in the setup script. # GeomTriMesh cdef class GeomTriMesh(GeomObject): """TriMesh object. To construct the trimesh geom you need a TriMeshData object that stores the actual mesh. This object has to be passed as first argument to the constructor. Constructor:: GeomTriMesh(data, space=None) """ # Keep a reference to the data cdef TriMeshData data def __new__(self, TriMeshData data not None, space=None): cdef SpaceBase sp cdef dSpaceID sid self.data = data sid=NULL if space!=None: sp = space sid = sp.sid self.gid = dCreateTriMesh(sid, data.tmdid, NULL, NULL, NULL) _geom_c2py_lut[self.gid] = self def __init__(self, TriMeshData data not None, space=None): self.space = space self.body = None def placeable(self): return True def _id(self): cdef long id id = self.gid return id def clearTCCache(self): """clearTCCache() Clears the internal temporal coherence caches. """ dGeomTriMeshClearTCCache(self.gid) def getTriangle(self, int idx): """getTriangle(idx) -> (v0, v1, v2) @param idx: Triangle index @type idx: int """ cdef dVector3 v0, v1, v2 cdef dVector3* vp0 cdef dVector3* vp1 cdef dVector3* vp2 vp0 = v0 vp1 = v1 vp2 = v2 dGeomTriMeshGetTriangle(self.gid, idx, vp0, vp1, vp2) return ((v0[0],v0[1],v0[2]), (v1[0],v1[1],v1[2]), (v2[0],v2[1],v2[2])) PyODE-1.2.0/src/declarations.pyx0000644000175000001440000004556510525055064016046 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### cdef extern from "stdlib.h": void* malloc(long) void free(void*) cdef extern from "stdio.h": int printf(char*) # Include the basic floating point type -> dReal (either float or double) #include "_precision.pyx" cdef extern from "ode/ode.h": ctypedef double dReal # Dummy structs cdef struct dxWorld: int _dummy cdef struct dxSpace: int _dummy cdef struct dxBody: int _dummy cdef struct dxGeom: int _dummy cdef struct dxJoint: int _dummy cdef struct dxJointGroup: int _dummy cdef struct dxTriMeshData: int _dummy # Types ctypedef dxWorld* dWorldID ctypedef dxSpace* dSpaceID ctypedef dxBody* dBodyID ctypedef dxGeom* dGeomID ctypedef dxJoint* dJointID ctypedef dxJointGroup* dJointGroupID ctypedef dxTriMeshData* dTriMeshDataID ctypedef dReal dVector3[4] ctypedef dReal dVector4[4] ctypedef dReal dMatrix3[4*3] ctypedef dReal dMatrix4[4*4] ctypedef dReal dMatrix6[8*6] ctypedef dReal dQuaternion[4] cdef extern dReal dInfinity cdef extern int dAMotorUser cdef extern int dAMotorEuler ctypedef struct dMass: dReal mass dVector4 c dMatrix3 I ctypedef struct dJointFeedback: dVector3 f1 dVector3 t1 dVector3 f2 dVector3 t2 ctypedef void dNearCallback(void* data, dGeomID o1, dGeomID o2) ctypedef struct dSurfaceParameters: int mode dReal mu dReal mu2 dReal bounce dReal bounce_vel dReal soft_erp dReal soft_cfm dReal motion1,motion2 dReal slip1,slip2 ctypedef struct dContactGeom: dVector3 pos dVector3 normal dReal depth dGeomID g1,g2 ctypedef struct dContact: dSurfaceParameters surface dContactGeom geom dVector3 fdir1 # World dWorldID dWorldCreate() void dWorldDestroy (dWorldID) void dCloseODE() void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z) void dWorldGetGravity (dWorldID, dVector3 gravity) void dWorldSetERP (dWorldID, dReal erp) dReal dWorldGetERP (dWorldID) void dWorldSetCFM (dWorldID, dReal cfm) dReal dWorldGetCFM (dWorldID) void dWorldStep (dWorldID, dReal stepsize) void dWorldQuickStep (dWorldID, dReal stepsize) void dWorldSetQuickStepNumIterations (dWorldID, int num) int dWorldGetQuickStepNumIterations (dWorldID) void dWorldSetContactMaxCorrectingVel (dWorldID, dReal vel) dReal dWorldGetContactMaxCorrectingVel (dWorldID) void dWorldSetContactSurfaceLayer (dWorldID, dReal depth) dReal dWorldGetContactSurfaceLayer (dWorldID) void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable) int dWorldGetAutoDisableFlag (dWorldID) void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_threshold) dReal dWorldGetAutoDisableLinearThreshold (dWorldID) void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_threshold) dReal dWorldGetAutoDisableAngularThreshold (dWorldID) void dWorldSetAutoDisableSteps (dWorldID, int steps) int dWorldGetAutoDisableSteps (dWorldID) void dWorldSetAutoDisableTime (dWorldID, dReal time) dReal dWorldGetAutoDisableTime (dWorldID) void dWorldImpulseToForce (dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force) # Body dBodyID dBodyCreate (dWorldID) void dBodyDestroy (dBodyID) void dBodySetData (dBodyID, void *data) void *dBodyGetData (dBodyID) void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z) void dBodySetRotation (dBodyID, dMatrix3 R) void dBodySetQuaternion (dBodyID, dQuaternion q) void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z) void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z) dReal * dBodyGetPosition (dBodyID) dReal * dBodyGetRotation (dBodyID) dReal * dBodyGetQuaternion (dBodyID) dReal * dBodyGetLinearVel (dBodyID) dReal * dBodyGetAngularVel (dBodyID) void dBodySetMass (dBodyID, dMass *mass) void dBodyGetMass (dBodyID, dMass *mass) void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz) void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz) void dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz) void dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz) void dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) void dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) void dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) void dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) dReal * dBodyGetForce (dBodyID) dReal * dBodyGetTorque (dBodyID) void dBodySetForce(dBodyID, dReal x, dReal y, dReal z) void dBodySetTorque(dBodyID, dReal x, dReal y, dReal z) void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) void dBodySetFiniteRotationMode (dBodyID, int mode) void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z) int dBodyGetFiniteRotationMode (dBodyID) void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result) int dBodyGetNumJoints (dBodyID b) dJointID dBodyGetJoint (dBodyID, int index) void dBodyEnable (dBodyID) void dBodyDisable (dBodyID) int dBodyIsEnabled (dBodyID) void dBodySetGravityMode (dBodyID b, int mode) int dBodyGetGravityMode (dBodyID b) # Joints dJointID dJointCreateBall (dWorldID, dJointGroupID) dJointID dJointCreateHinge (dWorldID, dJointGroupID) dJointID dJointCreateSlider (dWorldID, dJointGroupID) dJointID dJointCreateContact (dWorldID, dJointGroupID, dContact *) dJointID dJointCreateUniversal (dWorldID, dJointGroupID) dJointID dJointCreateHinge2 (dWorldID, dJointGroupID) dJointID dJointCreateFixed (dWorldID, dJointGroupID) dJointID dJointCreateNull (dWorldID, dJointGroupID) dJointID dJointCreateAMotor (dWorldID, dJointGroupID) dJointID dJointCreateLMotor (dWorldID, dJointGroupID) dJointID dJointCreatePlane2D (dWorldID, dJointGroupID) void dJointDestroy (dJointID) dJointGroupID dJointGroupCreate (int max_size) void dJointGroupDestroy (dJointGroupID) void dJointGroupEmpty (dJointGroupID) void dJointAttach (dJointID, dBodyID body1, dBodyID body2) void dJointSetData (dJointID, void *data) void *dJointGetData (dJointID) int dJointGetType (dJointID) dBodyID dJointGetBody (dJointID, int index) void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z) void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z) void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z) void dJointSetHingeParam (dJointID, int parameter, dReal value) void dJointAddHingeTorque(dJointID joint, dReal torque) void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z) void dJointSetSliderParam (dJointID, int parameter, dReal value) void dJointAddSliderForce(dJointID joint, dReal force) void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z) void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z) void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z) void dJointSetHinge2Param (dJointID, int parameter, dReal value) void dJointAddHinge2Torques(dJointID joint, dReal torque1, dReal torque2) void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z) void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z) void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z) void dJointSetUniversalParam (dJointID, int parameter, dReal value) void dJointAddUniversalTorques(dJointID joint, dReal torque1, dReal torque2) void dJointSetFixed (dJointID) void dJointSetAMotorNumAxes (dJointID, int num) void dJointSetAMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z) void dJointSetAMotorAngle (dJointID, int anum, dReal angle) void dJointSetAMotorParam (dJointID, int parameter, dReal value) void dJointSetAMotorMode (dJointID, int mode) void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3) void dJointSetLMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z) void dJointSetLMotorNumAxes (dJointID, int num) void dJointSetLMotorParam (dJointID, int parameter, dReal value) void dJointGetBallAnchor (dJointID, dVector3 result) void dJointGetBallAnchor2 (dJointID, dVector3 result) void dJointGetHingeAnchor (dJointID, dVector3 result) void dJointGetHingeAnchor2 (dJointID, dVector3 result) void dJointGetHingeAxis (dJointID, dVector3 result) dReal dJointGetHingeParam (dJointID, int parameter) dReal dJointGetHingeAngle (dJointID) dReal dJointGetHingeAngleRate (dJointID) dReal dJointGetSliderPosition (dJointID) dReal dJointGetSliderPositionRate (dJointID) void dJointGetSliderAxis (dJointID, dVector3 result) dReal dJointGetSliderParam (dJointID, int parameter) void dJointGetHinge2Anchor (dJointID, dVector3 result) void dJointGetHinge2Anchor2 (dJointID, dVector3 result) void dJointGetHinge2Axis1 (dJointID, dVector3 result) void dJointGetHinge2Axis2 (dJointID, dVector3 result) dReal dJointGetHinge2Param (dJointID, int parameter) dReal dJointGetHinge2Angle1 (dJointID) dReal dJointGetHinge2Angle1Rate (dJointID) dReal dJointGetHinge2Angle2Rate (dJointID) void dJointGetUniversalAnchor (dJointID, dVector3 result) void dJointGetUniversalAnchor2 (dJointID, dVector3 result) void dJointGetUniversalAxis1 (dJointID, dVector3 result) void dJointGetUniversalAxis2 (dJointID, dVector3 result) dReal dJointGetUniversalParam (dJointID, int parameter) int dJointGetAMotorNumAxes (dJointID) void dJointGetAMotorAxis (dJointID, int anum, dVector3 result) int dJointGetAMotorAxisRel (dJointID, int anum) dReal dJointGetAMotorAngle (dJointID, int anum) dReal dJointGetAMotorAngleRate (dJointID, int anum) dReal dJointGetAMotorParam (dJointID, int parameter) int dJointGetAMotorMode (dJointID) int dJointGetLMotorNumAxes (dJointID) void dJointGetLMotorAxis (dJointID, int anum, dVector3 result) dReal dJointGetLMotorParam (dJointID, int parameter) void dJointSetPlane2DXParam (dJointID, int parameter, dReal value) void dJointSetPlane2DYParam (dJointID, int parameter, dReal value) void dJointSetPlane2DAngleParam (dJointID, int parameter, dReal value) void dJointSetFeedback (dJointID, dJointFeedback *) dJointFeedback *dJointGetFeedback (dJointID) int dAreConnected (dBodyID, dBodyID) # Mass void dMassSetZero (dMass *) void dMassSetParameters (dMass *, dReal themass, dReal cgx, dReal cgy, dReal cgz, dReal I11, dReal I22, dReal I33, dReal I12, dReal I13, dReal I23) void dMassSetSphere (dMass *, dReal density, dReal radius) void dMassSetSphereTotal (dMass *, dReal total_mass, dReal radius) void dMassSetCappedCylinder (dMass *, dReal density, int direction, dReal a, dReal b) void dMassSetCappedCylinderTotal (dMass *, dReal total_mass, int direction, dReal a, dReal b) void dMassSetCylinder (dMass *, dReal density, int direction, dReal radius, dReal length) void dMassSetCylinderTotal (dMass *, dReal total_mass, int direction, dReal radius, dReal length) void dMassSetBox (dMass *, dReal density, dReal lx, dReal ly, dReal lz) void dMassSetBoxTotal (dMass *, dReal total_mass, dReal lx, dReal ly, dReal lz) void dMassAdjust (dMass *, dReal newmass) void dMassTranslate (dMass *, dReal x, dReal y, dReal z) void dMassRotate (dMass *, dMatrix3 R) void dMassAdd (dMass *a, dMass *b) # Space # dSpaceID dSimpleSpaceCreate(int space) # dSpaceID dHashSpaceCreate(int space) dSpaceID dSimpleSpaceCreate(dSpaceID space) dSpaceID dHashSpaceCreate(dSpaceID space) dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, dVector3 Extents, int Depth) void dSpaceDestroy (dSpaceID) void dSpaceAdd (dSpaceID, dGeomID) void dSpaceRemove (dSpaceID, dGeomID) int dSpaceQuery (dSpaceID, dGeomID) void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback) void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data, dNearCallback *callback) void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel) void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel) void dSpaceSetCleanup (dSpaceID space, int mode) int dSpaceGetCleanup (dSpaceID space) int dSpaceGetNumGeoms (dSpaceID) dGeomID dSpaceGetGeom (dSpaceID, int i) # Geom dGeomID dCreateSphere (dSpaceID space, dReal radius) dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz) dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) dGeomID dCreateCapsule (dSpaceID space, dReal radius, dReal length) dGeomID dCreateCylinder (dSpaceID space, dReal radius, dReal length) dGeomID dCreateGeomGroup (dSpaceID space) void dGeomSphereSetRadius (dGeomID sphere, dReal radius) void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz) void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d) void dGeomCapsuleSetParams (dGeomID ccylinder, dReal radius, dReal length) void dGeomCylinderSetParams (dGeomID ccylinder, dReal radius, dReal length) dReal dGeomSphereGetRadius (dGeomID sphere) void dGeomBoxGetLengths (dGeomID box, dVector3 result) void dGeomPlaneGetParams (dGeomID plane, dVector4 result) void dGeomCapsuleGetParams (dGeomID ccylinder, dReal *radius, dReal *length) void dGeomCylinderGetParams (dGeomID ccylinder, dReal *radius, dReal *length) dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z) dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z) dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z) dReal dGeomCapsulePointDepth (dGeomID ccylinder, dReal x, dReal y, dReal z) dGeomID dCreateRay (dSpaceID space, dReal length) void dGeomRaySetLength (dGeomID ray, dReal length) dReal dGeomRayGetLength (dGeomID ray) void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz) void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir) void dGeomSetData (dGeomID, void *) void *dGeomGetData (dGeomID) void dGeomSetBody (dGeomID, dBodyID) dBodyID dGeomGetBody (dGeomID) void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z) void dGeomSetRotation (dGeomID, dMatrix3 R) void dGeomSetQuaternion (dGeomID, dQuaternion) dReal * dGeomGetPosition (dGeomID) dReal * dGeomGetRotation (dGeomID) void dGeomGetQuaternion (dGeomID, dQuaternion result) void dGeomDestroy (dGeomID) void dGeomGetAABB (dGeomID, dReal aabb[6]) dReal *dGeomGetSpaceAABB (dGeomID) int dGeomIsSpace (dGeomID) dSpaceID dGeomGetSpace (dGeomID) int dGeomGetClass (dGeomID) void dGeomSetCategoryBits(dGeomID, unsigned long bits) void dGeomSetCollideBits(dGeomID, unsigned long bits) unsigned long dGeomGetCategoryBits(dGeomID) unsigned long dGeomGetCollideBits(dGeomID) void dGeomEnable (dGeomID) void dGeomDisable (dGeomID) int dGeomIsEnabled (dGeomID) void dGeomGroupAdd (dGeomID group, dGeomID x) void dGeomGroupRemove (dGeomID group, dGeomID x) int dGeomGroupGetNumGeoms (dGeomID group) dGeomID dGeomGroupGetGeom (dGeomID group, int i) dGeomID dCreateGeomTransform (dSpaceID space) void dGeomTransformSetGeom (dGeomID g, dGeomID obj) dGeomID dGeomTransformGetGeom (dGeomID g) void dGeomTransformSetCleanup (dGeomID g, int mode) int dGeomTransformGetCleanup (dGeomID g) void dGeomTransformSetInfo (dGeomID g, int mode) int dGeomTransformGetInfo (dGeomID g) int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, int skip) # Trimesh dTriMeshDataID dGeomTriMeshDataCreate() void dGeomTriMeshDataDestroy(dTriMeshDataID g) void dGeomTriMeshDataBuildSingle1 (dTriMeshDataID g, void* Vertices, int VertexStride, int VertexCount, void* Indices, int IndexCount, int TriStride, void* Normals) void dGeomTriMeshDataBuildSimple(dTriMeshDataID g, dReal* Vertices, int VertexCount, int* Indices, int IndexCount) dGeomID dCreateTriMesh (dSpaceID space, dTriMeshDataID Data, void* Callback, void* ArrayCallback, void* RayCallback) void dGeomTriMeshSetData (dGeomID g, dTriMeshDataID Data) void dGeomTriMeshClearTCCache (dGeomID g) void dGeomTriMeshGetTriangle (dGeomID g, int Index, dVector3 *v0, dVector3 *v1, dVector3 *v2) void dGeomTriMeshGetPoint (dGeomID g, int Index, dReal u, dReal v, dVector3 Out) void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable) int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass) PyODE-1.2.0/src/contact.pyx0000644000175000001440000002307710146207203015014 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### cdef class Contact: """This class represents a contact between two bodies in one point. A Contact object stores all the input parameters for a ContactJoint. This class wraps the ODE dContact structure which has 3 components:: struct dContact { dSurfaceParameters surface; dContactGeom geom; dVector3 fdir1; }; This wrapper class provides methods to get and set the items of those structures. """ cdef dContact _contact def __new__(self): self._contact.surface.mode = ContactBounce self._contact.surface.mu = dInfinity self._contact.surface.bounce = 0.1 # getMode def getMode(self): """getMode() -> flags Return the contact flags. """ return self._contact.surface.mode # setMode def setMode(self, flags): """setMode(flags) Set the contact flags. The argument m is a combination of the ContactXyz flags (ContactMu2, ContactBounce, ...). @param flags: Contact flags @type flags: int """ self._contact.surface.mode = flags # getMu def getMu(self): """getMu() -> float Return the Coulomb friction coefficient. """ return self._contact.surface.mu # setMu def setMu(self, mu): """setMu(mu) Set the Coulomb friction coefficient. @param mu: Coulomb friction coefficient (0..Infinity) @type mu: float """ self._contact.surface.mu = mu # getMu2 def getMu2(self): """getMu2() -> float Return the optional Coulomb friction coefficient for direction 2. """ return self._contact.surface.mu2 # setMu2 def setMu2(self, mu): """setMu2(mu) Set the optional Coulomb friction coefficient for direction 2. @param mu: Coulomb friction coefficient (0..Infinity) @type mu: float """ self._contact.surface.mu2 = mu # getBounce def getBounce(self): """getBounce() -> float Return the restitution parameter. """ return self._contact.surface.bounce # setBounce def setBounce(self, b): """setBounce(b) @param b: Restitution parameter (0..1) @type b: float """ self._contact.surface.bounce = b # getBounceVel def getBounceVel(self): """getBounceVel() -> float Return the minimum incoming velocity necessary for bounce. """ return self._contact.surface.bounce_vel # setBounceVel def setBounceVel(self, bv): """setBounceVel(bv) Set the minimum incoming velocity necessary for bounce. Incoming velocities below this will effectively have a bounce parameter of 0. @param bv: Velocity @type bv: float """ self._contact.surface.bounce_vel = bv # getSoftERP def getSoftERP(self): """getSoftERP() -> float Return the contact normal "softness" parameter. """ return self._contact.surface.soft_erp # setSoftERP def setSoftERP(self, erp): """setSoftERP(erp) Set the contact normal "softness" parameter. @param erp: Softness parameter @type erp: float """ self._contact.surface.soft_erp = erp # getSoftCFM def getSoftCFM(self): """getSoftCFM() -> float Return the contact normal "softness" parameter. """ return self._contact.surface.soft_cfm # setSoftCFM def setSoftCFM(self, cfm): """setSoftCFM(cfm) Set the contact normal "softness" parameter. @param cfm: Softness parameter @type cfm: float """ self._contact.surface.soft_cfm = cfm # getMotion1 def getMotion1(self): """getMotion1() -> float Get the surface velocity in friction direction 1. """ return self._contact.surface.motion1 # setMotion1 def setMotion1(self, m): """setMotion1(m) Set the surface velocity in friction direction 1. @param m: Surface velocity @type m: float """ self._contact.surface.motion1 = m # getMotion2 def getMotion2(self): """getMotion2() -> float Get the surface velocity in friction direction 2. """ return self._contact.surface.motion2 # setMotion2 def setMotion2(self, m): """setMotion2(m) Set the surface velocity in friction direction 2. @param m: Surface velocity @type m: float """ self._contact.surface.motion2 = m # getSlip1 def getSlip1(self): """getSlip1() -> float Get the coefficient of force-dependent-slip (FDS) for friction direction 1. """ return self._contact.surface.slip1 # setSlip1 def setSlip1(self, s): """setSlip1(s) Set the coefficient of force-dependent-slip (FDS) for friction direction 1. @param s: FDS coefficient @type s: float """ self._contact.surface.slip1 = s # getSlip2 def getSlip2(self): """getSlip2() -> float Get the coefficient of force-dependent-slip (FDS) for friction direction 2. """ return self._contact.surface.slip2 # setSlip2 def setSlip2(self, s): """setSlip2(s) Set the coefficient of force-dependent-slip (FDS) for friction direction 1. @param s: FDS coefficient @type s: float """ self._contact.surface.slip2 = s # getFDir1 def getFDir1(self): """getFDir1() -> (x, y, z) Get the "first friction direction" vector that defines a direction along which frictional force is applied. """ return (self._contact.fdir1[0], self._contact.fdir1[1], self._contact.fdir1[2]) # setFDir1 def setFDir1(self, fdir): """setFDir1(fdir) Set the "first friction direction" vector that defines a direction along which frictional force is applied. It must be of unit length and perpendicular to the contact normal (so it is typically tangential to the contact surface). @param fdir: Friction direction @type fdir: 3-sequence of floats """ self._contact.fdir1[0] = fdir[0] self._contact.fdir1[1] = fdir[1] self._contact.fdir1[2] = fdir[2] # getContactGeomParams def getContactGeomParams(self): """getContactGeomParams() -> (pos, normal, depth, geom1, geom2) Get the ContactGeom structure of the contact. The return value is a tuple (pos, normal, depth, geom1, geom2) where pos and normal are 3-tuples of floats and depth is a single float. geom1 and geom2 are the Geom objects of the geoms in contact. """ cdef long id1, id2 pos = (self._contact.geom.pos[0], self._contact.geom.pos[1], self._contact.geom.pos[2]) normal = (self._contact.geom.normal[0], self._contact.geom.normal[1], self._contact.geom.normal[2]) depth = self._contact.geom.depth id1 = self._contact.geom.g1 id2 = self._contact.geom.g2 g1 = _geom_c2py_lut[id1] g2 = _geom_c2py_lut[id2] return (pos,normal,depth,g1,g2) # setContactGeomParams def setContactGeomParams(self, pos, normal, depth, g1=None, g2=None): """setContactGeomParams(pos, normal, depth, geom1=None, geom2=None) Set the ContactGeom structure of the contact. @param pos: Contact position, in global coordinates @type pos: 3-sequence of floats @param normal: Unit length normal vector @type normal: 3-sequence of floats @param depth: Depth to which the two bodies inter-penetrate @type depth: float @param geom1: Geometry object 1 that collided @type geom1: Geom @param geom2: Geometry object 2 that collided @type geom2: Geom """ cdef long id self._contact.geom.pos[0] = pos[0] self._contact.geom.pos[1] = pos[1] self._contact.geom.pos[2] = pos[2] self._contact.geom.normal[0] = normal[0] self._contact.geom.normal[1] = normal[1] self._contact.geom.normal[2] = normal[2] self._contact.geom.depth = depth if g1!=None: id = g1._id() self._contact.geom.g1 = id else: self._contact.geom.g1 = 0 if g2!=None: id = g2._id() self._contact.geom.g2 = id else: self._contact.geom.g2 = 0 PyODE-1.2.0/src/geomobject.pyx0000644000175000001440000002144510363131752015502 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # Each geom object has to insert itself into the global dictionary # _geom_c2py_lut (key:address - value:Python object). # This lookup table is used in the near callback to translate the C # pointers into corresponding Python wrapper objects. # # Additionally, each geom object must have a method _id() that returns # the ODE geom id. This is used during collision detection. # # ########################## # # Obsolete: # # # # Each geom object has to register itself at its space as the # # space keeps a dictionary that's used as lookup table to translate # # C pointers into Python objects (this is used in the near callback). # Geom base class cdef class GeomObject: """This is the abstract base class for all geom objects. """ # The id of the geom object as returned by dCreateXxxx() cdef dGeomID gid # The space in which the geom was placed (or None). This reference # is kept so that the space won't be destroyed while there are still # geoms around that might use it. cdef object space # The body that the geom was attached to (or None). cdef object body # A dictionary with user defined attributes cdef object attribs def __new__(self, *a, **kw): self.gid = NULL self.space = None self.body = None self.attribs = {} def __init__(self, *a, **kw): raise NotImplementedError, "The GeomObject base class can't be used directly." def __dealloc__(self): if self.gid!=NULL: dGeomDestroy(self.gid) self.gid = NULL def __getattr__(self, name): if name in self.attribs: return self.attribs[name] else: raise AttributeError, "geom has no attribute '%s'."%name def __setattr__(self, name, val): self.attribs[name]=val def _id(self): """_id() -> int Return the internal id of the geom (dGeomID) as returned by the dCreateXyz() functions. This method has to be overwritten in derived methods. """ raise NotImplementedError, "Bug: The _id() method is not implemented." def placeable(self): """placeable() -> bool Returns True if the geom object is a placeable geom. This method has to be overwritten in derived methods. """ return False def setBody(self, Body body): """setBody(body) Set the body associated with a placeable geom. @param body: The Body object or None. @type body: Body """ if not self.placeable(): raise ValueError, "Non-placeable geoms cannot have a body associated to them." if body==None: dGeomSetBody(self.gid, NULL) else: dGeomSetBody(self.gid, body.bid) self.body = body def getBody(self): """getBody() -> Body Get the body associated with this geom. """ if not self.placeable(): return environment return self.body def setPosition(self, pos): """setPosition(pos) Set the position of the geom. If the geom is attached to a body, the body's position will also be changed. @param pos: Position @type pos: 3-sequence of floats """ if not self.placeable(): raise ValueError, "Cannot set a position on non-placeable geoms." dGeomSetPosition(self.gid, pos[0], pos[1], pos[2]) def getPosition(self): """getPosition() -> 3-tuple Get the current position of the geom. If the geom is attached to a body the returned value is the body's position. """ if not self.placeable(): raise ValueError, "Non-placeable geoms do not have a position." cdef dReal* p p = dGeomGetPosition(self.gid) return (p[0],p[1],p[2]) def setRotation(self, R): """setRotation(R) Set the orientation of the geom. If the geom is attached to a body, the body's orientation will also be changed. @param R: Rotation matrix @type R: 9-sequence of floats """ if not self.placeable(): raise ValueError, "Cannot set a rotation on non-placeable geoms." cdef dMatrix3 m m[0] = R[0] m[1] = R[1] m[2] = R[2] m[3] = 0 m[4] = R[3] m[5] = R[4] m[6] = R[5] m[7] = 0 m[8] = R[6] m[9] = R[7] m[10] = R[8] m[11] = 0 dGeomSetRotation(self.gid, m) def getRotation(self): """getRotation() -> 9-tuple Get the current orientation of the geom. If the geom is attached to a body the returned value is the body's orientation. """ if not self.placeable(): raise ValueError, "Non-placeable geoms do not have a rotation." cdef dReal* m m = dGeomGetRotation(self.gid) return [m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]] def getQuaternion(self): """getQuaternion() -> (w,x,y,z) Get the current orientation of the geom. If the geom is attached to a body the returned value is the body's orientation. """ if not self.placeable(): raise ValueError, "Non-placeable geoms do not have an orientation." cdef dQuaternion q dGeomGetQuaternion(self.gid, q) return (q[0],q[1],q[2],q[3]) def setQuaternion(self, q): """setQuaternion(q) Set the orientation of the geom. If the geom is attached to a body, the body's orientation will also be changed. @param q: Quaternion (w,x,y,z) @type q: 4-sequence of floats """ if not self.placeable(): raise ValueError, "Cannot set a quaternion on non-placeable geoms." cdef dQuaternion cq cq[0] = q[0] cq[1] = q[1] cq[2] = q[2] cq[3] = q[3] dGeomSetQuaternion(self.gid, cq) def getAABB(self): """getAABB() -> 6-tuple Return an axis aligned bounding box that surrounds the geom. The return value is a 6-tuple (minx, maxx, miny, maxy, minz, maxz). """ cdef dReal aabb[6] dGeomGetAABB(self.gid, aabb) return (aabb[0], aabb[1], aabb[2], aabb[3], aabb[4], aabb[5]) def isSpace(self): """isSpace() -> bool Return 1 if the given geom is a space, or 0 if not.""" return dGeomIsSpace(self.gid) def getSpace(self): """getSpace() -> Space Return the space that the given geometry is contained in, or return None if it is not contained in any space.""" return self.space def setCollideBits(self, bits): """setCollideBits(bits) Set the "collide" bitfields for this geom. @param bits: Collide bit field @type bits: int/long """ dGeomSetCollideBits(self.gid, long(bits)) def setCategoryBits(self, bits): """setCategoryBits(bits) Set the "category" bitfields for this geom. @param bits: Category bit field @type bits: int/long """ dGeomSetCategoryBits(self.gid, long(bits)) def getCollideBits(self): """getCollideBits() -> long Return the "collide" bitfields for this geom. """ return dGeomGetCollideBits(self.gid) def getCategoryBits(self): """getCategoryBits() -> long Return the "category" bitfields for this geom. """ return dGeomGetCategoryBits(self.gid) def enable(self): """enable() Enable the geom.""" dGeomEnable(self.gid) def disable(self): """disable() Disable the geom.""" dGeomDisable(self.gid) def isEnabled(self): """isEnabled() -> bool Return True if the geom is enabled.""" return dGeomIsEnabled(self.gid) PyODE-1.2.0/xode/0000755000175000001440000000000010561403670012765 5ustar zefirisusersPyODE-1.2.0/xode/parser.py0000644000175000001440000002406510146316005014634 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Importer for PyODE Introduction ============ This module is part of the implementation of an U{XODE} importer. It is part of the PyODE package. The parser uses the C{xml.parsers.expat} module. The parser creates a tree from an XODE document which the programmer can query or transverse. Many of the tree nodes correspond to ODE objects but some are present merely for organisation (such as the Group node). Currently, the following features of XODE are not supported: - Quaternion and axis-angle rotation modes - Groups - Joints other than BallJoint - Extension support Usage ===== Here's an example showing how to parse a document and transverse the resultant tree:: | from xode import parser | import ode | | f = file('xode-document.xml') | p = parser.Parser(f) | root = p.parseFile(f) | | # Retrieve named objects | body1 = root.childNamed('body1').getODEObject() | joint1 = root.childNamed('joint1').getODEObject() | | # Transverse the tree printing object names | def transverse(node): | print node.getName() | for c in node.getChildren(): | transverse(c) | transverse(root) @see: L{node.TreeNode} @author: U{Timothy Stranex} """ import ode import xml.parsers.expat import errors, transform, node, body, joint, geom class Parser: """ An XODE parser. Parameters ========== Certain aspects of the parsing can be controlled by setting parameters with L{setParams()}. C{spaceFactory} --------------- C{spaceFactory} can be set to a callable object that creates instances which inherit from L{ode.SpaceBase}. This factory will be used by the parser to create Space objects for tags unless the class is overridden in the XODE file. The default behavior is to use the L{ode.SimpleSpace} class. Example using L{ode.HashSpace}:: | from xode import parser | import ode | | p = parser.Parser() | p.setParams(spaceFactory=ode.HashSpace) Example using L{ode.QuadTreeSpace}:: | from xode import parser | import ode | | def makeSpace(): | return ode.QuadTreeSpace((0, 0, 0), (2, 2, 2), 3) | | p = parser.Parser() | p.setParams(spaceFactory=makeSpace) """ def __init__(self): """ Initialise the parser. """ self._params = {} self.setParams(spaceFactory=ode.SimpleSpace) def _nullHandler(self, *args, **kwargs): return def push(self, startElement=None, endElement=None): self._handlers.append({'startElement': self._expat.StartElementHandler, 'endElement': self._expat.EndElementHandler}) self._expat.StartElementHandler = startElement or self._nullHandler self._expat.EndElementHandler = endElement or self._nullHandler def pop(self): top = self._handlers.pop() self._expat.StartElementHandler = top['startElement'] self._expat.EndElementHandler = top['endElement'] def _create(self): """ Creates an expat parser. """ self._handlers = [] self._expat = xml.parsers.expat.ParserCreate() self._expat.StartElementHandler = self._nullHandler self._expat.EndElementHandler = self._nullHandler self.push(self._startElement) return self._expat def _startElement(self, name, attrs): if (name == 'xode'): self._root = Root(None, None) self._root.takeParser(self) else: raise errors.InvalidError('Root element must be .') def parseVector(self, attrs): """ Parses an element's attributes as a vector. @return: The vector (x, y, z). @rtype: tuple @raise errors.InvalidError: If the attributes don't correspond to a valid vector. """ try: vec = float(attrs['x']), float(attrs['y']), float(attrs['z']) except ValueError: raise errors.InvalidError('Vector attributes must be numbers.') except KeyError: raise errors.InvalidError('Vector must have x, y and z attributes.') else: return vec def parseString(self, xml): """ Parses the given string. @param xml: The string to parse. @type xml: str @return: The root container. @rtype: instance of L{node.TreeNode} @raise errors.InvalidError: If document is invalid. """ self._create().Parse(xml, 1) return self._root def parseFile(self, fp): """ Parses the given file. @param fp: A file-like object. @type fp: file-like instance @return: The root container. @rtype: instance of L{node.TreeNode} @raise errors.InvalidError: If document is invalid. """ self._create().ParseFile(fp) return self._root def setParams(self, **params): """ Sets some parse parameters. """ self._params.update(params) def getParam(self, name): """ @param name: The parameter name. @type name: str @return: The value of the given parameter. @raise KeyError: If the parameter is not defined. """ return self._params[name] class Root(node.TreeNode): """ The root of the object structure. It corresponds to the tag. """ def takeParser(self, parser): """ Handles further parsing. It should be called immediately after the tag is encountered. @param parser: The parser. @type parser: instance of L{Parser} """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'world'): world = World(nodeName, self) world.takeParser(self._parser) elif (name == 'ext'): pass else: raise errors.ChildError('xode', name) def _endElement(self, name): if (name == 'xode'): self._parser.pop() class World(node.TreeNode): """ Represents an ode.World object. It corresponds to the tag. """ def __init__(self, name, parent): node.TreeNode.__init__(self, name, parent) self.setODEObject(ode.World()) def takeParser(self, parser): """ Handles further parsing. It should be called immediately after the tag is encountered. @param parser: The parser. @type parser: instance of L{Parser} """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'transform'): t = transform.Transform() t.takeParser(self._parser, self, attrs) elif (name == 'space'): space = Space(nodeName, self) space.takeParser(self._parser) elif (name == 'ext'): pass else: raise errors.ChildError('world', name) def _endElement(self, name): if (name == 'world'): self._parser.pop() class Space(node.TreeNode): """ Represents an ode.Space object and corresponds to the tag. """ def __init__(self, name, parent): node.TreeNode.__init__(self, name, parent) def takeParser(self, parser): """ Handles further parsing. It should be called immediately after the tag is encountered. @param parser: The parser. @type parser: instance of L{Parser} """ self.setODEObject(parser.getParam('spaceFactory')()) self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'transform'): t = transform.Transform() t.takeParser(self._parser, self, attrs) elif (name == 'geom'): g = geom.Geom(nodeName, self) g.takeParser(self._parser) elif (name == 'group'): # parse group pass elif (name == 'body'): b = body.Body(nodeName, self, attrs) b.takeParser(self._parser) elif (name == 'jointgroup'): # parse joint group pass elif (name == 'joint'): j = joint.Joint(nodeName, self) j.takeParser(self._parser) elif (name == 'ext'): # parse ext pass else: raise errors.ChildError('space', name) def _endElement(self, name): if (name == 'space'): self._parser.pop() PyODE-1.2.0/xode/geom.py0000644000175000001440000002010510146316005014256 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Geom Parser @author: U{Timothy Stranex} """ import ode import errors, node, joint, body, transform class Geom(node.TreeNode): """ Represents an C{ode.Geom} object and corresponds to the tag. """ def __init__(self, name, parent): node.TreeNode.__init__(self, name, parent) self._space = self.getFirstAncestor(ode.SpaceBase).getODEObject() self._transformed = False try: self._body = self.getFirstAncestor(ode.Body) except node.AncestorNotFoundError: self._body = None def takeParser(self, parser): """ Handle further parsing. It should be called immediately after the tag has been encountered. """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'transform'): t = transform.Transform() t.takeParser(self._parser, self, attrs) self._transformed = True elif (name == 'box'): self._parseGeomBox(attrs) elif (name == 'cappedCylinder'): self._parseGeomCCylinder(attrs) elif (name == 'cone'): raise NotImplementedError() elif (name == 'cylinder'): raise NotImplementedError() elif (name == 'plane'): self._parseGeomPlane(attrs) elif (name == 'ray'): self._parseGeomRay(attrs) elif (name == 'sphere'): self._parseGeomSphere(attrs) elif (name == 'trimesh'): self._parseTriMesh(attrs) elif (name == 'geom'): g = Geom(nodeName, self) g.takeParser(self._parser) elif (name == 'body'): b = body.Body(nodeName, self, attrs) b.takeParser(self._parser) elif (name == 'joint'): j = joint.Joint(nodename, self) j.takeParser(self._parser) elif (name == 'jointgroup'): pass elif (name == 'ext'): pass else: raise errors.ChildError('geom', name) def _endElement(self, name): if (name == 'geom'): obj = self.getODEObject() if (obj is None): raise errors.InvalidError('No geom type element found.') self._parser.pop() def _setObject(self, kclass, **kwargs): """ Create the Geom object and apply transforms. Only call for placeable Geoms. """ if (self._body is None): # The Geom is independant so it can have its own transform kwargs['space'] = self._space obj = kclass(**kwargs) t = self.getTransform() obj.setPosition(t.getPosition()) obj.setRotation(t.getRotation()) self.setODEObject(obj) elif (self._transformed): # The Geom is attached to a body so to transform it, it must # by placed in a GeomTransform and its transform is relative # to the body. kwargs['space'] = None obj = kclass(**kwargs) t = self.getTransform(self._body) obj.setPosition(t.getPosition()) obj.setRotation(t.getRotation()) trans = ode.GeomTransform(self._space) trans.setGeom(obj) trans.setBody(self._body.getODEObject()) self.setODEObject(trans) else: kwargs['space'] = self._space obj = kclass(**kwargs) obj.setBody(self._body.getODEObject()) self.setODEObject(obj) def _parseGeomBox(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('box', name) def end(name): if (name == 'box'): self._parser.pop() lx = float(attrs['sizex']) ly = float(attrs['sizey']) lz = float(attrs['sizez']) self._setObject(ode.GeomBox, lengths=(lx, ly, lz)) self._parser.push(startElement=start, endElement=end) def _parseGeomCCylinder(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('cappedCylinder', name) def end(name): if (name == 'cappedCylinder'): self._parser.pop() radius = float(attrs['radius']) length = float(attrs['length']) self._setObject(ode.GeomCCylinder, radius=radius, length=length) self._parser.push(startElement=start, endElement=end) def _parseGeomSphere(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('sphere', name) def end(name): if (name == 'sphere'): self._parser.pop() radius = float(attrs['radius']) self._setObject(ode.GeomSphere, radius=radius) self._parser.push(startElement=start, endElement=end) def _parseGeomPlane(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('plane', name) def end(name): if (name == 'plane'): self._parser.pop() a = float(attrs['a']) b = float(attrs['b']) c = float(attrs['c']) d = float(attrs['d']) self.setODEObject(ode.GeomPlane(self._space, (a, b, c), d)) self._parser.push(startElement=start, endElement=end) def _parseGeomRay(self, attrs): def start(name, attrs): if (name == 'ext'): pass else: raise errors.ChildError('ray', name) def end(name): if (name == 'ray'): self._parser.pop() length = float(attrs['length']) self.setODEObject(ode.GeomRay(self._space, length)) self._parser.push(startElement=start, endElement=end) def _parseTriMesh(self, attrs): vertices = [] triangles = [] def start(name, attrs): if (name == 'vertices'): pass elif (name == 'triangles'): pass elif (name == 'v'): vertices.append(self._parser.parseVector(attrs)) elif (name == 't'): tri = int(attrs['ia'])-1, int(attrs['ib'])-1, int(attrs['ic'])-1 triangles.append(tri) else: raise errors.ChildError('trimesh', name) def end(name): if (name == 'trimesh'): data = ode.TriMeshData() data.build(vertices, triangles) self._setObject(ode.GeomTriMesh, data=data) self._parser.pop() self._parser.push(startElement=start, endElement=end) PyODE-1.2.0/xode/joint.py0000644000175000001440000003022210146316005014453 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Joint Parser @author: U{Timothy Stranex} """ import ode import node, errors class Joint(node.TreeNode): """ Represents an ode.Joint-based object and corresponds to the tag. """ def __init__(self, name, parent): node.TreeNode.__init__(self, name, parent) self._world = self.getFirstAncestor(ode.World).getODEObject() try: self._jg = self.getFirstAncestor(ode.JointGroup).getODEObject() except node.AncestorNotFoundError: self._jg = None try: self._body = self.getFirstAncestor(ode.Body).getODEObject() except node.AncestorNotFoundError: self._body = None self._link1 = None self._link2 = None self.setODEObject(None) def _getName(self, name): root = self.getRoot() try: link = root.namedChild(name).getODEObject() except KeyError: raise errors.InvalidError('Joint link must reference an already '\ 'parsed body.') if (not isinstance(link, ode.Body)): raise errors.InvalidError('Joint link must reference a body.') return link def _getLinks(self): body = self._body or ode.environment if (self._link1 is not None): link1 = self._getName(self._link1) else: link1 = body body = ode.environment if (self._link2 is not None): link2 = self._getName(self._link2) else: link2 = body if (link1 is link2): raise errors.InvalidError('Joint requires two objects.') return link1, link2 def takeParser(self, parser): """ Handles further parsing. It should be called immediately after the tag is encountered. """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): if (name == 'link1'): self._link1 = attrs['body'] elif (name == 'link2'): self._link2 = attrs['body'] elif (name == 'ext'): pass elif (name == 'amotor'): l1, l2 = self._getLinks() self._parseAMotor(self._world, l1, l2) elif (name == 'ball'): l1, l2 = self._getLinks() self._parseBallJoint(self._world, l1, l2) elif (name == 'fixed'): l1, l2 = self._getLinks() self._parseFixedJoint(self._world, l1, l2) elif (name == 'hinge'): l1, l2 = self._getLinks() self._parseHingeJoint(self._world, l1, l2) elif (name == 'hinge2'): l1, l2 = self._getLinks() self._parseHinge2Joint(self._world, l1, l2) elif (name == 'slider'): l1, l2 = self._getLinks() self._parseSliderJoint(self._world, l1, l2) elif (name == 'universal'): l1, l2 = self._getLinks() self._parseUniversalJoint(self._world, l1, l2) else: raise errors.ChildError('joint', name) def _endElement(self, name): if (name == 'joint'): if (self.getODEObject() is None): raise errors.InvalidError('No joint type element found.') self._parser.pop() def _applyAxisParams(self, joint, anum, axis): def setParam(name): attr = 'Param%s' % name if (anum != 0): attr = '%s%i' % (attr, anum+1) joint.setParam(getattr(ode, attr), float(axis[name])) if (axis.has_key('LowStop')): axis['LoStop'] = axis['LowStop'] del axis['LowStop'] for name in axis.keys(): if (name not in ['x', 'y', 'z']): if (name in ['LoStop', 'HiStop', 'Vel', 'FMax', 'FudgeFactor', 'Bounce', 'CFM', 'StopERP', 'StopCFM', 'SuspensionERP', 'SuspensionCFM']): setParam(name) else: raise errors.InvalidError('Invalid attribute %s' % `name` + ' of element.') def _parseBallJoint(self, world, link1, link2): anchor = [None] def start(name, attrs): if (name == 'anchor'): anchor[0] = self._parser.parseVector(attrs) else: raise errors.ChildError('ball', name) def end(name): if (name == 'ball'): joint = ode.BallJoint(world, self._jg) joint.attach(link1, link2) if (anchor[0] is not None): joint.setAnchor(anchor[0]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) def _parseFixedJoint(self, world, link1, link2): def start(name, attrs): raise errors.ChildError('fixed', name) def end(name): if (name == 'fixed'): self._parser.pop() joint = ode.FixedJoint(world, self._jg) joint.attach(link1, link2) self.setODEObject(joint) self._parser.push(startElement=start, endElement=end) def _parseHingeJoint(self, world, link1, link2): anchor = [None] axes = [] def start(name, attrs): if (name == 'anchor'): anchor[0] = self._parser.parseVector(attrs) elif (name == 'axis'): axes.append(attrs) else: raise errors.ChildError('hinge', name) def end(name): if (name == 'hinge'): joint = ode.HingeJoint(world, self._jg) joint.attach(link1, link2) if (anchor[0] is not None): joint.setAnchor(anchor[0]) if (len(axes) != 1): raise errors.InvalidError('Wrong number of axes for hinge' ' joint.') joint.setAxis(self._parser.parseVector(axes[0])) self._applyAxisParams(joint, 0, axes[0]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) def _parseSliderJoint(self, world, link1, link2): axes = [] def start(name, attrs): if (name == 'axis'): axes.append(attrs) else: raise errors.ChildError('slider', name) def end(name): if (name == 'slider'): joint = ode.SliderJoint(world, self._jg) joint.attach(link1, link2) if (len(axes) != 1): raise errors.InvalidError('Wrong number of axes for slider' ' joint.') joint.setAxis(self._parser.parseVector(axes[0])) self._applyAxisParams(joint, 0, axes[0]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) def _parseUniversalJoint(self, world, link1, link2): anchor = [None] axes = [] def start(name, attrs): if (name == 'anchor'): anchor[0] = self._parser.parseVector(attrs) elif (name == 'axis'): axes.append(attrs) else: raise errors.ChildError('universal', name) def end(name): if (name == 'universal'): joint = ode.UniversalJoint(world, self._jg) joint.attach(link1, link2) if (anchor[0] is not None): joint.setAnchor(anchor[0]) if (len(axes) != 2): raise errors.InvalidError('Wrong number of axes for ' ' universal joint.') joint.setAxis1(self._parser.parseVector(axes[0])) self._applyAxisParams(joint, 0, axes[0]) joint.setAxis2(self._parser.parseVector(axes[1])) self._applyAxisParams(joint, 1, axes[1]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) def _parseHinge2Joint(self, world, link1, link2): anchor = [None] axes = [] def start(name, attrs): if (name == 'anchor'): anchor[0] = self._parser.parseVector(attrs) elif (name == 'axis'): axes.append(attrs) else: raise errors.ChildError('hinge2', name) def end(name): if (name == 'hinge2'): joint = ode.Hinge2Joint(world, self._jg) joint.attach(link1, link2) if (anchor[0] is not None): joint.setAnchor(anchor[0]) if (len(axes) != 2): raise errors.InvalidError('Wrong number of axes for ' ' hinge2 joint.') joint.setAxis1(self._parser.parseVector(axes[0])) self._applyAxisParams(joint, 0, axes[0]) joint.setAxis2(self._parser.parseVector(axes[1])) self._applyAxisParams(joint, 1, axes[1]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) def _parseAMotor(self, world, link1, link2): anchor = [None] axes = [] def start(name, attrs): # The XODE specification allows anchor elements for AMotor but # there is no way to set the anchor of an AMotor. #if (name == 'anchor'): # anchor[0] = self._parser.parseVector(attrs) if (name == 'axis'): axes.append(attrs) else: raise errors.ChildError('amotor', name) def end(name): if (name == 'amotor'): joint = ode.AMotor(world, self._jg) joint.attach(link1, link2) if (anchor[0] is not None): joint.setAnchor(anchor[0]) if (len(axes) > 3): raise errors.InvalidError('Wrong number of axes for ' ' amotor joint.') joint.setNumAxes(len(axes)) for i in range(len(axes)): joint.setAxis(i, 0, self._parser.parseVector(axes[i])) self._applyAxisParams(joint, i, axes[i]) self.setODEObject(joint) self._parser.pop() self._parser.push(startElement=start, endElement=end) PyODE-1.2.0/xode/node.py0000644000175000001440000001601210146316005014256 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Parse Tree @author: U{Timothy Stranex} """ import transform class AncestorNotFoundError(Exception): """ Raised when an ancestor represeting an ODE object of some type was not found in the tree. @ivar type: The object type. @type type: class """ def __init__(self, type): self.type = type def __str__(self): return "" % repr(self.type.__name__) class TreeNode: """ A node in an XODE parse tree. """ def __init__(self, name, parent): """ Initialises this node. If the parent is not C{None}, parent.addChild() is called. @param name: The name of this container or C{None} if there is none. @type name: str @param parent: The parent of this node or C{None}. @type parent: instance or C{None} """ self._name = name self._parent = parent self._obj = None self._transform = transform.Transform() self._childs = [] self._namedChild = {} if (self._parent is not None): self._parent.addChild(self, name) def takeParser(self, parser): """ Called to make this node handle further parsing. It will release the parser when it has finished. @param parser: The parser. @type parser: instance of L{parser.Parser} """ def setODEObject(self, obj): """ Sets the ODE object represented by this node. @param obj: The ODE object. @type obj: instance """ self._obj = obj def getODEObject(self): """ @return: The ODE object represented by this node. C{None} is returned if this node does not represent an ODE object. @rtype: instance """ return self._obj def setNodeTransform(self, transform): """ @param transform: This node's transform. @type transform: instance of L{transform.Transform} """ self._transform = transform def getNodeTransform(self): """ @return: The transform of this node. @rtype: instance of L{transform.Transform} """ return self._transform def getTransform(self, untilAncestor=None): """ Calculates the absolute transform at this node. It calculates the transforms recursively from the root node. If C{untilAncestor} is passed, the transform is calculated relative to it. If C{untilAncestor} is passed but is not an ancestor of this node, the transform is calculated from the root node as if C{None} was passed. @param untilAncestor: The ancestor to calculate the transform from. @type untilAncestor: instance of L{TreeNode} @return: The absolute transform at this node. @rtype: instance of L{transform.Transform} """ p = self.getParent() t = self.getNodeTransform() if ((p is None) or (t.isAbsolute()) or (p is untilAncestor)): return t else: return p.getTransform(untilAncestor) * t def getName(self): """ @return: This node's name. If it is not named, C{None} is returned. @rtype: str or C{None} """ return self._name def getChildren(self): """ @return: The list of child nodes. @rtype: list """ return self._childs def namedChild(self, name): """ Retrieves a named child node. If no child by that name is a direct child of this node, all the child nodes are searched recursively until either the named child is found or every node has been searched. @param name: The name of the object. @type name: str @return: The node. @rtype: instance of L{TreeNode} @raise KeyError: If no node with the given name was found. """ if (self._namedChild.has_key(name)): return self._namedChild[name] else: for child in self._childs: if (isinstance(child, TreeNode)): try: obj = child.namedChild(name) except KeyError: pass else: return obj raise KeyError("Could not find child named '%s'." % name) def addChild(self, child, name): """ Adds a child node. @param child: The child node. @type child: instance of L{TreeNode} @param name: The child's name. If the child is not named, pass C{None}. @type name: str or C{None} """ if (name is not None): self._namedChild[name] = child self._childs.append(child) def getParent(self): """ @return: The parent of this node. C{None} is returned if there is no parent node. @rtype: instance of L{TreeNode} or C{None} """ return self._parent def getFirstAncestor(self, type): """ Find the first ancestor of this node that represents an ODE object of the specified type. @param type: The ODE type. @type type: class @return: The ancestor node. @rtype: instance of L{TreeNode} @raise AncestorNotFoundError: If no ancestor matching the criteria was found. """ parent = self.getParent() if (parent is not None): if (isinstance(parent.getODEObject(), type)): return parent else: return parent.getFirstAncestor(type) else: raise AncestorNotFoundError(type) def getRoot(self): """ Finds the root node of this parse tree. @return: The root node. @rtype: instance of L{TreeNode} """ if (self.getParent() is None): return self else: return self.getParent().getRoot() PyODE-1.2.0/xode/__init__.py0000644000175000001440000000211510146316005015067 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ @author: U{Timothy Stranex} """ PyODE-1.2.0/xode/body.py0000644000175000001440000001646710533277300014310 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Body and Mass Parser @author: U{Timothy Stranex} """ import ode import errors, node, joint, transform, geom class Body(node.TreeNode): """ Represents an ode.Body object and corresponds to the tag. """ def __init__(self, name, parent, attrs): node.TreeNode.__init__(self, name, parent) world = parent.getFirstAncestor(ode.World) self.setODEObject(ode.Body(world.getODEObject())) enabled = attrs.get('enabled', 'true') if (enabled not in ['true', 'false']): raise errors.InvalidError("Enabled attribute must be either 'true'"\ " or 'false'.") else: if (enabled == 'false'): self.getODEObject().disable() gravitymode = int(attrs.get('gravitymode', 1)) if (gravitymode == 0): self.getODEObject().setGravityMode(0) self._mass = None self._transformed = False def takeParser(self, parser): """ Handle further parsing. It should be called immediately after the tag has been encountered. """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _applyTransform(self): if (self._transformed): return t = self.getTransform() body = self.getODEObject() body.setPosition(t.getPosition()) body.setRotation(t.getRotation()) self._transformed = True def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'transform'): t = transform.Transform() t.takeParser(self._parser, self, attrs) else: self._applyTransform() if (name == 'torque'): self.getODEObject().setTorque(self._parser.parseVector(attrs)) elif (name == 'force'): self.getODEObject().setForce(self._parser.parseVector(attrs)) elif (name == 'finiteRotation'): mode = int(attrs['mode']) try: axis = (float(attrs['xaxis']), float(attrs['yaxis']), float(attrs['zaxis'])) except KeyError: raise errors.InvalidError('finiteRotation element must have' \ ' xaxis, yaxis and zaxis attributes') if (mode not in [0, 1]): raise errors.InvalidError('finiteRotation mode attribute must' \ ' be either 0 or 1.') self.getODEObject().setFiniteRotationMode(mode) self.getODEObject().setFiniteRotationAxis(axis) elif (name == 'linearVel'): self.getODEObject().setLinearVel(self._parser.parseVector(attrs)) elif (name == 'angularVel'): self.getODEObject().setAngularVel(self._parser.parseVector(attrs)) elif (name == 'mass'): self._mass = Mass(nodeName, self) self._mass.takeParser(self._parser) elif (name == 'joint'): j = joint.Joint(nodeName, self) j.takeParser(self._parser) elif (name == 'body'): b = Body(nodeName, self, attrs) b.takeParser(self._parser) elif (name == 'geom'): g = geom.Geom(nodeName, self) g.takeParser(self._parser) elif (name == 'transform'): # so it doesn't raise ChildError pass else: raise errors.ChildError('body', name) def _endElement(self, name): if (name == 'body'): self._parser.pop() self._applyTransform() if (self._mass is not None): self.getODEObject().setMass(self._mass.getODEObject()) class Mass(node.TreeNode): """ Represents an ode.Mass object and corresponds to the tag. """ def __init__(self, name, parent): node.TreeNode.__init__(self, name, parent) mass = ode.Mass() mass.setSphere(1.0, 1.0) self.setODEObject(mass) body = self.getFirstAncestor(ode.Body) body.getODEObject().setMass(mass) def takeParser(self, parser): """ Handle further parsing. It should be called immediately after the tag is encountered. """ self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): nodeName = attrs.get('name', None) if (name == 'mass_struct'): pass elif (name == 'mass_shape'): self._parseMassShape(attrs) elif (name == 'transform'): # parse transform pass elif (name == 'adjust'): total = float(attrs['total']) self.getODEObject().adjust(total) elif (name == 'mass'): mass = Mass(nodeName, self) mass.takeParser(self._parser) else: raise errors.ChildError('mass', name) def _endElement(self, name): if (name == 'mass'): try: mass = self.getFirstAncestor(ode.Mass) except node.AncestorNotFoundError: pass else: mass.getODEObject().add(self.getODEObject()) self._parser.pop() def _parseMassShape(self, attrs): density = attrs.get('density', None) mass = self.getODEObject() def start(name, attrs): if (name == 'sphere'): radius = float(attrs.get('radius', 1.0)) if (density is not None): mass.setSphere(float(density), radius) elif (name == 'box'): lx = float(attrs['sizex']) ly = float(attrs['sizey']) lz = float(attrs['sizez']) if (density is not None): mass.setBox(float(density), lx, ly, lz) else: # FIXME: Implement remaining mass shapes. raise NotImplementedError() def end(name): if (name == 'mass_shape'): self._parser.pop() self._parser.push(startElement=start, endElement=end) PyODE-1.2.0/xode/transform.py0000644000175000001440000001605610146316005015354 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Transform @author: U{Timothy Stranex} """ import math class Transform: """ A matrix transform. """ def __init__(self): """ Initialise as an identity transform. """ self.m = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] self.setIdentity() self._absolute = False def takeParser(self, parser, node, attrs): """ Called to make this object handle further parsing. It should be called immediately after the tag has been encountered. @param parser: The parser. @type parser: instance of L{parser.Parser} @param node: The node that is to be transformed. @type node: instance of L{node.TreeNode} @param attrs: The tag attributes. @type attrs: dict """ self._scale = float(attrs.get('scale', 1.0)) self._absolute = (attrs.get('absolute', 'false') == 'true') self._position = None self._euler = None self._node = node self._parser = parser self._parser.push(startElement=self._startElement, endElement=self._endElement) def _startElement(self, name, attrs): if (name == 'matrix4f'): for r in range(4): for c in range(4): self.m[r][c] = float(attrs['m%i%i' % (r, c)]) elif (name == 'position'): self._position = (float(attrs['x']), float(attrs['y']), float(attrs['z'])) elif (name == 'euler'): coeff = 1 if (attrs.get('aformat', 'radians') == 'degrees'): coeff = math.pi/180 x = coeff * float(attrs['x']) y = coeff * float(attrs['y']) z = coeff * float(attrs['z']) self._euler = (x, y, z) elif (name == 'rotation'): pass else: import parser raise parser.InvalidError("%s is not a valid child of ."% repr(name)) def _endElement(self, name): if (name == 'transform'): if (self._euler): x, y, z = self._euler self.rotate(x, y, z) if (self._position): x, y, z = self._position self.translate(x, y, z) self.scale(self._scale, self._scale, self._scale) self._node.setNodeTransform(self) self._parser.pop() def isAbsolute(self): """ @return: True if this transform is to be absolute rather than relative to another. @rtype: bool """ return self._absolute def setIdentity(self): """ Set the matrix so that there is no translation, rotation or scaling. """ for r in range(4): for c in range(4): self.m[r][c] = 0 for i in range(4): self.m[i][i] = 1 def translate(self, x, y, z): """ Set the matrix to translate a point. @param x: The offset along the x axis. @type x: float @param y: The offset along the y axis. @type y: float @param z: The offset along the z axis. @type z: float """ t = Transform() t.m[3][0] = x t.m[3][1] = y t.m[3][2] = z r = self * t; self.m = r.m def scale(self, x, y, z): """ Set the matrix to scale a point. @param x: The scaling factor along the x axis. @type x: float @param y: The scaling factor along the y axis. @type y: float @param z: The scaling factor along the z axis. @type z: float """ t = Transform() t.m[0][0] = x t.m[1][1] = y t.m[2][2] = z r = self * t self.m = r.m def rotate(self, x, y, z): """ Set the matrix to rotate a point. @param x: Rotation around the x axis in radians. @type x: float @param y: Rotation around the y axis in radians. @type y: float @param z: Rotation around the z axis in radians. @type z: float """ rx = Transform() rx.m[1][1] = math.cos(x) rx.m[1][2] = math.sin(x) rx.m[2][1] = -math.sin(x) rx.m[2][2] = math.cos(x) ry = Transform() ry.m[0][0] = math.cos(y) ry.m[0][2] = -math.sin(y) ry.m[2][0] = math.sin(y) ry.m[2][2] = math.cos(y) rz = Transform() rz.m[0][0] = math.cos(z) rz.m[0][1] = math.sin(z) rz.m[1][0] = -math.sin(z) rz.m[1][1] = math.cos(z) r = self * rx * ry * rz self.m = r.m def getPosition(self): """ Extracts the position vector. It is returned as a tuple in the form (x, y, z). @return: The position vector. @rtype: tuple """ return self.m[3][0], self.m[3][1], self.m[3][2] def getRotation(self): """ Extracts the rotation matrix. It is returned as a tuple in the form (m00, m01, m02, m10, m11, m12, m20, m21, m22). @return: The rotation matrix. @rtype: tuple """ return self.m[0][0], self.m[0][1], self.m[0][2], \ self.m[1][0], self.m[1][1], self.m[1][2], \ self.m[2][0], self.m[2][1], self.m[2][2] def __mul__(self, t2): """ Concatenate this transform with another. @param t2: The second transform. @type t2: instance of L{Transform} """ ret = Transform() for row in range(4): for col in range(4): part = 0 for i in range(4): part = part + self.m[row][i] * t2.m[i][col] ret.m[row][col] = part return ret PyODE-1.2.0/xode/errors.py0000644000175000001440000000401310146316005014643 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # XODE Importer for PyODE """ XODE Exceptions @author: U{Timothy Stranex} """ class InvalidError(Exception): """ Raised when an XODE document is invalid. """ class ChildError(InvalidError): """ Raised when an invalid child element is found. @ivar parent: The parent element. @type parent: str @ivar child: The invalid child element. @type child: str """ def __init__(self, parent, child): self.parent = parent self.child = child def __str__(self): return '<%s> is not a valid child of <%s>.' % (self.child, self.parent) class MissingElementError(InvalidError): """ Raised when a child element is missing. @ivar parent: The parent element. @type parent: str @ivar child: The missing child element. @type child: str """ def __init__(self, parent, child): self.parent = parent self.child = child def __str__(self): return 'Missing child <%s> of <%s>.' % (self.child, self.parent) PyODE-1.2.0/LICENSE0000644000175000001440000006347410144240730013042 0ustar zefirisusers GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! PyODE-1.2.0/tests/0000755000175000001440000000000010561403670013170 5ustar zefirisusersPyODE-1.2.0/tests/test_xode.py0000644000175000001440000007374010533277404015556 0ustar zefirisusers#!/usr/bin/env python ###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### import unittest import ode import math from xode import node, transform, parser, errors test_doc = ''' ''' trimesh_doc=''' ''' def feq(n1, n2, error=0.1): """ Compare two floating point numbers. If the differ by less than C{error}, return True; otherwise, return False. """ n = math.fabs(n1 - n2) if (n <= error): return True else: return False class Class1: pass class Class2: pass class TestTreeNode(unittest.TestCase): def setUp(self): self.node1 = node.TreeNode('node1', None) self.node2 = node.TreeNode('node2', self.node1) self.node3 = node.TreeNode('node3', self.node2) self.node4 = node.TreeNode('node4', self.node3) self.t2 = transform.Transform() self.t2.scale(2.0, 3.0, 4.0) self.node2.setNodeTransform(self.t2) self.t3 = transform.Transform() self.t3.rotate(1.0, 2.0, 3.0) self.node3.setNodeTransform(self.t3) self.t4 = transform.Transform() self.t4.translate(2.0, 3.0, 1.0) self.node4.setNodeTransform(self.t4) self.node1.setODEObject(Class2()) self.node2.setODEObject(Class2()) self.node3.setODEObject(Class1()) def testGetName(self): self.assertEqual(self.node1.getName(), 'node1') def testGetParent(self): self.assertEqual(self.node2.getParent(), self.node1) def testGetChildren(self): self.assertEqual(self.node1.getChildren(), [self.node2]) self.assertEqual(self.node2.getChildren(), [self.node3]) self.assertEqual(self.node3.getChildren(), [self.node4]) self.assertEqual(self.node4.getChildren(), []) def testNamedChildLocal(self): self.assertEqual(self.node1.namedChild('node2'), self.node2) def testNamedChildRemote(self): self.assertEqual(self.node1.namedChild('node3'), self.node3) def testNamedChildNotFound(self): self.assertRaises(KeyError, self.node1.namedChild, 'undefined') def testGetFirstAncestor(self): self.assertEqual(self.node3.getFirstAncestor(Class2), self.node2) def testGetFirstAncestorNotFound(self): self.assertRaises(node.AncestorNotFoundError, self.node3.getFirstAncestor, Class1) def testInitialTransform(self): t = transform.Transform() t.setIdentity() self.assertEqual(self.node1.getNodeTransform().m, t.m) def testGetTransform(self): ref = self.node1.getNodeTransform() * self.t2 * self.t3 self.assertEqual(self.node3.getTransform().m, ref.m) def testGetTransformUntil(self): ref = self.t3 * self.t4 self.assertEqual(self.node4.getTransform(self.node2).m, ref.m) class TestParser(unittest.TestCase): def setUp(self): self.p = parser.Parser() self.root = self.p.parseString(test_doc) def assertEqualf(a, b): self.assertEqual(feq(a, b), True) self.assertEqualf = assertEqualf class TestWorldParser(TestParser): def testInstance(self): world = self.root.namedChild('world1').getODEObject() self.assert_(isinstance(world, ode.World)) class TestSpaceParser(TestParser): def setUp(self): TestParser.setUp(self) self.simpleSpace = self.root.namedChild('space1').getODEObject() doc = ''' ''' self.p2 = parser.Parser() self.p2.setParams(spaceFactory=ode.HashSpace) self.root2 = self.p2.parseString(doc) self.hashSpace = self.root2.namedChild('space1').getODEObject() def makeSpace(): return ode.QuadTreeSpace((0, 0, 0), (2, 2, 2), 3) self.p3 = parser.Parser() self.p3.setParams(spaceFactory=makeSpace) self.root3 = self.p3.parseString(doc) self.quadSpace = self.root3.namedChild('space1').getODEObject() def testSimpleInstance(self): self.assert_(isinstance(self.simpleSpace, ode.SimpleSpace)) def testHashInstance(self): self.assert_(isinstance(self.hashSpace, ode.HashSpace)) def testQuadInstance(self): self.assert_(isinstance(self.quadSpace, ode.QuadTreeSpace)) def testSpaceBase(self): self.assert_(isinstance(self.simpleSpace, ode.SpaceBase)) self.assert_(isinstance(self.hashSpace, ode.SpaceBase)) self.assert_(isinstance(self.quadSpace, ode.SpaceBase)) class TestBodyParser(TestParser): def setUp(self): TestParser.setUp(self) self.body1 = self.root.namedChild('body1').getODEObject() self.body3 = self.root.namedChild('body3').getODEObject() self.body6 = self.root.namedChild('body6').getODEObject() def testInstance(self): self.assert_(isinstance(self.body1, ode.Body)) def testRotation(self): ref = transform.Transform() ref.rotate(0.0, 0.0, 0.78) rot = self.body6.getRotation() for n1, n2 in zip(ref.getRotation(), rot): self.assert_(feq(n1, n2)) def testPosition(self): self.assertEqual(self.body3.getPosition(), (10.0, 20.0, 30.0)) def testEnable(self): self.assertEqual(self.body1.isEnabled(), 0) def testGravityMode(self): self.assertEqual(self.body1.getGravityMode(), 0) def testTorque(self): self.assertEqual(self.body1.getTorque(), (1.0, 2.0, 3.0)) def testForce(self): self.assertEqual(self.body1.getForce(), (2.0, 3.0, 4.0)) def testFiniteRotation(self): self.assertEqual(self.body1.getFiniteRotationMode(), 1) x, y, z = self.body1.getFiniteRotationAxis() self.assertEqual(x, y, z) def testLinearVel(self): self.assertEqual(self.body1.getLinearVel(), (1.0, 2.0, 3.0)) def testAngularVel(self): self.assertEqual(self.body1.getAngularVel(), (3.0, 2.0, 1.0)) class TestMassParser(TestParser): def setUp(self): TestParser.setUp(self) self.mass0 = self.root.namedChild('mass0').getODEObject() self.mass1 = self.root.namedChild('mass1').getODEObject() self.mass2 = self.root.namedChild('mass2').getODEObject() self.ref1 = ode.Mass() self.ref1.setSphere(1.0, 1.0) self.ref2 = ode.Mass() self.ref2.setSphere(2.0, 10.0) self.ref2.adjust(4.0) def testInstance(self): self.assert_(isinstance(self.mass1, ode.Mass)) def testDefault(self): self.assertEqual(self.mass0.c, self.ref1.c) self.assertEqual(self.mass0.I, self.ref1.I) self.assertEqual(self.mass0.mass, self.ref1.mass) def testTotal(self): self.assertEqual(self.mass2.mass, 4.0) def testSphere(self): self.assertEqual(self.ref2.c, self.mass2.c) self.assertEqual(self.ref2.I, self.mass2.I) def testAdd(self): ref = ode.Mass() ref.setSphere(1.0, 1.0) ref.add(self.ref2) self.assertEqual(ref.c, self.mass1.c) self.assertEqual(ref.I, self.mass1.I) class TestJointParser(TestParser): def setUp(self): TestParser.setUp(self) self.body1 = self.root.namedChild('body1').getODEObject() self.body2 = self.root.namedChild('body2').getODEObject() self.joint1 = self.root.namedChild('joint1').getODEObject() self.joint2 = self.root.namedChild('joint2').getODEObject() self.joint3 = self.root.namedChild('joint3').getODEObject() self.joint4 = self.root.namedChild('joint4').getODEObject() self.joint5 = self.root.namedChild('joint5').getODEObject() self.joint6 = self.root.namedChild('joint6').getODEObject() self.joint7 = self.root.namedChild('joint7').getODEObject() self.joint8 = self.root.namedChild('joint8').getODEObject() self.joint9 = self.root.namedChild('joint9').getODEObject() self.joint10 = self.root.namedChild('joint10').getODEObject() def testBallInstance(self): self.assert_(isinstance(self.joint1, ode.BallJoint)) def testBodyAncestor(self): self.assertEqual(self.joint1.getBody(0), self.body1) def testEnvironment(self): self.assertEqual(self.joint1.getBody(1), ode.environment) def testBodyReference(self): self.assertEqual(self.joint2.getBody(0), self.body1) def testSpaceParent(self): self.assertEqual(self.joint3.getBody(0), self.body1) self.assertEqual(self.joint3.getBody(1), self.body2) def testBallAnchor(self): for n1, n2 in zip(self.joint1.getAnchor(), (1.0, 2.0, 3.0)): self.assert_(feq(n1, n2)) def testFixedInstance(self): self.assert_(isinstance(self.joint4, ode.FixedJoint)) def testHingeInstance(self): self.assert_(isinstance(self.joint5, ode.HingeJoint)) def testHingeAxis(self): self.assertEqual(self.joint5.getAxis(), (1.0, 0.0, 0.0)) def testSliderInstance(self): self.assert_(isinstance(self.joint6, ode.SliderJoint)) def testSliderAxis(self): self.assertEqual(self.joint6.getAxis(), (0.0, 1.0, 0.0)) def testUniversalInstance(self): self.assert_(isinstance(self.joint7, ode.UniversalJoint)) def testUniversalAxis1(self): ref = (1.0, 0.0, 0.0) axis1 = self.joint7.getAxis1() for r, a in zip(ref, axis1): self.assert_(feq(r, a)) def testUniversalAxis2(self): ref = (0.0, 1.0, 0.0) axis2 = self.joint7.getAxis2() for r, a in zip(ref, axis2): self.assert_(feq(r, a)) def testHinge2Instance(self): self.assert_(isinstance(self.joint8, ode.Hinge2Joint)) def testHinge2Axis1(self): ref = (0.0, 0.0, 1.0) axis1 = self.joint8.getAxis1() for r, a in zip(ref, axis1): self.assert_(feq(r, a)) def testHinge2Axis2(self): ref = (0.0, 1.0, 0.0) axis2 = self.joint8.getAxis2() for r, a in zip(ref, axis2): self.assert_(feq(r, a)) def testAMotorInstance(self): self.assert_(isinstance(self.joint9, ode.AMotor)) def testAMotorNumAxes1(self): self.assertEqual(self.joint9.getNumAxes(), 1) def testAMotorNumAxes3(self): self.assertEqual(self.joint10.getNumAxes(), 3) def testAMotorAxes1(self): ref = (0.0, 1.0, 0.0) axis1 = self.joint9.getAxis(0) self.assertEqual(ref, axis1) def testAMotorAxes3(self): ref = [(1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)] axes = [self.joint10.getAxis(0), self.joint10.getAxis(1), self.joint10.getAxis(2)] self.assertEqual(ref, axes) def testAxisParamLoStop(self): self.assertEqualf(self.joint6.getParam(ode.paramLoStop), 1.0) def testAxisParamHiStop(self): self.assertEqualf(self.joint6.getParam(ode.paramHiStop), 2.0) def testAxisParamVel(self): self.assertEqualf(self.joint6.getParam(ode.paramVel), 3.0) def testAxisParamFMax(self): self.assertEqualf(self.joint6.getParam(ode.paramFMax), 4.0) def testAxisParamFudgeFactor(self): self.assertEqualf(self.joint6.getParam(ode.paramFudgeFactor), 0.5) def testAxisParamBounce(self): self.assertEqualf(self.joint6.getParam(ode.paramBounce), 6.0) def testAxisParamCFM(self): self.assertEqualf(self.joint6.getParam(ode.paramCFM), 7.0) def testAxisParamStopERP(self): self.assertEqualf(self.joint6.getParam(ode.paramStopERP), 8.0) def testAxisParamStopCFM(self): self.assertEqualf(self.joint6.getParam(ode.paramStopCFM), 9.0) def testAxisParamSuspensionERP(self): self.assertEqualf(self.joint8.getParam(ode.paramSuspensionERP), 2.0) def testAxisParamSuspensionCFM(self): self.assertEqualf(self.joint8.getParam(ode.paramSuspensionCFM), 3.0) def testAxis2FudgeFactor(self): self.assertEqualf(self.joint8.getParam(ode.ParamFudgeFactor2), 0.2) class TestGeomParser(TestParser): def setUp(self): TestParser.setUp(self) self.geom1 = self.root.namedChild('geom1').getODEObject() self.geom2 = self.root.namedChild('geom2').getODEObject() self.geom3 = self.root.namedChild('geom3').getODEObject() self.geom4 = self.root.namedChild('geom4').getODEObject() self.geom5 = self.root.namedChild('geom5').getODEObject() self.geom6 = self.root.namedChild('geom6').getODEObject() self.body1 = self.root.namedChild('body1').getODEObject() self.space1 = self.root.namedChild('space1').getODEObject() def testSpaceAncestor(self): self.assertEqual(self.geom1.getSpace(), self.space1) def testBodyAttach(self): self.assertEqual(self.geom1.getBody(), self.body1) def testBoxInstance(self): self.assert_(isinstance(self.geom1, ode.GeomBox)) def testBoxSize(self): self.assertEqual(self.geom1.getLengths(), (10.0, 20.0, 30.0)) def testCCylinderInstance(self): self.assert_(isinstance(self.geom2, ode.GeomCCylinder)) def testCCylinderParams(self): self.assertEqual(self.geom2.getParams(), (15.0, 3.0)) def testSphereInstance(self): self.assert_(isinstance(self.geom5, ode.GeomSphere)) def testSphereRadius(self): self.assertEqual(self.geom5.getRadius(), 23.0) def testPlaneInstance(self): self.assert_(isinstance(self.geom4, ode.GeomPlane)) def testPlaneParams(self): self.assertEqual(self.geom4.getParams(), ((0.0, 1.0, 0.0), 17.0)) def testRayInstance(self): self.assert_(isinstance(self.geom3, ode.GeomRay)) def testRayLength(self): self.assertEqual(self.geom3.getLength(), 11.0) def testIndependantRotation(self): ref = transform.Transform() ref.rotate(0.0, 0.0, 0.78) for n1, n2 in zip(self.geom5.getRotation(), ref.getRotation()): self.assert_(feq(n1, n2)) def testIndependantPosition(self): self.assertEqual(self.geom5.getPosition(), (1.0, 2.0, 3.0)) def testTransformInstance(self): self.assert_(isinstance(self.geom6, ode.GeomTransform)) def testTransformGeomInstance(self): self.assert_(isinstance(self.geom6.getGeom(), ode.GeomSphere)) def testTransformPosition(self): pos = self.geom6.getGeom().getPosition() self.assertEqual(pos, (1.0, 2.0, 3.0)) def testTransformRotation(self): ref = transform.Transform() ref.rotate(0.78, 0.0, 0.0) rot = self.geom6.getGeom().getRotation() for n1, n2 in zip(rot, ref.getRotation()): self.assert_(feq(n1, n2)) class TestTransformParser(TestParser): def setUp(self): TestParser.setUp(self) self.world1 = self.root.namedChild('world1') self.body1 = self.root.namedChild('body1') self.body5 = self.root.namedChild('body5') self.body7 = self.root.namedChild('body7') def testMatrixStyle(self): t = self.world1.getNodeTransform() self.assertEqual(t.m, [[1.0, 2.0, 3.0, 4.0], [1.2, 2.2, 3.2, 4.2], [1.4, 2.4, 3.4, 4.4], [1.8, 2.8, 3.8, 4.8]]) def testVector(self): ref = transform.Transform() ref.rotate(45.0, 45.0, 45.0) ref.translate(10.0, 11.0, 12.0) ref.scale(2.0, 2.0, 2.0) self.assertEqual(self.body1.getNodeTransform().m, ref.m) def testAbsolute(self): t = self.body7.getTransform() self.assertEqual(t.m, [[1.0, 2.0, 3.0, 4.0], [1.2, 2.2, 3.2, 4.2], [1.4, 2.4, 3.4, 4.4], [1.8, 2.8, 3.8, 4.8]]) def testRelative(self): t1 = transform.Transform() t1.translate(1.0, 1.0, 1.0) t2 = transform.Transform() t2.translate(2.0, 2.0, 2.0) t3 = t1 * t2 self.assertEqual(self.body5.getTransform().m, t3.m) def testMultiply(self): t1 = transform.Transform() t2 = transform.Transform() for r in range(4): for c in range(4): t1.m[r][c] = 1 t2.m[r][c] = 2 result = t1 * t2 for r in range(4): for c in range(4): self.assertEqual(result.m[r][c], 8) def testInitialIdentity(self): t = transform.Transform() for r in range(4): for c in range(4): if (r == c): self.assertEqual(t.m[r][c], 1) else: self.assertEqual(t.m[r][c], 0) class TestTriMeshParser(unittest.TestCase): def setUp(self): self.p = parser.Parser() self.root = self.p.parseString(trimesh_doc) self.trimesh1 = self.root.namedChild('trimesh1').getODEObject() def testInstance(self): self.assert_(isinstance(self.trimesh1, ode.GeomTriMesh)) def testTriangles(self): triangles = [(1, 2, 3), (2, 1, 4), (3, 2, 1)] vertices = [(0.0, 1.0, 1.0), (1.0, 2.0, 2.0), (2.0, 0.0, 1.0), (0.0, 1.0, 2.0), (2.0, 2.0, 1.0)] for i in range(len(triangles)): tri = self.trimesh1.getTriangle(i) ref = [] for v in triangles[i]: ref.append(vertices[v-1]) self.assertEqual(tri, tuple(ref)) class TestInvalid(unittest.TestCase): def setUp(self): self.p = parser.Parser() class TestInvalidTags(TestInvalid): def testRoot(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testRootChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testWorldChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testSpaceChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testMassChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testJointChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testGeomChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) def testTriMeshChild(self): doc = ''' ''' self.assertRaises(errors.ChildError, self.p.parseString, doc) class TestInvalidBody(TestInvalid): def testBadVector(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testBodyEnable(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testFiniteRotationMode(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testFiniteRotationAxes(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) class TestInvalidJoint(TestInvalid): def testEqualLinks(self): doc = ''' ''' # both links are ode.environment self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testNoType(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testWrongType(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testMisplacedReference(self): doc = ''' ''' # bodies must be defined before the joint self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testSliderAxes(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) def testInvalidParam(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) class TestInvalidGeom(TestInvalid): def testNoType(self): doc = ''' ''' self.assertRaises(errors.InvalidError, self.p.parseString, doc) if (__name__ == '__main__'): unittest.main() PyODE-1.2.0/README0000644000175000001440000000175110146316004012703 0ustar zefirisusersPyODE ===== PyODE is a set of open-source Python bindings for The Open Dynamics Engine, an open-source physics engine. PyODE also includes an XODE parser. This library is free software; you can redistribute it and/or modify it under the terms of EITHER: (1) The GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The text of the GNU Lesser General Public License is included with this library in the file LICENSE.TXT. (2) The BSD-style license that is included with this library in the file LICENSE-BSD.TXT. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files LICENSE and LICENSE-BSD for more details. * Installation instructions are in the INSTALL file * The PyODE web pages are at http://pyode.sourceforge.net/ PyODE-1.2.0/PKG-INFO0000644000175000001440000000040610561403670013123 0ustar zefirisusersMetadata-Version: 1.0 Name: PyODE Version: 1.2.0 Summary: Python wrapper for the Open Dynamics Engine Home-page: http://pyode.sourceforge.net/ Author: see file AUTHORS Author-email: timothy@stranex.com License: BSD or LGPL Description: UNKNOWN Platform: UNKNOWN PyODE-1.2.0/ode_notrimesh.c0000644000175000001440000327106710561403667015057 0ustar zefirisusers/* Generated by Pyrex 0.9.5.1a on Sun Feb 4 18:20:07 2007 */ #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif __PYX_EXTERN_C double pow(double, double); #include "stdlib.h" #include "stdio.h" #include "ode/ode.h" typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; static char *__pyx_filename; static char **__pyx_f; static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_GetExcValue(void); /*proto*/ static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/ static int __Pyx_EndUnpack(PyObject *); /*proto*/ static void __Pyx_WriteUnraisable(char *name); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ static void __Pyx_AddTraceback(char *funcname); /*proto*/ /* Declarations from ode */ struct __pyx_obj_3ode_Mass { PyObject_HEAD dMass _mass; }; struct __pyx_obj_3ode_Contact { PyObject_HEAD dContact _contact; }; struct __pyx_obj_3ode_World { PyObject_HEAD dWorldID wid; }; struct __pyx_obj_3ode_Body { PyObject_HEAD dBodyID bid; PyObject *world; PyObject *userattribs; }; struct __pyx_obj_3ode_JointGroup { PyObject_HEAD dJointGroupID gid; PyObject *jointlist; }; struct __pyx_obj_3ode_Joint { PyObject_HEAD dJointID jid; PyObject *world; dJointFeedback (*feedback); PyObject *body1; PyObject *body2; PyObject *userattribs; }; struct __pyx_obj_3ode_BallJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_HingeJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_SliderJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_UniversalJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_Hinge2Joint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_FixedJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_ContactJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_AMotor { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_LMotor { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_Plane2DJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_GeomObject { PyObject_HEAD dGeomID gid; PyObject *space; PyObject *body; PyObject *attribs; }; struct __pyx_obj_3ode_SpaceBase { struct __pyx_obj_3ode_GeomObject __pyx_base; dSpaceID sid; }; struct __pyx_obj_3ode_SimpleSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_HashSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_QuadTreeSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_GeomSphere { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomBox { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomPlane { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomCapsule { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomCylinder { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomRay { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomTransform { struct __pyx_obj_3ode_GeomObject __pyx_base; PyObject *geom; }; struct __pyx_obj_3ode_TriMeshData { PyObject_HEAD }; struct __pyx_obj_3ode_GeomTriMesh { struct __pyx_obj_3ode_GeomObject __pyx_base; }; static PyTypeObject *__pyx_ptype_3ode_Mass = 0; static PyTypeObject *__pyx_ptype_3ode_Contact = 0; static PyTypeObject *__pyx_ptype_3ode_World = 0; static PyTypeObject *__pyx_ptype_3ode_Body = 0; static PyTypeObject *__pyx_ptype_3ode_JointGroup = 0; static PyTypeObject *__pyx_ptype_3ode_Joint = 0; static PyTypeObject *__pyx_ptype_3ode_BallJoint = 0; static PyTypeObject *__pyx_ptype_3ode_HingeJoint = 0; static PyTypeObject *__pyx_ptype_3ode_SliderJoint = 0; static PyTypeObject *__pyx_ptype_3ode_UniversalJoint = 0; static PyTypeObject *__pyx_ptype_3ode_Hinge2Joint = 0; static PyTypeObject *__pyx_ptype_3ode_FixedJoint = 0; static PyTypeObject *__pyx_ptype_3ode_ContactJoint = 0; static PyTypeObject *__pyx_ptype_3ode_AMotor = 0; static PyTypeObject *__pyx_ptype_3ode_LMotor = 0; static PyTypeObject *__pyx_ptype_3ode_Plane2DJoint = 0; static PyTypeObject *__pyx_ptype_3ode_GeomObject = 0; static PyTypeObject *__pyx_ptype_3ode_SpaceBase = 0; static PyTypeObject *__pyx_ptype_3ode_SimpleSpace = 0; static PyTypeObject *__pyx_ptype_3ode_HashSpace = 0; static PyTypeObject *__pyx_ptype_3ode_QuadTreeSpace = 0; static PyTypeObject *__pyx_ptype_3ode_GeomSphere = 0; static PyTypeObject *__pyx_ptype_3ode_GeomBox = 0; static PyTypeObject *__pyx_ptype_3ode_GeomPlane = 0; static PyTypeObject *__pyx_ptype_3ode_GeomCapsule = 0; static PyTypeObject *__pyx_ptype_3ode_GeomCylinder = 0; static PyTypeObject *__pyx_ptype_3ode_GeomRay = 0; static PyTypeObject *__pyx_ptype_3ode_GeomTransform = 0; static PyTypeObject *__pyx_ptype_3ode_TriMeshData = 0; static PyTypeObject *__pyx_ptype_3ode_GeomTriMesh = 0; static PyObject *__pyx_k2; static PyObject *__pyx_k3; static PyObject *__pyx_k4; static PyObject *__pyx_k5; static PyObject *__pyx_k6; static PyObject *__pyx_k7; static PyObject *__pyx_k8; static PyObject *__pyx_k9; static PyObject *__pyx_k10; static PyObject *__pyx_k11; static PyObject *__pyx_k12; static PyObject *__pyx_k13; static PyObject *__pyx_k14; static PyObject *__pyx_k15; static PyObject *__pyx_k16; static PyObject *__pyx_k17; static PyObject *__pyx_k18; static PyObject *__pyx_k19; static PyObject *__pyx_k20; static PyObject *__pyx_k21; static PyObject *__pyx_k22; static PyObject *__pyx_k25; static PyObject *__pyx_k26; static PyObject *__pyx_k27; static PyObject *__pyx_k28; static PyObject *__pyx_k29; static PyObject *__pyx_k30; static PyObject *__pyx_k31; static PyObject *__pyx_k32; static PyObject *__pyx_k33; static PyObject *__pyx_k34; static PyObject *__pyx_k35; static PyObject *__pyx_k36; static PyObject *__pyx_k37; static PyObject *__pyx_k38; static PyObject *__pyx_k39; static PyObject *__pyx_k40; static PyObject *__pyx_k41; static PyObject *__pyx_k42; static PyObject *__pyx_k43; static PyObject *__pyx_k44; static PyObject *__pyx_k45; static PyObject *__pyx_k46; static PyObject *__pyx_k47; static PyObject *__pyx_k48; static PyObject *__pyx_k49; static PyObject *__pyx_k50; static PyObject *__pyx_k51; static PyObject *__pyx_k52; static PyObject *__pyx_k53; static PyObject *__pyx_k54; static PyObject *__pyx_k55; static PyObject *__pyx_k56; static PyObject *__pyx_k57; static PyObject *__pyx_k58; static PyObject *__pyx_k59; static PyObject *__pyx_k60; static PyObject *__pyx_k61; static PyObject *__pyx_k62; static PyObject *__pyx_k63; static PyObject *__pyx_k64; static void (__pyx_f_3ode_collide_callback(void (*),dGeomID ,dGeomID )); /*proto*/ /* Implementation of ode */ static char (__pyx_k1[]) = "Python Open Dynamics Engine (ODE) wrapper.\n\nThis module contains classes and functions that wrap the functionality\nof the Open Dynamics Engine (ODE) which can be found at \nhttp://opende.sourceforge.net.\n\nThere are the following classes and functions:\n\n - World\n - Body\n - JointGroup\n - Contact\n - Space\n - Mass\n\nJoint classes:\n\n - BallJoint\n - HingeJoint\n - Hinge2Joint\n - SliderJoint\n - UniversalJoint\n - FixedJoint\n - ContactJoint\n - AMotor\n - LMotor\n - Plane2DJoint\n\nGeom classes:\n\n - GeomSphere\n - GeomBox\n - GeomPlane\n - GeomCapsule\n - GeomCylinder\n - GeomRay\n - GeomTransform\n - GeomTriMesh / TriMeshData\n\nFunctions:\n\n - CloseODE()\n - collide()\n\n"; static char (__pyx_k24[]) = "Iterates over the geoms inside a Space.\n "; static PyObject *__pyx_n___doc__; static PyObject *__pyx_n_paramLoStop; static PyObject *__pyx_n_paramHiStop; static PyObject *__pyx_n_paramVel; static PyObject *__pyx_n_paramFMax; static PyObject *__pyx_n_paramFudgeFactor; static PyObject *__pyx_n_paramBounce; static PyObject *__pyx_n_paramCFM; static PyObject *__pyx_n_paramStopERP; static PyObject *__pyx_n_paramStopCFM; static PyObject *__pyx_n_paramSuspensionERP; static PyObject *__pyx_n_paramSuspensionCFM; static PyObject *__pyx_n_ParamLoStop; static PyObject *__pyx_n_ParamHiStop; static PyObject *__pyx_n_ParamVel; static PyObject *__pyx_n_ParamFMax; static PyObject *__pyx_n_ParamFudgeFactor; static PyObject *__pyx_n_ParamBounce; static PyObject *__pyx_n_ParamCFM; static PyObject *__pyx_n_ParamStopERP; static PyObject *__pyx_n_ParamStopCFM; static PyObject *__pyx_n_ParamSuspensionERP; static PyObject *__pyx_n_ParamSuspensionCFM; static PyObject *__pyx_n_ParamLoStop2; static PyObject *__pyx_n_ParamHiStop2; static PyObject *__pyx_n_ParamVel2; static PyObject *__pyx_n_ParamFMax2; static PyObject *__pyx_n_ParamFudgeFactor2; static PyObject *__pyx_n_ParamBounce2; static PyObject *__pyx_n_ParamCFM2; static PyObject *__pyx_n_ParamStopERP2; static PyObject *__pyx_n_ParamStopCFM2; static PyObject *__pyx_n_ParamSuspensionERP2; static PyObject *__pyx_n_ParamSuspensionCFM2; static PyObject *__pyx_n_ParamLoStop3; static PyObject *__pyx_n_ParamHiStop3; static PyObject *__pyx_n_ParamVel3; static PyObject *__pyx_n_ParamFMax3; static PyObject *__pyx_n_ParamFudgeFactor3; static PyObject *__pyx_n_ParamBounce3; static PyObject *__pyx_n_ParamCFM3; static PyObject *__pyx_n_ParamStopERP3; static PyObject *__pyx_n_ParamStopCFM3; static PyObject *__pyx_n_ParamSuspensionERP3; static PyObject *__pyx_n_ParamSuspensionCFM3; static PyObject *__pyx_n_ParamGroup; static PyObject *__pyx_n_ContactMu2; static PyObject *__pyx_n_ContactFDir1; static PyObject *__pyx_n_ContactBounce; static PyObject *__pyx_n_ContactSoftERP; static PyObject *__pyx_n_ContactSoftCFM; static PyObject *__pyx_n_ContactMotion1; static PyObject *__pyx_n_ContactMotion2; static PyObject *__pyx_n_ContactSlip1; static PyObject *__pyx_n_ContactSlip2; static PyObject *__pyx_n_ContactApprox0; static PyObject *__pyx_n_ContactApprox1_1; static PyObject *__pyx_n_ContactApprox1_2; static PyObject *__pyx_n_ContactApprox1; static PyObject *__pyx_n_AMotorUser; static PyObject *__pyx_n_AMotorEuler; static PyObject *__pyx_n_Infinity; static PyObject *__pyx_n__geom_c2py_lut; static PyObject *__pyx_n__SpaceIterator; static PyObject *__pyx_n_Space; static PyObject *__pyx_n_GeomCCylinder; static PyObject *__pyx_n_collide; static PyObject *__pyx_n_collide2; static PyObject *__pyx_n_areConnected; static PyObject *__pyx_n_CloseODE; static PyObject *__pyx_n_environment; static PyObject *__pyx_n___init__; static PyObject *__pyx_n___iter__; static PyObject *__pyx_n_next; static PyObject *__pyx_k1p; static PyObject *__pyx_k24p; static int __pyx_f_3ode_4Mass___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_4Mass___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/mass.pyx":44 */ dMassSetZero((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass)); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setZero(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setZero[] = "setZero()\n\n Set all the mass parameters to zero."; static PyObject *__pyx_f_3ode_4Mass_setZero(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/mass.pyx":50 */ dMassSetZero((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setParameters[] = "setParameters(mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23)\n\n Set the mass parameters to the given values.\n\n @param mass: Total mass of the body.\n @param cgx: Center of gravity position in the body frame (x component).\n @param cgy: Center of gravity position in the body frame (y component).\n @param cgz: Center of gravity position in the body frame (z component).\n @param I11: Inertia tensor\n @param I22: Inertia tensor\n @param I33: Inertia tensor\n @param I12: Inertia tensor\n @param I13: Inertia tensor\n @param I23: Inertia tensor\n @type mass: float\n @type cgx: float\n @type cgy: float\n @type cgz: float\n @type I11: float\n @type I22: float\n @type I33: float\n @type I12: float\n @type I13: float\n @type I23: float\n "; static PyObject *__pyx_f_3ode_4Mass_setParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mass = 0; PyObject *__pyx_v_cgx = 0; PyObject *__pyx_v_cgy = 0; PyObject *__pyx_v_cgz = 0; PyObject *__pyx_v_I11 = 0; PyObject *__pyx_v_I22 = 0; PyObject *__pyx_v_I33 = 0; PyObject *__pyx_v_I12 = 0; PyObject *__pyx_v_I13 = 0; PyObject *__pyx_v_I23 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; dReal __pyx_9; dReal __pyx_10; static char *__pyx_argnames[] = {"mass","cgx","cgy","cgz","I11","I22","I33","I12","I13","I23",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOOOOOOOO", __pyx_argnames, &__pyx_v_mass, &__pyx_v_cgx, &__pyx_v_cgy, &__pyx_v_cgz, &__pyx_v_I11, &__pyx_v_I22, &__pyx_v_I33, &__pyx_v_I12, &__pyx_v_I13, &__pyx_v_I23)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mass); Py_INCREF(__pyx_v_cgx); Py_INCREF(__pyx_v_cgy); Py_INCREF(__pyx_v_cgz); Py_INCREF(__pyx_v_I11); Py_INCREF(__pyx_v_I22); Py_INCREF(__pyx_v_I33); Py_INCREF(__pyx_v_I12); Py_INCREF(__pyx_v_I13); Py_INCREF(__pyx_v_I23); /* "/home/zefiris/pyode/src/mass.pyx":78 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_cgx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_cgy); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_cgz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_5 = PyFloat_AsDouble(__pyx_v_I11); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_6 = PyFloat_AsDouble(__pyx_v_I22); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_7 = PyFloat_AsDouble(__pyx_v_I33); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_8 = PyFloat_AsDouble(__pyx_v_I12); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_9 = PyFloat_AsDouble(__pyx_v_I13); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_10 = PyFloat_AsDouble(__pyx_v_I23); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} dMassSetParameters((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8,__pyx_9,__pyx_10); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setParameters"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mass); Py_DECREF(__pyx_v_cgx); Py_DECREF(__pyx_v_cgy); Py_DECREF(__pyx_v_cgz); Py_DECREF(__pyx_v_I11); Py_DECREF(__pyx_v_I22); Py_DECREF(__pyx_v_I33); Py_DECREF(__pyx_v_I12); Py_DECREF(__pyx_v_I13); Py_DECREF(__pyx_v_I23); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setSphere[] = "setSphere(density, radius)\n \n Set the mass parameters to represent a sphere of the given radius\n and density, with the center of mass at (0,0,0) relative to the body.\n\n @param density: The density of the sphere\n @param radius: The radius of the sphere\n @type density: float\n @type radius: float\n "; static PyObject *__pyx_f_3ode_4Mass_setSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"density","radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_density, &__pyx_v_radius)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/mass.pyx":91 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} dMassSetSphere((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setSphere"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setSphereTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setSphereTotal[] = "setSphereTotal(total_mass, radius)\n \n Set the mass parameters to represent a sphere of the given radius\n and mass, with the center of mass at (0,0,0) relative to the body.\n\n @param total_mass: The total mass of the sphere\n @param radius: The radius of the sphere\n @type total_mass: float\n @type radius: float\n "; static PyObject *__pyx_f_3ode_4Mass_setSphereTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"total_mass","radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_radius)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/mass.pyx":104 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} dMassSetSphere((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setSphereTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCappedCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCappedCylinder[] = "setCappedCylinder(density, direction, r, h)\n \n Set the mass parameters to represent a capped cylinder of the\n given parameters and density, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder (and\n the spherical cap) is r. The length of the cylinder (not\n counting the spherical cap) is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the\n value of direction (1=x, 2=y, 3=z).\n\n @param density: The density of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder (without the caps)\n @type density: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCappedCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":126 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} dMassSetCappedCylinder((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCappedCylinder"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCappedCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCappedCylinderTotal[] = "setCappedCylinderTotal(total_mass, direction, r, h)\n \n Set the mass parameters to represent a capped cylinder of the\n given parameters and mass, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder (and\n the spherical cap) is r. The length of the cylinder (not\n counting the spherical cap) is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the\n value of direction (1=x, 2=y, 3=z).\n\n @param total_mass: The total mass of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder (without the caps)\n @type total_mass: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCappedCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":148 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} dMassSetCappedCylinderTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCappedCylinderTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCylinder[] = "setCylinder(density, direction, r, h)\n \n Set the mass parameters to represent a flat-ended cylinder of\n the given parameters and density, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder is r.\n The length of the cylinder is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the value\n of direction (1=x, 2=y, 3=z).\n\n @param density: The density of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder\n @type density: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":169 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} dMassSetCylinder((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCylinder"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCylinderTotal[] = "setCylinderTotal(total_mass, direction, r, h)\n \n Set the mass parameters to represent a flat-ended cylinder of\n the given parameters and mass, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder is r.\n The length of the cylinder is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the value\n of direction (1=x, 2=y, 3=z).\n\n @param total_mass: The total mass of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder\n @type total_mass: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":190 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} dMassSetCylinderTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCylinderTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setBox(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setBox[] = "setBox(density, lx, ly, lz)\n\n Set the mass parameters to represent a box of the given\n dimensions and density, with the center of mass at (0,0,0)\n relative to the body. The side lengths of the box along the x,\n y and z axes are lx, ly and lz.\n\n @param density: The density of the box\n @param lx: The length along the x axis\n @param ly: The length along the y axis\n @param lz: The length along the z axis\n @type density: float\n @type lx: float\n @type ly: float\n @type lz: float\n "; static PyObject *__pyx_f_3ode_4Mass_setBox(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_lx = 0; PyObject *__pyx_v_ly = 0; PyObject *__pyx_v_lz = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","lx","ly","lz",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_lx, &__pyx_v_ly, &__pyx_v_lz)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_lx); Py_INCREF(__pyx_v_ly); Py_INCREF(__pyx_v_lz); /* "/home/zefiris/pyode/src/mass.pyx":209 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_lx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_ly); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_lz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} dMassSetBox((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setBox"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_lx); Py_DECREF(__pyx_v_ly); Py_DECREF(__pyx_v_lz); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setBoxTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setBoxTotal[] = "setBoxTotal(total_mass, lx, ly, lz)\n\n Set the mass parameters to represent a box of the given\n dimensions and mass, with the center of mass at (0,0,0)\n relative to the body. The side lengths of the box along the x,\n y and z axes are lx, ly and lz.\n\n @param total_mass: The total mass of the box\n @param lx: The length along the x axis\n @param ly: The length along the y axis\n @param lz: The length along the z axis\n @type total_mass: float\n @type lx: float\n @type ly: float\n @type lz: float\n "; static PyObject *__pyx_f_3ode_4Mass_setBoxTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_lx = 0; PyObject *__pyx_v_ly = 0; PyObject *__pyx_v_lz = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","lx","ly","lz",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_lx, &__pyx_v_ly, &__pyx_v_lz)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_lx); Py_INCREF(__pyx_v_ly); Py_INCREF(__pyx_v_lz); /* "/home/zefiris/pyode/src/mass.pyx":228 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_lx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_ly); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_lz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} dMassSetBoxTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setBoxTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_lx); Py_DECREF(__pyx_v_ly); Py_DECREF(__pyx_v_lz); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_adjust(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_adjust[] = "adjust(newmass)\n\n Adjust the total mass. Given mass parameters for some object,\n adjust them so the total mass is now newmass. This is useful\n when using the setXyz() methods to set the mass parameters for\n certain objects - they take the object density, not the total\n mass.\n\n @param newmass: The new total mass\n @type newmass: float\n "; static PyObject *__pyx_f_3ode_4Mass_adjust(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_newmass = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"newmass",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_newmass)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_newmass); /* "/home/zefiris/pyode/src/mass.pyx":242 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_newmass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;} dMassAdjust((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.adjust"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_newmass); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_translate[] = "translate(t)\n\n Adjust mass parameters. Given mass parameters for some object,\n adjust them to represent the object displaced by (x,y,z)\n relative to the body frame.\n\n @param t: Translation vector (x, y, z)\n @type t: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Mass_translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/mass.pyx":254 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dMassTranslate((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Mass.translate"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_add[] = "add(b)\n\n Add the mass b to the mass object. Masses can also be added using\n the + operator.\n\n @param b: The mass to add to this mass\n @type b: Mass\n "; static PyObject *__pyx_f_3ode_4Mass_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_b = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"b",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3ode_Mass, 1, "b")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} /* "/home/zefiris/pyode/src/mass.pyx":272 */ dMassAdd((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),(&__pyx_v_b->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.add"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_n_mass; static PyObject *__pyx_n_c; static PyObject *__pyx_n_I; static PyObject *__pyx_n_AttributeError; static PyObject *__pyx_k68p; static PyObject *__pyx_k69p; static char (__pyx_k68[]) = "Mass object has no attribute '"; static char (__pyx_k69[]) = "\'"; static PyObject *__pyx_f_3ode_4Mass___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/mass.pyx":275 */ if (PyObject_Cmp(__pyx_v_name, __pyx_n_mass, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":276 */ __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.mass); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_c, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":278 */ __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_r = __pyx_5; __pyx_5 = 0; goto __pyx_L0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_I, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":280 */ __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[4])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[5])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[6])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_6, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[8])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[9])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[10])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_7); __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/mass.pyx":284 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_4 = PyNumber_Add(__pyx_k68p, __pyx_v_name); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_5 = PyNumber_Add(__pyx_4, __pyx_k69p); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_3, __pyx_5, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Mass.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_n_adjust; static PyObject *__pyx_k72p; static PyObject *__pyx_k74p; static PyObject *__pyx_k75p; static PyObject *__pyx_k76p; static char (__pyx_k72[]) = "Use the setParameter() method to change c"; static char (__pyx_k74[]) = "Use the setParameter() method to change I"; static char (__pyx_k75[]) = "Mass object has no attribute '"; static char (__pyx_k76[]) = "\'"; static int __pyx_f_3ode_4Mass___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_4Mass___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/mass.pyx":287 */ if (PyObject_Cmp(__pyx_v_name, __pyx_n_mass, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":288 */ __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_adjust); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_c, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":290 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k72p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_I, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":292 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;} __Pyx_Raise(__pyx_3, __pyx_k74p, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;} goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/mass.pyx":294 */ __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} __pyx_2 = PyNumber_Add(__pyx_k75p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} __pyx_3 = PyNumber_Add(__pyx_2, __pyx_k76p); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_4, __pyx_3, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Mass.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_n_add; static PyObject *__pyx_f_3ode_4Mass___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3ode_Mass, 1, "b")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} /* "/home/zefiris/pyode/src/mass.pyx":297 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":298 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Mass.__add__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_n_str; static PyObject *__pyx_k77p; static char (__pyx_k77[]) = "Mass=%s\nCg=(%s, %s, %s)\nI11=%s I22=%s I33=%s\nI12=%s I13=%s I23=%s"; static PyObject *__pyx_f_3ode_4Mass___str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___str__(PyObject *__pyx_v_self) { PyObject *__pyx_v_m; PyObject *__pyx_v_sc0; PyObject *__pyx_v_sc1; PyObject *__pyx_v_sc2; PyObject *__pyx_v_I11; PyObject *__pyx_v_I22; PyObject *__pyx_v_I33; PyObject *__pyx_v_I12; PyObject *__pyx_v_I13; PyObject *__pyx_v_I23; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); __pyx_v_m = Py_None; Py_INCREF(Py_None); __pyx_v_sc0 = Py_None; Py_INCREF(Py_None); __pyx_v_sc1 = Py_None; Py_INCREF(Py_None); __pyx_v_sc2 = Py_None; Py_INCREF(Py_None); __pyx_v_I11 = Py_None; Py_INCREF(Py_None); __pyx_v_I22 = Py_None; Py_INCREF(Py_None); __pyx_v_I33 = Py_None; Py_INCREF(Py_None); __pyx_v_I12 = Py_None; Py_INCREF(Py_None); __pyx_v_I13 = Py_None; Py_INCREF(Py_None); __pyx_v_I23 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/mass.pyx":301 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.mass); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_m); __pyx_v_m = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":302 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[0])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_sc0); __pyx_v_sc0 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":303 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_sc1); __pyx_v_sc1 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":304 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_sc2); __pyx_v_sc2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":305 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I11); __pyx_v_I11 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":306 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[5])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I22); __pyx_v_I22 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":307 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[10])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I33); __pyx_v_I33 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":308 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I12); __pyx_v_I12 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":309 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[2])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I13); __pyx_v_I13 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":310 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[6])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I23); __pyx_v_I23 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":311 */ __pyx_1 = PyTuple_New(10); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} Py_INCREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_m); Py_INCREF(__pyx_v_sc0); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_sc0); Py_INCREF(__pyx_v_sc1); PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_sc1); Py_INCREF(__pyx_v_sc2); PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_sc2); Py_INCREF(__pyx_v_I11); PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_I11); Py_INCREF(__pyx_v_I22); PyTuple_SET_ITEM(__pyx_1, 5, __pyx_v_I22); Py_INCREF(__pyx_v_I33); PyTuple_SET_ITEM(__pyx_1, 6, __pyx_v_I33); Py_INCREF(__pyx_v_I12); PyTuple_SET_ITEM(__pyx_1, 7, __pyx_v_I12); Py_INCREF(__pyx_v_I13); PyTuple_SET_ITEM(__pyx_1, 8, __pyx_v_I13); Py_INCREF(__pyx_v_I23); PyTuple_SET_ITEM(__pyx_1, 9, __pyx_v_I23); __pyx_2 = PyNumber_Remainder(__pyx_k77p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Mass.__str__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_m); Py_DECREF(__pyx_v_sc0); Py_DECREF(__pyx_v_sc1); Py_DECREF(__pyx_v_sc2); Py_DECREF(__pyx_v_I11); Py_DECREF(__pyx_v_I22); Py_DECREF(__pyx_v_I33); Py_DECREF(__pyx_v_I12); Py_DECREF(__pyx_v_I13); Py_DECREF(__pyx_v_I23); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_7Contact___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7Contact___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":42 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ContactBounce); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode = __pyx_2; /* "/home/zefiris/pyode/src/contact.pyx":43 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu = dInfinity; /* "/home/zefiris/pyode/src/contact.pyx":45 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce = 0.1; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMode[] = "getMode() -> flags\n\n Return the contact flags.\n "; static PyObject *__pyx_f_3ode_7Contact_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":53 */ __pyx_1 = PyInt_FromLong(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMode[] = "setMode(flags)\n\n Set the contact flags. The argument m is a combination of the\n ContactXyz flags (ContactMu2, ContactBounce, ...).\n \n @param flags: Contact flags\n @type flags: int\n "; static PyObject *__pyx_f_3ode_7Contact_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flags = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"flags",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flags)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flags); /* "/home/zefiris/pyode/src/contact.pyx":65 */ __pyx_1 = PyInt_AsLong(__pyx_v_flags); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flags); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMu[] = "getMu() -> float\n\n Return the Coulomb friction coefficient. \n "; static PyObject *__pyx_f_3ode_7Contact_getMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":73 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMu"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMu[] = "setMu(mu)\n\n Set the Coulomb friction coefficient.\n\n @param mu: Coulomb friction coefficient (0..Infinity)\n @type mu: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mu = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"mu",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mu)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mu); /* "/home/zefiris/pyode/src/contact.pyx":84 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMu"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mu); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMu2[] = "getMu2() -> float\n\n Return the optional Coulomb friction coefficient for direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":92 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMu2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMu2[] = "setMu2(mu)\n\n Set the optional Coulomb friction coefficient for direction 2.\n\n @param mu: Coulomb friction coefficient (0..Infinity)\n @type mu: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mu = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"mu",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mu)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mu); /* "/home/zefiris/pyode/src/contact.pyx":103 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMu2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mu); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getBounce[] = "getBounce() -> float\n\n Return the restitution parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":111 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getBounce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setBounce[] = "setBounce(b)\n\n @param b: Restitution parameter (0..1)\n @type b: float\n "; static PyObject *__pyx_f_3ode_7Contact_setBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_b = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"b",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); /* "/home/zefiris/pyode/src/contact.pyx":120 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_b); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setBounce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getBounceVel[] = "getBounceVel() -> float\n\n Return the minimum incoming velocity necessary for bounce.\n "; static PyObject *__pyx_f_3ode_7Contact_getBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":128 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce_vel); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getBounceVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setBounceVel[] = "setBounceVel(bv)\n\n Set the minimum incoming velocity necessary for bounce. Incoming\n velocities below this will effectively have a bounce parameter of 0.\n\n @param bv: Velocity\n @type bv: float\n "; static PyObject *__pyx_f_3ode_7Contact_setBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bv = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"bv",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bv)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bv); /* "/home/zefiris/pyode/src/contact.pyx":140 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_bv); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce_vel = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setBounceVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bv); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSoftERP[] = "getSoftERP() -> float\n\n Return the contact normal \"softness\" parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":148 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_erp); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSoftERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSoftERP[] = "setSoftERP(erp)\n\n Set the contact normal \"softness\" parameter.\n\n @param erp: Softness parameter\n @type erp: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_erp = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"erp",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_erp)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_erp); /* "/home/zefiris/pyode/src/contact.pyx":159 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_erp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_erp = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSoftERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_erp); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSoftCFM[] = "getSoftCFM() -> float\n\n Return the contact normal \"softness\" parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":167 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_cfm); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSoftCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSoftCFM[] = "setSoftCFM(cfm)\n\n Set the contact normal \"softness\" parameter.\n\n @param cfm: Softness parameter\n @type cfm: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cfm = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"cfm",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_cfm)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_cfm); /* "/home/zefiris/pyode/src/contact.pyx":178 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_cfm); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_cfm = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSoftCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_cfm); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMotion1[] = "getMotion1() -> float\n\n Get the surface velocity in friction direction 1.\n "; static PyObject *__pyx_f_3ode_7Contact_getMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":186 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMotion1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMotion1[] = "setMotion1(m)\n\n Set the surface velocity in friction direction 1.\n\n @param m: Surface velocity\n @type m: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_m = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"m",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_m)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_m); /* "/home/zefiris/pyode/src/contact.pyx":197 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_m); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion1 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMotion1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_m); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMotion2[] = "getMotion2() -> float\n\n Get the surface velocity in friction direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":205 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMotion2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMotion2[] = "setMotion2(m)\n\n Set the surface velocity in friction direction 2.\n\n @param m: Surface velocity\n @type m: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_m = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"m",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_m)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_m); /* "/home/zefiris/pyode/src/contact.pyx":216 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_m); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMotion2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_m); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSlip1[] = "getSlip1() -> float\n\n Get the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n "; static PyObject *__pyx_f_3ode_7Contact_getSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":225 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSlip1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSlip1[] = "setSlip1(s)\n\n Set the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n\n @param s: FDS coefficient\n @type s: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"s",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_s)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_s); /* "/home/zefiris/pyode/src/contact.pyx":237 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip1 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSlip1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSlip2[] = "getSlip2() -> float\n\n Get the coefficient of force-dependent-slip (FDS) for friction\n direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":246 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSlip2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSlip2[] = "setSlip2(s)\n\n Set the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n\n @param s: FDS coefficient\n @type s: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"s",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_s)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_s); /* "/home/zefiris/pyode/src/contact.pyx":258 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSlip2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getFDir1[] = "getFDir1() -> (x, y, z)\n\n Get the \"first friction direction\" vector that defines a direction\n along which frictional force is applied.\n "; static PyObject *__pyx_f_3ode_7Contact_getFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":267 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Contact.getFDir1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setFDir1[] = "setFDir1(fdir)\n\n Set the \"first friction direction\" vector that defines a direction\n along which frictional force is applied. It must be of unit length\n and perpendicular to the contact normal (so it is typically\n tangential to the contact surface).\n\n @param fdir: Friction direction\n @type fdir: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_7Contact_setFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fdir = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"fdir",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_fdir)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_fdir); /* "/home/zefiris/pyode/src/contact.pyx":281 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":282 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":283 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[2]) = __pyx_3; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Contact.setFDir1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_fdir); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getContactGeomParams[] = "getContactGeomParams() -> (pos, normal, depth, geom1, geom2)\n\n Get the ContactGeom structure of the contact.\n\n The return value is a tuple (pos, normal, depth, geom1, geom2)\n where pos and normal are 3-tuples of floats and depth is a single\n float. geom1 and geom2 are the Geom objects of the geoms in contact.\n "; static PyObject *__pyx_f_3ode_7Contact_getContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_v_pos; PyObject *__pyx_v_normal; PyObject *__pyx_v_depth; PyObject *__pyx_v_g1; PyObject *__pyx_v_g2; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_pos = Py_None; Py_INCREF(Py_None); __pyx_v_normal = Py_None; Py_INCREF(Py_None); __pyx_v_depth = Py_None; Py_INCREF(Py_None); __pyx_v_g1 = Py_None; Py_INCREF(Py_None); __pyx_v_g2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/contact.pyx":298 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; Py_DECREF(__pyx_v_pos); __pyx_v_pos = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":299 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; Py_DECREF(__pyx_v_normal); __pyx_v_normal = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":300 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.depth); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; goto __pyx_L1;} Py_DECREF(__pyx_v_depth); __pyx_v_depth = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/contact.pyx":302 */ __pyx_v_id1 = ((long )((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1); /* "/home/zefiris/pyode/src/contact.pyx":303 */ __pyx_v_id2 = ((long )((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2); /* "/home/zefiris/pyode/src/contact.pyx":304 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_id1); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_g1); __pyx_v_g1 = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":305 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(__pyx_v_id2); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_g2); __pyx_v_g2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/contact.pyx":306 */ __pyx_4 = PyTuple_New(5); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; goto __pyx_L1;} Py_INCREF(__pyx_v_pos); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_pos); Py_INCREF(__pyx_v_normal); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_normal); Py_INCREF(__pyx_v_depth); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_depth); Py_INCREF(__pyx_v_g1); PyTuple_SET_ITEM(__pyx_4, 3, __pyx_v_g1); Py_INCREF(__pyx_v_g2); PyTuple_SET_ITEM(__pyx_4, 4, __pyx_v_g2); __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Contact.getContactGeomParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_pos); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n__id; static PyObject *__pyx_f_3ode_7Contact_setContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setContactGeomParams[] = "setContactGeomParams(pos, normal, depth, geom1=None, geom2=None)\n \n Set the ContactGeom structure of the contact.\n\n @param pos: Contact position, in global coordinates\n @type pos: 3-sequence of floats\n @param normal: Unit length normal vector\n @type normal: 3-sequence of floats\n @param depth: Depth to which the two bodies inter-penetrate\n @type depth: float\n @param geom1: Geometry object 1 that collided\n @type geom1: Geom\n @param geom2: Geometry object 2 that collided\n @type geom2: Geom\n "; static PyObject *__pyx_f_3ode_7Contact_setContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_g1 = 0; PyObject *__pyx_v_g2 = 0; long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; int __pyx_4; long __pyx_5; static char *__pyx_argnames[] = {"pos","normal","depth","g1","g2",0}; __pyx_v_g1 = __pyx_k2; __pyx_v_g2 = __pyx_k3; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|OO", __pyx_argnames, &__pyx_v_pos, &__pyx_v_normal, &__pyx_v_depth, &__pyx_v_g1, &__pyx_v_g2)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_g1); Py_INCREF(__pyx_v_g2); /* "/home/zefiris/pyode/src/contact.pyx":328 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":329 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":330 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[2]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":331 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":332 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":333 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[2]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":334 */ __pyx_3 = PyFloat_AsDouble(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.depth = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":335 */ if (PyObject_Cmp(__pyx_v_g1, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/contact.pyx":336 */ __pyx_1 = PyObject_GetAttr(__pyx_v_g1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/contact.pyx":337 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1 = ((struct dxGeom (*))__pyx_v_id); goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/contact.pyx":339 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1 = ((struct dxGeom (*))0); } __pyx_L2:; /* "/home/zefiris/pyode/src/contact.pyx":341 */ if (PyObject_Cmp(__pyx_v_g2, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/contact.pyx":342 */ __pyx_1 = PyObject_GetAttr(__pyx_v_g2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/contact.pyx":343 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2 = ((struct dxGeom (*))__pyx_v_id); goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/contact.pyx":345 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2 = ((struct dxGeom (*))0); } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Contact.setContactGeomParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); return __pyx_r; } static int __pyx_f_3ode_5World___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5World___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":37 */ ((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid = dWorldCreate(); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static void __pyx_f_3ode_5World___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_5World___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":40 */ __pyx_1 = (((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/world.pyx":41 */ dWorldDestroy(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid); goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_f_3ode_5World_setGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setGravity[] = "setGravity(gravity)\n\n Set the world\'s global gravity vector.\n\n @param gravity: Gravity vector\n @type gravity: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_5World_setGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_gravity = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"gravity",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_gravity)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_gravity); /* "/home/zefiris/pyode/src/world.pyx":52 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dWorldSetGravity(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.World.setGravity"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_gravity); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getGravity[] = "getGravity() -> 3-tuple\n\n Return the world\'s global gravity vector as a 3-tuple of floats.\n "; static PyObject *__pyx_f_3ode_5World_getGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_g; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":61 */ dWorldGetGravity(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_v_g); /* "/home/zefiris/pyode/src/world.pyx":62 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_g[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_g[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_g[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.World.getGravity"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setERP[] = "setERP(erp)\n\n Set the global ERP value, that controls how much error\n correction is performed in each time step. Typical values are\n in the range 0.1-0.8. The default is 0.2.\n\n @param erp: Global ERP value\n @type erp: float\n "; static PyObject *__pyx_f_3ode_5World_setERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_erp = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"erp",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_erp)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_erp); /* "/home/zefiris/pyode/src/world.pyx":75 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_erp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; goto __pyx_L1;} dWorldSetERP(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_erp); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getERP[] = "getERP() -> float\n\n Get the global ERP value, that controls how much error\n correction is performed in each time step. Typical values are\n in the range 0.1-0.8. The default is 0.2.\n "; static PyObject *__pyx_f_3ode_5World_getERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":85 */ __pyx_1 = PyFloat_FromDouble(dWorldGetERP(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setCFM[] = "setCFM(cfm)\n\n Set the global CFM (constraint force mixing) value. Typical\n values are in the range 10E-9 - 1. The default is 10E-5 if\n single precision is being used, or 10E-10 if double precision\n is being used.\n\n @param cfm: Constraint force mixing value\n @type cfm: float\n "; static PyObject *__pyx_f_3ode_5World_setCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cfm = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"cfm",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_cfm)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_cfm); /* "/home/zefiris/pyode/src/world.pyx":99 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_cfm); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; goto __pyx_L1;} dWorldSetCFM(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_cfm); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getCFM[] = "getCFM() -> float\n\n Get the global CFM (constraint force mixing) value. Typical\n values are in the range 10E-9 - 1. The default is 10E-5 if\n single precision is being used, or 10E-10 if double precision\n is being used.\n "; static PyObject *__pyx_f_3ode_5World_getCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":110 */ __pyx_1 = PyFloat_FromDouble(dWorldGetCFM(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_step[] = "step(stepsize)\n\n Step the world. This uses a \"big matrix\" method that takes\n time on the order of O(m3) and memory on the order of O(m2), where m\n is the total number of constraint rows.\n\n For large systems this will use a lot of memory and can be\n very slow, but this is currently the most accurate method.\n\n @param stepsize: Time step\n @type stepsize: float\n "; static PyObject *__pyx_f_3ode_5World_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"stepsize",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_stepsize)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); /* "/home/zefiris/pyode/src/world.pyx":127 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; goto __pyx_L1;} dWorldStep(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.step"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_quickStep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_quickStep[] = "quickStep(stepsize)\n \n Step the world. This uses an iterative method that takes time\n on the order of O(m*N) and memory on the order of O(m), where m is\n the total number of constraint rows and N is the number of\n iterations.\n\n For large systems this is a lot faster than dWorldStep, but it\n is less accurate.\n\n @param stepsize: Time step\n @type stepsize: float \n "; static PyObject *__pyx_f_3ode_5World_quickStep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"stepsize",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_stepsize)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); /* "/home/zefiris/pyode/src/world.pyx":144 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; goto __pyx_L1;} dWorldQuickStep(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.quickStep"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setQuickStepNumIterations[] = "setQuickStepNumIterations(num)\n \n Set the number of iterations that the QuickStep method\n performs per step. More iterations will give a more accurate\n solution, but will take longer to compute. The default is 20\n iterations.\n\n @param num: Number of iterations\n @type num: int\n "; static PyObject *__pyx_f_3ode_5World_setQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_num = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_num); /* "/home/zefiris/pyode/src/world.pyx":159 */ __pyx_1 = PyInt_AsLong(__pyx_v_num); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; goto __pyx_L1;} dWorldSetQuickStepNumIterations(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setQuickStepNumIterations"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_num); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getQuickStepNumIterations[] = "getQuickStepNumIterations() -> int\n \n Get the number of iterations that the QuickStep method\n performs per step. More iterations will give a more accurate\n solution, but will take longer to compute. The default is 20\n iterations.\n "; static PyObject *__pyx_f_3ode_5World_getQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":170 */ __pyx_1 = PyInt_FromLong(dWorldGetQuickStepNumIterations(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getQuickStepNumIterations"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setContactMaxCorrectingVel[] = "setContactMaxCorrectingVel(vel)\n\n Set the maximum correcting velocity that contacts are allowed\n to generate. The default value is infinity (i.e. no\n limit). Reducing this value can help prevent \"popping\" of\n deeply embedded objects.\n\n @param vel: Maximum correcting velocity\n @type vel: float\n "; static PyObject *__pyx_f_3ode_5World_setContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/world.pyx":184 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_vel); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; goto __pyx_L1;} dWorldSetContactMaxCorrectingVel(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setContactMaxCorrectingVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getContactMaxCorrectingVel[] = "getContactMaxCorrectingVel() -> float\n\n Get the maximum correcting velocity that contacts are allowed\n to generate. The default value is infinity (i.e. no\n limit). Reducing this value can help prevent \"popping\" of\n deeply embedded objects. \n "; static PyObject *__pyx_f_3ode_5World_getContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":195 */ __pyx_1 = PyFloat_FromDouble(dWorldGetContactMaxCorrectingVel(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getContactMaxCorrectingVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setContactSurfaceLayer[] = "setContactSurfaceLayer(depth)\n\n Set the depth of the surface layer around all geometry\n objects. Contacts are allowed to sink into the surface layer\n up to the given depth before coming to rest. The default value\n is zero. Increasing this to some small value (e.g. 0.001) can\n help prevent jittering problems due to contacts being\n repeatedly made and broken.\n\n @param depth: Surface layer depth\n @type depth: float\n "; static PyObject *__pyx_f_3ode_5World_setContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_depth = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"depth",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_depth)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_depth); /* "/home/zefiris/pyode/src/world.pyx":211 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; goto __pyx_L1;} dWorldSetContactSurfaceLayer(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setContactSurfaceLayer"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_depth); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getContactSurfaceLayer[] = "getContactSurfaceLayer()\n\n Get the depth of the surface layer around all geometry\n objects. Contacts are allowed to sink into the surface layer\n up to the given depth before coming to rest. The default value\n is zero. Increasing this to some small value (e.g. 0.001) can\n help prevent jittering problems due to contacts being\n repeatedly made and broken.\n "; static PyObject *__pyx_f_3ode_5World_getContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":224 */ __pyx_1 = PyFloat_FromDouble(dWorldGetContactSurfaceLayer(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getContactSurfaceLayer"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableFlag[] = "setAutoDisableFlag(flag)\n \n Set the default auto-disable flag for newly created bodies.\n\n @param flag: True = Do auto disable\n @type flag: bool\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"flag",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flag)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flag); /* "/home/zefiris/pyode/src/world.pyx":235 */ __pyx_1 = PyInt_AsLong(__pyx_v_flag); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; goto __pyx_L1;} dWorldSetAutoDisableFlag(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableFlag"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flag); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableFlag[] = "getAutoDisableFlag() -> bool\n \n Get the default auto-disable flag for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":243 */ __pyx_1 = PyInt_FromLong(dWorldGetAutoDisableFlag(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableFlag"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableLinearThreshold[] = "setAutoDisableLinearThreshold(threshold)\n \n Set the default auto-disable linear threshold for newly created\n bodies.\n\n @param threshold: Linear threshold\n @type threshold: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_threshold = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"threshold",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_threshold)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_threshold); /* "/home/zefiris/pyode/src/world.pyx":256 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_threshold); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; goto __pyx_L1;} dWorldSetAutoDisableLinearThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableLinearThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_threshold); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableLinearThreshold[] = "getAutoDisableLinearThreshold() -> float\n \n Get the default auto-disable linear threshold for newly created\n bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":265 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableLinearThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableLinearThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableAngularThreshold[] = "setAutoDisableAngularThreshold(threshold)\n \n Set the default auto-disable angular threshold for newly created\n bodies.\n\n @param threshold: Angular threshold\n @type threshold: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_threshold = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"threshold",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_threshold)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_threshold); /* "/home/zefiris/pyode/src/world.pyx":277 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_threshold); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; goto __pyx_L1;} dWorldSetAutoDisableAngularThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableAngularThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_threshold); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableAngularThreshold[] = "getAutoDisableAngularThreshold() -> float\n \n Get the default auto-disable angular threshold for newly created\n bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":286 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableAngularThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableAngularThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableSteps[] = "setAutoDisableSteps(steps)\n \n Set the default auto-disable steps for newly created bodies.\n\n @param steps: Auto disable steps\n @type steps: int\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_steps = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"steps",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_steps)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_steps); /* "/home/zefiris/pyode/src/world.pyx":297 */ __pyx_1 = PyInt_AsLong(__pyx_v_steps); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 297; goto __pyx_L1;} dWorldSetAutoDisableSteps(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableSteps"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_steps); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableSteps[] = "getAutoDisableSteps() -> int\n \n Get the default auto-disable steps for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":305 */ __pyx_1 = PyInt_FromLong(dWorldGetAutoDisableSteps(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableSteps"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableTime[] = "setAutoDisableTime(time)\n \n Set the default auto-disable time for newly created bodies.\n\n @param time: Auto disable time\n @type time: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_time = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"time",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_time)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_time); /* "/home/zefiris/pyode/src/world.pyx":316 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_time); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; goto __pyx_L1;} dWorldSetAutoDisableTime(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableTime"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_time); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableTime[] = "getAutoDisableTime() -> float\n \n Get the default auto-disable time for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":324 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableTime(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 324; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableTime"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_impulseToForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_impulseToForce[] = "impulseToForce(stepsize, impulse) -> 3-tuple\n\n If you want to apply a linear or angular impulse to a rigid\n body, instead of a force or a torque, then you can use this\n function to convert the desired impulse into a force/torque\n vector before calling the dBodyAdd... function.\n\n @param stepsize: Time step\n @param impulse: Impulse vector\n @type stepsize: float\n @type impulse: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_5World_impulseToForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_v_impulse = 0; dVector3 __pyx_v_force; PyObject *__pyx_r; dReal __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; static char *__pyx_argnames[] = {"stepsize","impulse",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_stepsize, &__pyx_v_impulse)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); Py_INCREF(__pyx_v_impulse); /* "/home/zefiris/pyode/src/world.pyx":341 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dWorldImpulseToForce(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1,__pyx_4,__pyx_5,__pyx_6,__pyx_v_force); /* "/home/zefiris/pyode/src/world.pyx":342 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_force[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_force[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_force[2])); if (!__pyx_7) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_8 = PyTuple_New(3); if (!__pyx_8) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_8, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_8, 2, __pyx_7); __pyx_2 = 0; __pyx_3 = 0; __pyx_7 = 0; __pyx_r = __pyx_8; __pyx_8 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); __Pyx_AddTraceback("ode.World.impulseToForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); Py_DECREF(__pyx_v_impulse); return __pyx_r; } static int __pyx_f_3ode_4Body___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_4Body___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; int __pyx_r; static char *__pyx_argnames[] = {"world",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_world)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_world); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 46; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":47 */ ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid = dBodyCreate(__pyx_v_world->wid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_world); return __pyx_r; } static int __pyx_f_3ode_4Body___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body___init__[] = "Constructor.\n\n @param world: The world in which the body should be created.\n @type world: World\n "; static int __pyx_f_3ode_4Body___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"world",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_world)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_world); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":55 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->world); ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/body.pyx":56 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 56; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs); ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_world); return __pyx_r; } static void __pyx_f_3ode_4Body___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_4Body___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":59 */ __pyx_1 = (((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/body.pyx":60 */ dBodyDestroy(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k78p; static char (__pyx_k78[]) = "Body object has no attribute '%s'"; static PyObject *__pyx_f_3ode_4Body___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_4Body___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/body.pyx":63 */ /*try:*/ { /* "/home/zefiris/pyode/src/body.pyx":64 */ __pyx_1 = PyObject_GetItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; goto __pyx_L2;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; } goto __pyx_L3; __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":65 */ /*except:*/ { __Pyx_AddTraceback("ode.__getattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":66 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k78p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_4Body___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_4Body___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/body.pyx":69 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_k79p; static char (__pyx_k79[]) = "Body object has no attribute '%s'"; static int __pyx_f_3ode_4Body___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_f_3ode_4Body___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/body.pyx":72 */ /*try:*/ { /* "/home/zefiris/pyode/src/body.pyx":73 */ if (PyObject_DelItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; /* "/home/zefiris/pyode/src/body.pyx":74 */ /*except:*/ { __Pyx_AddTraceback("ode.__delattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":75 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k79p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.__delattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setPosition[] = "setPosition(pos)\n\n Set the position of the body.\n\n @param pos: The new position\n @type pos: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/body.pyx":86 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetPosition(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPosition[] = "getPosition() -> 3-tuple\n\n Return the current position of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":96 */ __pyx_v_p = ((dReal (*))dBodyGetPosition(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":97 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setRotation[] = "setRotation(R)\n\n Set the orientation of the body. The rotation matrix must be\n given as a sequence of 9 floats which are the elements of the\n matrix in row-major order.\n\n @param R: Rotation matrix\n @type R: 9-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_R = 0; dMatrix3 __pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"R",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_R)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_R); /* "/home/zefiris/pyode/src/body.pyx":111 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[0]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":112 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[1]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":113 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[2]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":114 */ (__pyx_v_m[3]) = 0; /* "/home/zefiris/pyode/src/body.pyx":115 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[4]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":116 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[5]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":117 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[6]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":118 */ (__pyx_v_m[7]) = 0; /* "/home/zefiris/pyode/src/body.pyx":119 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[8]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":120 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[9]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":121 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[10]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":122 */ (__pyx_v_m[11]) = 0; /* "/home/zefiris/pyode/src/body.pyx":123 */ dBodySetRotation(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_m); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_R); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRotation[] = "getRotation() -> 9-tuple\n\n Return the current rotation matrix as a tuple of 9 floats (row-major\n order).\n "; static PyObject *__pyx_f_3ode_4Body_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_m); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":134 */ __pyx_v_m = ((dReal (*))dBodyGetRotation(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":135 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_m[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_m[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_m[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_m[4])); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_m[5])); if (!__pyx_5) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_m[6])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_m[8])); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_8 = PyFloat_FromDouble((__pyx_v_m[9])); if (!__pyx_8) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_9 = PyFloat_FromDouble((__pyx_v_m[10])); if (!__pyx_9) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_10 = PyTuple_New(9); if (!__pyx_10) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_10, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_10, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_10, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_10, 3, __pyx_4); PyTuple_SET_ITEM(__pyx_10, 4, __pyx_5); PyTuple_SET_ITEM(__pyx_10, 5, __pyx_6); PyTuple_SET_ITEM(__pyx_10, 6, __pyx_7); PyTuple_SET_ITEM(__pyx_10, 7, __pyx_8); PyTuple_SET_ITEM(__pyx_10, 8, __pyx_9); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_8 = 0; __pyx_9 = 0; __pyx_r = __pyx_10; __pyx_10 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); __Pyx_AddTraceback("ode.Body.getRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getQuaternion[] = "getQuaternion() -> 4-tuple\n\n Return the current rotation as a quaternion. The return value\n is a list of 4 floats.\n "; static PyObject *__pyx_f_3ode_4Body_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_q); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":145 */ __pyx_v_q = ((dReal (*))dBodyGetQuaternion(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":146 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_q[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_q[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_q[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_q[3])); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_r = __pyx_5; __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.Body.getQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setQuaternion[] = "setQuaternion(q)\n\n Set the orientation of the body. The quaternion must be given as a\n sequence of 4 floats.\n\n @param q: Quaternion\n @type q: 4-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_q = 0; dQuaternion __pyx_v_w; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"q",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_q)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_q); /* "/home/zefiris/pyode/src/body.pyx":159 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[0]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":160 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[1]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":161 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[2]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":162 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[3]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":163 */ dBodySetQuaternion(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_w); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_q); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setLinearVel[] = "setLinearVel(vel)\n\n Set the linear velocity of the body.\n\n @param vel: New velocity\n @type vel: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/body.pyx":174 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetLinearVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setLinearVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getLinearVel[] = "getLinearVel() -> 3-tuple\n\n Get the current linear velocity of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":184 */ __pyx_v_p = ((dReal (*))dBodyGetLinearVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":185 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getLinearVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setAngularVel[] = "setAngularVel(vel)\n\n Set the angular velocity of the body.\n\n @param vel: New angular velocity\n @type vel: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/body.pyx":196 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetAngularVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setAngularVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getAngularVel[] = "getAngularVel() -> 3-tuple\n\n Get the current angular velocity of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":206 */ __pyx_v_p = ((dReal (*))dBodyGetAngularVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":207 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getAngularVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setMass[] = "setMass(mass)\n\n Set the mass properties of the body. The argument mass must be\n an instance of a Mass object.\n\n @param mass: Mass properties\n @type mass: Mass\n "; static PyObject *__pyx_f_3ode_4Body_setMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_mass = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"mass",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mass)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mass); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mass), __pyx_ptype_3ode_Mass, 1, "mass")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 210; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":219 */ dBodySetMass(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,(&__pyx_v_mass->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setMass"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mass); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getMass[] = "getMass() -> mass\n\n Return the mass properties as a Mass object.\n "; static PyObject *__pyx_f_3ode_4Body_getMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_m = ((struct __pyx_obj_3ode_Mass *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/body.pyx":228 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_Mass), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; goto __pyx_L1;} if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_3ode_Mass)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_m)); __pyx_v_m = ((struct __pyx_obj_3ode_Mass *)__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":229 */ dBodyGetMass(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,(&__pyx_v_m->_mass)); /* "/home/zefiris/pyode/src/body.pyx":230 */ Py_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = ((PyObject *)__pyx_v_m); goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getMass"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_m); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForce[] = "addForce(f)\n\n Add an external force f given in absolute coordinates. The force\n is applied at the center of mass.\n\n @param f: Force\n @type f: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":242 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addTorque[] = "addTorque(t)\n\n Add an external torque t given in absolute coordinates.\n\n @param t: Torque\n @type t: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":253 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForce[] = "addRelForce(f)\n\n Add an external force f given in relative coordinates\n (relative to the body\'s own frame of reference). The force\n is applied at the center of mass.\n\n @param f: Force\n @type f: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":266 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelTorque[] = "addRelTorque(t)\n\n Add an external torque t given in relative coordinates\n (relative to the body\'s own frame of reference).\n\n @param t: Torque\n @type t: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":278 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForceAtPos[] = "addForceAtPos(f, p)\n\n Add an external force f at position p. Both arguments must be\n given in absolute coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":292 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForceAtPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForceAtPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForceAtRelPos[] = "addForceAtRelPos(f, p)\n\n Add an external force f at position p. f is given in absolute\n coordinates and p in absolute coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":306 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForceAtRelPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForceAtRelPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForceAtPos[] = "addRelForceAtPos(f, p)\n\n Add an external force f at position p. f is given in relative\n coordinates and p in relative coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":320 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForceAtPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForceAtPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForceAtRelPos[] = "addRelForceAtRelPos(f, p)\n\n Add an external force f at position p. Both arguments must be\n given in relative coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":334 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForceAtRelPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForceAtRelPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getForce[] = "getForce() -> 3-tuple\n\n Return the current accumulated force.\n "; static PyObject *__pyx_f_3ode_4Body_getForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_f); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":344 */ __pyx_v_f = ((dReal (*))dBodyGetForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":345 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_f[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_f[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_f[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getTorque[] = "getTorque() -> 3-tuple\n\n Return the current accumulated torque.\n "; static PyObject *__pyx_f_3ode_4Body_getTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_f); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":355 */ __pyx_v_f = ((dReal (*))dBodyGetTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":356 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_f[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_f[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_f[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setForce[] = "setForce(f)\n\n Set the body force accumulation vector.\n\n @param f: Force\n @type f: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Body_setForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":367 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setTorque[] = "setTorque(t)\n\n Set the body torque accumulation vector.\n\n @param t: Torque\n @type t: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Body_setTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":378 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRelPointPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRelPointPos[] = "getRelPointPos(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s position in global coordinates. The point p\n must be given in body relative coordinates.\n\n @param p: Body point (local coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getRelPointPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":393 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetRelPointPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":394 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getRelPointPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRelPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRelPointVel[] = "getRelPointVel(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s velocity in global coordinates. The point p\n must be given in body relative coordinates.\n\n @param p: Body point (local coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getRelPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":408 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetRelPointVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":409 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getRelPointVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPointVel[] = "getPointVel(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s velocity in global coordinates. The point p\n must be given in global coordinates.\n\n @param p: Body point (global coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":423 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetPointVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":424 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getPointVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPosRelPoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPosRelPoint[] = "getPosRelPoint(p) -> 3-tuple\n\n This is the inverse of getRelPointPos(). It takes a point p in\n global coordinates and returns the point\'s position in\n body-relative coordinates.\n\n @param p: Body point (global coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getPosRelPoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":438 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetPosRelPoint(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":439 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getPosRelPoint"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_vectorToWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_vectorToWorld[] = "vectorToWorld(v) -> 3-tuple\n\n Given a vector v expressed in the body coordinate system, rotate\n it to the world coordinate system.\n\n @param v: Vector in body coordinate system\n @type v: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_vectorToWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_v = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"v",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_v)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_v); /* "/home/zefiris/pyode/src/body.pyx":452 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyVectorToWorld(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":453 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.vectorToWorld"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_v); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_vectorFromWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_vectorFromWorld[] = "vectorFromWorld(v) -> 3-tuple\n\n Given a vector v expressed in the world coordinate system, rotate\n it to the body coordinate system.\n\n @param v: Vector in world coordinate system\n @type v: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_vectorFromWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_v = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"v",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_v)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_v); /* "/home/zefiris/pyode/src/body.pyx":466 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyVectorFromWorld(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":467 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.vectorFromWorld"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_v); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_enable[] = "enable()\n\n Manually enable a body.\n "; static PyObject *__pyx_f_3ode_4Body_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":476 */ dBodyEnable(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_disable[] = "disable()\n\n Manually disable a body. Note that a disabled body that is connected\n through a joint to an enabled body will be automatically re-enabled\n at the next simulation step.\n "; static PyObject *__pyx_f_3ode_4Body_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":486 */ dBodyDisable(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_isEnabled[] = "isEnabled() -> bool\n\n Check if a body is currently enabled.\n "; static PyObject *__pyx_f_3ode_4Body_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":494 */ __pyx_1 = PyInt_FromLong(dBodyIsEnabled(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.isEnabled"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setFiniteRotationMode[] = "setFiniteRotationMode(mode)\n\n This function controls the way a body\'s orientation is updated at\n each time step. The mode argument can be:\n \n - 0: An \"infinitesimal\" orientation update is used. This is\n fast to compute, but it can occasionally cause inaccuracies\n for bodies that are rotating at high speed, especially when\n those bodies are joined to other bodies. This is the default\n for every new body that is created.\n \n - 1: A \"finite\" orientation update is used. This is more\n costly to compute, but will be more accurate for high speed\n rotations. Note however that high speed rotations can result\n in many types of error in a simulation, and this mode will\n only fix one of those sources of error.\n\n @param mode: Rotation mode (0/1)\n @type mode: int\n "; static PyObject *__pyx_f_3ode_4Body_setFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/body.pyx":518 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 518; goto __pyx_L1;} dBodySetFiniteRotationMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setFiniteRotationMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getFiniteRotationMode[] = "getFiniteRotationMode() -> mode (0/1)\n\n Return the current finite rotation mode of a body (0 or 1).\n See setFiniteRotationMode().\n "; static PyObject *__pyx_f_3ode_4Body_getFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":527 */ __pyx_1 = PyInt_FromLong(dBodyGetFiniteRotationMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 527; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getFiniteRotationMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setFiniteRotationAxis[] = "setFiniteRotationAxis(a)\n\n Set the finite rotation axis of the body. This axis only has a\n meaning when the finite rotation mode is set\n (see setFiniteRotationMode()).\n \n @param a: Axis\n @type a: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"a",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_a)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_a); /* "/home/zefiris/pyode/src/body.pyx":540 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetFiniteRotationAxis(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setFiniteRotationAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_a); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getFiniteRotationAxis[] = "getFiniteRotationAxis() -> 3-tuple\n\n Return the current finite rotation axis of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":550 */ dBodyGetFiniteRotationAxis(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":551 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getFiniteRotationAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getNumJoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getNumJoints[] = "getNumJoints() -> int\n\n Return the number of joints that are attached to this body.\n "; static PyObject *__pyx_f_3ode_4Body_getNumJoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":559 */ __pyx_1 = PyInt_FromLong(dBodyGetNumJoints(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 559; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getNumJoints"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setGravityMode[] = "setGravityMode(mode)\n\n Set whether the body is influenced by the world\'s gravity\n or not. If mode is True it is, otherwise it isn\'t.\n Newly created bodies are always influenced by the world\'s gravity.\n\n @param mode: Gravity mode\n @type mode: bool\n "; static PyObject *__pyx_f_3ode_4Body_setGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/body.pyx":572 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 572; goto __pyx_L1;} dBodySetGravityMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setGravityMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getGravityMode[] = "getGravityMode() -> bool\n\n Return True if the body is influenced by the world\'s gravity.\n "; static PyObject *__pyx_f_3ode_4Body_getGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":580 */ __pyx_1 = PyInt_FromLong(dBodyGetGravityMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 580; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getGravityMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_10JointGroup___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10JointGroup___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":51 */ ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid = dJointGroupCreate(0); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_10JointGroup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10JointGroup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":54 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.JointGroup.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n__destroyed; static void __pyx_f_3ode_10JointGroup___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_10JointGroup___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_v_j; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); __pyx_v_j = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":57 */ __pyx_1 = (((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":58 */ __pyx_2 = PyObject_GetIter(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; goto __pyx_L1;} for (;;) { __pyx_3 = PyIter_Next(__pyx_2); if (!__pyx_3) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_j); __pyx_v_j = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/joints.pyx":59 */ __pyx_3 = PyObject_GetAttr(__pyx_v_j, __pyx_n__destroyed); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; goto __pyx_L1;} __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":60 */ dJointGroupDestroy(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid); goto __pyx_L2; } __pyx_L2:; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.JointGroup.__dealloc__"); __pyx_L0:; Py_DECREF(__pyx_v_j); Py_DECREF(__pyx_v_self); } static PyObject *__pyx_f_3ode_10JointGroup_empty(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10JointGroup_empty[] = "empty()\n\n Destroy all joints in the group.\n "; static PyObject *__pyx_f_3ode_10JointGroup_empty(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_j; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_j = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":68 */ dJointGroupEmpty(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid); /* "/home/zefiris/pyode/src/joints.pyx":69 */ __pyx_1 = PyObject_GetIter(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; goto __pyx_L1;} for (;;) { __pyx_2 = PyIter_Next(__pyx_1); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_j); __pyx_v_j = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":70 */ __pyx_2 = PyObject_GetAttr(__pyx_v_j, __pyx_n__destroyed); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; goto __pyx_L1;} __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":71 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 71; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist = __pyx_2; __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.JointGroup.empty"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_j); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_append; static PyObject *__pyx_f_3ode_10JointGroup__addjoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10JointGroup__addjoint[] = "_addjoint(j)\n\n Add a joint to the group. This is an internal method that is\n called by the joints. The group has to know the Python\n wrappers because it has to notify them when the group is\n emptied (so that the ODE joints won\'t get destroyed\n twice). The notification is done by calling _destroyed() on\n the Python joints.\n\n @param j: The joint to add\n @type j: Joint\n "; static PyObject *__pyx_f_3ode_10JointGroup__addjoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_j = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"j",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_j)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_j); /* "/home/zefiris/pyode/src/joints.pyx":87 */ __pyx_1 = PyObject_GetAttr(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} Py_INCREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_j); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.JointGroup._addjoint"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_j); return __pyx_r; } static int __pyx_f_3ode_5Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":112 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":113 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->world); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->world = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":114 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = NULL; /* "/home/zefiris/pyode/src/joints.pyx":115 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":116 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":117 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Joint.__new__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_n_NotImplementedError; static PyObject *__pyx_k80p; static char (__pyx_k80[]) = "The Joint base class can't be used directly."; static int __pyx_f_3ode_5Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":120 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k80p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Joint.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_n_setFeedback; static PyObject *__pyx_n_False; static void __pyx_f_3ode_5Joint___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_5Joint___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; int __pyx_4; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":123 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_setFeedback); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":124 */ __pyx_4 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid != NULL); if (__pyx_4) { /* "/home/zefiris/pyode/src/joints.pyx":125 */ dJointDestroy(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid); goto __pyx_L2; } __pyx_L2:; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Joint.__dealloc__"); __pyx_L0:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k81p; static char (__pyx_k81[]) = "Joint object has no attribute '%s'"; static PyObject *__pyx_f_3ode_5Joint___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_5Joint___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/joints.pyx":128 */ /*try:*/ { /* "/home/zefiris/pyode/src/joints.pyx":129 */ __pyx_1 = PyObject_GetItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 129; goto __pyx_L2;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; } goto __pyx_L3; __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":130 */ /*except:*/ { __Pyx_AddTraceback("ode.__getattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 130; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":131 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k81p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Joint.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_5Joint___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_5Joint___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":134 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Joint.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_k82p; static char (__pyx_k82[]) = "Joint object has no attribute '%s'"; static int __pyx_f_3ode_5Joint___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_f_3ode_5Joint___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/joints.pyx":137 */ /*try:*/ { /* "/home/zefiris/pyode/src/joints.pyx":138 */ if (PyObject_DelItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 138; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":139 */ /*except:*/ { __Pyx_AddTraceback("ode.__delattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 139; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":140 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k82p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Joint.__delattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint__destroyed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint__destroyed[] = "Notify the joint object about an external destruction of the ODE joint.\n\n This method has to be called when the underlying ODE object\n was destroyed by someone else (e.g. by a joint group). The Python\n wrapper will then refrain from destroying it again.\n "; static PyObject *__pyx_f_3ode_5Joint__destroyed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":150 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid = NULL; __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint_attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_attach[] = "attach(body1, body2)\n\n Attach the joint to some new bodies. A body can be attached\n to the environment by passing None as second body.\n \n @param body1: First body\n @param body2: Second body\n @type body1: Body\n @type body2: Body\n "; static PyObject *__pyx_f_3ode_5Joint_attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body1 = 0; struct __pyx_obj_3ode_Body *__pyx_v_body2 = 0; dBodyID __pyx_v_id1; dBodyID __pyx_v_id2; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"body1","body2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_body1, &__pyx_v_body2)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_body1); Py_INCREF(__pyx_v_body2); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body1), __pyx_ptype_3ode_Body, 1, "body1")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 153; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body2), __pyx_ptype_3ode_Body, 1, "body2")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 153; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":166 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body1), Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":167 */ __pyx_v_id1 = NULL; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":169 */ __pyx_v_id1 = __pyx_v_body1->bid; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":171 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body2), Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 171; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":172 */ __pyx_v_id2 = NULL; goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":174 */ __pyx_v_id2 = __pyx_v_body2->bid; } __pyx_L3:; /* "/home/zefiris/pyode/src/joints.pyx":176 */ Py_INCREF(((PyObject *)__pyx_v_body1)); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1 = ((PyObject *)__pyx_v_body1); /* "/home/zefiris/pyode/src/joints.pyx":177 */ Py_INCREF(((PyObject *)__pyx_v_body2)); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2 = ((PyObject *)__pyx_v_body2); /* "/home/zefiris/pyode/src/joints.pyx":178 */ dJointAttach(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,__pyx_v_id1,__pyx_v_id2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Joint.attach"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_body1); Py_DECREF(__pyx_v_body2); return __pyx_r; } static PyObject *__pyx_n_IndexError; static PyObject *__pyx_f_3ode_5Joint_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_getBody[] = "getBody(index) -> Body\n\n Return the bodies that this joint connects. If index is 0 the\n \"first\" body will be returned, corresponding to the body1\n argument of the attach() method. If index is 1 the \"second\" body\n will be returned, corresponding to the body2 argument of the\n attach() method.\n\n @param index: Bodx index (0 or 1).\n @type index: int\n "; static PyObject *__pyx_f_3ode_5Joint_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"index",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_index)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_index); /* "/home/zefiris/pyode/src/joints.pyx":194 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 194; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_index, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 194; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/joints.pyx":195 */ Py_INCREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); __pyx_r = ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 196; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_index, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/joints.pyx":197 */ Py_INCREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); __pyx_r = ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":199 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Joint.getBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_index); return __pyx_r; } static PyObject *__pyx_n_MemoryError; static PyObject *__pyx_k83p; static char (__pyx_k83[]) = "can't allocate feedback buffer"; static PyObject *__pyx_f_3ode_5Joint_setFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_setFeedback[] = "setFeedback(flag=True)\n\n Create a feedback buffer. If flag is True then a buffer is\n allocated and the forces/torques applied by the joint can\n be read using the getFeedback() method. If flag is False the\n buffer is released.\n\n @param flag: Specifies whether a buffer should be created or released\n @type flag: bool\n "; static PyObject *__pyx_f_3ode_5Joint_setFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"flag",0}; __pyx_v_flag = __pyx_k4; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_flag)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flag); /* "/home/zefiris/pyode/src/joints.pyx":214 */ __pyx_1 = PyObject_IsTrue(__pyx_v_flag); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 214; goto __pyx_L1;} if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":216 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":217 */ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/joints.pyx":219 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = ((dJointFeedback (*))malloc((sizeof(dJointFeedback )))); /* "/home/zefiris/pyode/src/joints.pyx":220 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback == NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":221 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} Py_INCREF(__pyx_k83p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k83p); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; /* "/home/zefiris/pyode/src/joints.pyx":222 */ dJointSetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback); goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":224 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":226 */ dJointSetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,NULL); /* "/home/zefiris/pyode/src/joints.pyx":227 */ free(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback); /* "/home/zefiris/pyode/src/joints.pyx":228 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = NULL; goto __pyx_L5; } __pyx_L5:; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Joint.setFeedback"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flag); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint_getFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_getFeedback[] = "getFeedback() -> (force1, torque1, force2, torque2)\n\n Get the forces/torques applied by the joint. If feedback is\n activated (i.e. setFeedback(True) was called) then this method\n returns a tuple (force1, torque1, force2, torque2) with the\n forces and torques applied to body 1 and body 2. The\n forces/torques are given as 3-tuples.\n\n If feedback is deactivated then the method always returns None.\n "; static PyObject *__pyx_f_3ode_5Joint_getFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dJointFeedback (*__pyx_v_fb); PyObject *__pyx_v_f1; PyObject *__pyx_v_t1; PyObject *__pyx_v_f2; PyObject *__pyx_v_t2; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_f1 = Py_None; Py_INCREF(Py_None); __pyx_v_t1 = Py_None; Py_INCREF(Py_None); __pyx_v_f2 = Py_None; Py_INCREF(Py_None); __pyx_v_t2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":244 */ __pyx_v_fb = dJointGetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid); /* "/home/zefiris/pyode/src/joints.pyx":245 */ __pyx_1 = (__pyx_v_fb == NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":246 */ Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":248 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->f1[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->f1[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->f1[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_f1); __pyx_v_f1 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":249 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->t1[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->t1[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->t1[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_t1); __pyx_v_t1 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":250 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->f2[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->f2[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->f2[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_f2); __pyx_v_f2 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":251 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->t2[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->t2[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->t2[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_t2); __pyx_v_t2 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":252 */ __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 252; goto __pyx_L1;} Py_INCREF(__pyx_v_f1); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_f1); Py_INCREF(__pyx_v_t1); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_t1); Py_INCREF(__pyx_v_f2); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_f2); Py_INCREF(__pyx_v_t2); PyTuple_SET_ITEM(__pyx_2, 3, __pyx_v_t2); __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.Joint.getFeedback"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_f1); Py_DECREF(__pyx_v_t1); Py_DECREF(__pyx_v_f2); Py_DECREF(__pyx_v_t2); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9BallJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9BallJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k5; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 266; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":270 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":271 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":272 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":273 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":274 */ ((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateBall(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.BallJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_n__addjoint; static int __pyx_f_3ode_9BallJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9BallJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k6; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 276; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":277 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":278 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":279 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_setAnchor[] = "setAnchor(pos)\n\n Set the joint anchor point which must be specified in world\n coordinates.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_9BallJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":291 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetBallAnchor(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.BallJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This\n returns the point on body 1. If the joint is perfectly\n satisfied, this will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_9BallJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":303 */ dJointGetBallAnchor(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":304 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This\n returns the point on body 2. If the joint is perfectly\n satisfied, this will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_9BallJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":316 */ dJointGetBallAnchor2(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":317 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9BallJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":322 */ __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9BallJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":326 */ __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 326; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.BallJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_10HingeJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10HingeJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k7; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 338; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":342 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":343 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 343; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":344 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 344; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":345 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":346 */ ((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateHinge(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_10HingeJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10HingeJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k8; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 348; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":349 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":350 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 350; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":351 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setAnchor[] = "setAnchor(pos)\n\n Set the hinge anchor which must be given in world coordinates.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_10HingeJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":362 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHingeAnchor(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":373 */ dJointGetHingeAnchor(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":374 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":385 */ dJointGetHingeAnchor2(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":386 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setAxis[] = "setAxis(axis)\n\n Set the hinge axis.\n\n @param axis: Hinge axis\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10HingeJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":397 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHingeAxis(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAxis[] = "getAxis() -> 3-tuple of floats\n\n Get the hinge axis.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":406 */ dJointGetHingeAxis(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":407 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAngle[] = "getAngle() -> float\n\n Get the hinge angle. The angle is measured between the two\n bodies, or between the body and the static environment. The\n angle will be between -pi..pi.\n\n When the hinge anchor or axis is set, the current position of\n the attached bodies is examined and that position will be the\n zero angle.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":422 */ __pyx_1 = PyFloat_FromDouble(dJointGetHingeAngle(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 422; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.HingeJoint.getAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAngleRate[] = "getAngleRate() -> float\n\n Get the time derivative of the angle.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":430 */ __pyx_1 = PyFloat_FromDouble(dJointGetHingeAngleRate(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 430; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.HingeJoint.getAngleRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_addTorque[] = "addTorque(torque)\n\n Applies the torque about the hinge axis.\n\n @param torque: Torque magnitude\n @type torque: float\n "; static PyObject *__pyx_f_3ode_10HingeJoint_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"torque",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_torque)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque); /* "/home/zefiris/pyode/src/joints.pyx":441 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 441; goto __pyx_L1;} dJointAddHingeTorque(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.addTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setParam[] = "setParam(param, value)\n\n Set limit/motor parameters for the joint.\n\n param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax,\n ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM,\n ParamSuspensionERP, ParamSuspensionCFM.\n\n These parameter names can be optionally followed by a digit (2\n or 3) to indicate the second or third set of parameters.\n\n @param param: Selects the parameter to set\n @param value: Parameter value \n @type param: int\n @type value: float\n "; static PyObject *__pyx_f_3ode_10HingeJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":462 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 462; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 462; goto __pyx_L1;} dJointSetHingeParam(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getParam[] = "getParam(param) -> float\n\n Get limit/motor parameters for the joint.\n\n param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax,\n ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM,\n ParamSuspensionERP, ParamSuspensionCFM.\n\n These parameter names can be optionally followed by a digit (2\n or 3) to indicate the second or third set of parameters.\n\n @param param: Selects the parameter to read\n @type param: int \n "; static PyObject *__pyx_f_3ode_10HingeJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":480 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 480; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetHingeParam(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 480; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_11SliderJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SliderJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k9; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 492; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":496 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":497 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 497; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":498 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 498; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":499 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":500 */ ((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateSlider(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_11SliderJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SliderJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k10; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 502; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":503 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":504 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 504; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":505 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SliderJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_setAxis[] = "setAxis(axis)\n\n Set the slider axis parameter.\n\n @param axis: Slider axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11SliderJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":516 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetSliderAxis(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SliderJoint.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getAxis[] = "getAxis() -> 3-tuple of floats\n\n Get the slider axis parameter.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":525 */ dJointGetSliderAxis(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":526 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SliderJoint.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getPosition[] = "getPosition() -> float\n\n Get the slider linear position (i.e. the slider\'s \"extension\").\n\n When the axis is set, the current position of the attached\n bodies is examined and that position will be the zero\n position.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":539 */ __pyx_1 = PyFloat_FromDouble(dJointGetSliderPosition(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 539; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SliderJoint.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getPositionRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getPositionRate[] = "getPositionRate() -> float\n\n Get the time derivative of the position.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getPositionRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":547 */ __pyx_1 = PyFloat_FromDouble(dJointGetSliderPositionRate(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 547; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SliderJoint.getPositionRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_addForce[] = "addForce(force)\n\n Applies the given force in the slider\'s direction.\n\n @param force: Force magnitude\n @type force: float\n "; static PyObject *__pyx_f_3ode_11SliderJoint_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_force = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"force",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_force)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_force); /* "/home/zefiris/pyode/src/joints.pyx":558 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_force); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 558; goto __pyx_L1;} dJointAddSliderForce(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.addForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_force); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11SliderJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":562 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 562; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 562; goto __pyx_L1;} dJointSetSliderParam(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11SliderJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":566 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 566; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetSliderParam(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 566; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SliderJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_14UniversalJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_14UniversalJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k11; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 578; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":582 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":583 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 583; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":584 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 584; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":585 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":586 */ ((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateUniversal(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_14UniversalJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_14UniversalJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k12; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 588; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":589 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":590 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 590; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":591 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAnchor[] = "setAnchor(pos)\n\n Set the universal anchor.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":602 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAnchor(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":614 */ dJointGetUniversalAnchor(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":615 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":627 */ dJointGetUniversalAnchor2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":628 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAxis1[] = "setAxis1(axis)\n\n Set the first universal axis. Axis 1 and axis 2 should be\n perpendicular to each other.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":640 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAxis1(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAxis1[] = "getAxis1() -> 3-tuple of floats\n\n Get the first univeral axis.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":649 */ dJointGetUniversalAxis1(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":650 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAxis2[] = "setAxis2(axis)\n\n Set the second universal axis. Axis 1 and axis 2 should be\n perpendicular to each other.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":662 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAxis2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAxis2[] = "getAxis2() -> 3-tuple of floats\n\n Get the second univeral axis.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":671 */ dJointGetUniversalAxis2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":672 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_addTorques[] = "addTorques(torque1, torque2)\n\n Applies torque1 about axis 1, and torque2 about axis 2.\n\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":685 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 685; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 685; goto __pyx_L1;} dJointAddUniversalTorques(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_14UniversalJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":689 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 689; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 689; goto __pyx_L1;} dJointSetUniversalParam(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_14UniversalJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":693 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 693; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetUniversalParam(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 693; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_11Hinge2Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11Hinge2Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k13; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 705; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":709 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":710 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 710; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":711 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 711; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":712 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":713 */ ((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid = dJointCreateHinge2(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_11Hinge2Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11Hinge2Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k14; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 1, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 715; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":716 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":717 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 717; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":718 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAnchor[] = "setAnchor(pos)\n\n Set the hinge-2 anchor.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":729 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Anchor(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":741 */ dJointGetHinge2Anchor(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":742 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":754 */ dJointGetHinge2Anchor2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":755 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAxis1[] = "setAxis1(axis)\n\n Set the first hinge-2 axis. Axis 1 and axis 2 must not lie\n along the same line.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":768 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Axis1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAxis1[] = "getAxis1() -> 3-tuple of floats\n\n Get the first hinge-2 axis.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":777 */ dJointGetHinge2Axis1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":778 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAxis2[] = "setAxis2(axis)\n\n Set the second hinge-2 axis. Axis 1 and axis 2 must not lie\n along the same line.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":790 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Axis2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAxis2[] = "getAxis2() -> 3-tuple of floats\n\n Get the second hinge-2 axis.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":799 */ dJointGetHinge2Axis2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":800 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle1[] = "getAngle1() -> float\n\n Get the first hinge-2 angle (around axis 1).\n\n When the anchor or axis is set, the current position of the\n attached bodies is examined and that position will be the zero\n angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":812 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 812; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle1Rate[] = "getAngle1Rate() -> float\n\n Get the time derivative of the first hinge-2 angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":820 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle1Rate(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 820; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle1Rate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle2Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle2Rate[] = "getAngle2Rate() -> float\n\n Get the time derivative of the second hinge-2 angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle2Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":828 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle2Rate(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 828; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle2Rate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_addTorques[] = "addTorques(torque1, torque2)\n\n Applies torque1 about axis 1, and torque2 about axis 2.\n\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":841 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 841; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 841; goto __pyx_L1;} dJointAddHinge2Torques(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11Hinge2Joint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":845 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 845; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 845; goto __pyx_L1;} dJointSetHinge2Param(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11Hinge2Joint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":849 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 849; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetHinge2Param(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 849; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_10FixedJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10FixedJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k15; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 861; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":865 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":866 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 866; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":867 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 867; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":868 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":869 */ ((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateFixed(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.FixedJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_10FixedJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10FixedJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k16; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 871; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":872 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":873 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 873; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":874 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.FixedJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_10FixedJoint_setFixed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10FixedJoint_setFixed[] = "setFixed()\n\n Call this on the fixed joint after it has been attached to\n remember the current desired relative offset and desired\n relative rotation between the bodies.\n "; static PyObject *__pyx_f_3ode_10FixedJoint_setFixed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":884 */ dJointSetFixed(((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.jid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_12ContactJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12ContactJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_Contact *__pyx_v_contact = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup","contact",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup, &__pyx_v_contact)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); Py_INCREF(__pyx_v_contact); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 896; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contact), __pyx_ptype_3ode_Contact, 1, "contact")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 896; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":899 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":900 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 900; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":901 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 901; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":902 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":903 */ ((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateContact(__pyx_v_world->wid,__pyx_v_jgid,(&__pyx_v_contact->_contact)); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.ContactJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); Py_DECREF(__pyx_v_contact); return __pyx_r; } static int __pyx_f_3ode_12ContactJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12ContactJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_Contact *__pyx_v_contact = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup","contact",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup, &__pyx_v_contact)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); Py_INCREF(__pyx_v_contact); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 905; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contact), __pyx_ptype_3ode_Contact, 1, "contact")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 905; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":906 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":907 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 907; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":908 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.ContactJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); Py_DECREF(__pyx_v_contact); return __pyx_r; } static int __pyx_f_3ode_6AMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6AMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k17; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 919; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":923 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":924 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 924; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":925 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 925; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":926 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":927 */ ((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid = dJointCreateAMotor(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_6AMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6AMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k18; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 929; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":930 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":931 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 931; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":932 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.AMotor.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setMode[] = "setMode(mode)\n\n Set the angular motor mode. mode must be either AMotorUser or\n AMotorEuler.\n\n @param mode: Angular motor mode\n @type mode: int\n "; static PyObject *__pyx_f_3ode_6AMotor_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/joints.pyx":944 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 944; goto __pyx_L1;} dJointSetAMotorMode(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getMode[] = "getMode()\n\n Return the angular motor mode (AMotorUser or AMotorEuler).\n "; static PyObject *__pyx_f_3ode_6AMotor_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":952 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorMode(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 952; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setNumAxes[] = "setNumAxes(num)\n\n Set the number of angular axes that will be controlled by the AMotor.\n num may be in the range from 0 to 3.\n\n @param num: Number of axes (0-3)\n @type num: int\n "; static PyObject *__pyx_f_3ode_6AMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_num; PyObject *__pyx_r; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":964 */ dJointSetAMotorNumAxes(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_num); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getNumAxes[] = "getNumAxes() -> int\n\n Get the number of angular axes that are controlled by the AMotor.\n "; static PyObject *__pyx_f_3ode_6AMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":972 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorNumAxes(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 972; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getNumAxes"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setAxis[] = "setAxis(anum, rel, axis)\n\n Set an AMotor axis.\n\n The anum argument selects the axis to change (0,1 or 2).\n Each axis can have one of three \"relative orientation\" modes,\n selected by rel:\n \n 0: The axis is anchored to the global frame. \n 1: The axis is anchored to the first body. \n 2: The axis is anchored to the second body.\n\n The axis vector is always specified in global coordinates\n regardless of the setting of rel.\n\n @param anum: Axis number\n @param rel: Relative orientation mode\n @param axis: Axis\n @type anum: int\n @type rel: int\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_6AMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; int __pyx_v_rel; PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"anum","rel","axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iiO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_rel, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":998 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetAMotorAxis(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_rel,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.AMotor.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAxis[] = "getAxis(anum)\n\n Get an AMotor axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1010 */ dJointGetAMotorAxis(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":1011 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.AMotor.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAxisRel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAxisRel[] = "getAxisRel(anum) -> int\n\n Get the relative mode of an axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAxisRel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1022 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorAxisRel(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1022; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAxisRel"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setAngle[] = "setAngle(anum, angle)\n\n Tell the AMotor what the current angle is along axis anum.\n\n @param anum: Axis index\n @param angle: Angle\n @type anum: int\n @type angle: float\n "; static PyObject *__pyx_f_3ode_6AMotor_setAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_v_angle = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"anum","angle",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_angle)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_angle); /* "/home/zefiris/pyode/src/joints.pyx":1035 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_angle); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1035; goto __pyx_L1;} dJointSetAMotorAngle(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_angle); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAngle[] = "getAngle(anum) -> float\n\n Return the current angle for axis anum.\n\n @param anum: Axis index\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1046 */ __pyx_1 = PyFloat_FromDouble(dJointGetAMotorAngle(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1046; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAngleRate[] = "getAngleRate(anum) -> float\n\n Return the current angle rate for axis anum.\n\n @param anum: Axis index\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1057 */ __pyx_1 = PyFloat_FromDouble(dJointGetAMotorAngleRate(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1057; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAngleRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_addTorques[] = "addTorques(torque0, torque1, torque2)\n\n Applies torques about the AMotor\'s axes.\n\n @param torque0: Torque 0 magnitude\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque0: float\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_6AMotor_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque0 = 0; PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; static char *__pyx_argnames[] = {"torque0","torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_torque0, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque0); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":1072 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque0); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} dJointAddAMotorTorques(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2,__pyx_3); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque0); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6AMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1076 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1076; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1076; goto __pyx_L1;} dJointSetAMotorParam(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6AMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":1080 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1080; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetAMotorParam(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1080; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.AMotor.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_6LMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6LMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k19; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1092; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1096 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":1097 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1097; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1098 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1098; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":1099 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":1100 */ ((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid = dJointCreateLMotor(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.LMotor.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_6LMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6LMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k20; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1102; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1103 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":1104 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1104; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1105 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.LMotor.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_setNumAxes[] = "setNumAxes(num)\n\n Set the number of angular axes that will be controlled by the LMotor.\n num may be in the range from 0 to 3.\n\n @param num: Number of axes (0-3)\n @type num: int\n "; static PyObject *__pyx_f_3ode_6LMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_num; PyObject *__pyx_r; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1117 */ dJointSetLMotorNumAxes(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_num); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_getNumAxes[] = "getNumAxes() -> int\n\n Get the number of angular axes that are controlled by the LMotor.\n "; static PyObject *__pyx_f_3ode_6LMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1125 */ __pyx_1 = PyInt_FromLong(dJointGetLMotorNumAxes(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1125; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.LMotor.getNumAxes"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_setAxis[] = "setAxis(anum, rel, axis)\n\n Set an LMotor axis.\n\n The anum argument selects the axis to change (0,1 or 2).\n Each axis can have one of three \"relative orientation\" modes,\n selected by rel:\n\n 0: The axis is anchored to the global frame. \n 1: The axis is anchored to the first body. \n 2: The axis is anchored to the second body.\n\n @param anum: Axis number\n @param rel: Relative orientation mode\n @param axis: Axis\n @type anum: int\n @type rel: int\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_6LMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; int __pyx_v_rel; PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"anum","rel","axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iiO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_rel, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":1148 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetLMotorAxis(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_rel,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.LMotor.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_getAxis[] = "getAxis(anum)\n\n Get an LMotor axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6LMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1160 */ dJointGetLMotorAxis(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":1161 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.LMotor.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6LMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1165 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1165; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1165; goto __pyx_L1;} dJointSetLMotorParam(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.LMotor.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6LMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":1169 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetLMotorParam(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.LMotor.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_12Plane2DJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12Plane2DJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k21; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1181; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1185 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":1186 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1187 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1187; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":1188 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":1189 */ ((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreatePlane2D(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_12Plane2DJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12Plane2DJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k22; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1191; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1192 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":1193 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1193; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1194 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Plane2DJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setXParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setXParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1197 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1197; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1197; goto __pyx_L1;} dJointSetPlane2DXParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setXParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setYParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setYParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1200 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1200; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1200; goto __pyx_L1;} dJointSetPlane2DYParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setYParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setAngleParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setAngleParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1203 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; goto __pyx_L1;} dJointSetPlane2DAngleParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setAngleParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static int __pyx_f_3ode_10GeomObject___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomObject___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":56 */ ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid = NULL; /* "/home/zefiris/pyode/src/geomobject.pyx":57 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space = Py_None; /* "/home/zefiris/pyode/src/geomobject.pyx":58 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body = Py_None; /* "/home/zefiris/pyode/src/geomobject.pyx":59 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 59; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.__new__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_k84p; static char (__pyx_k84[]) = "The GeomObject base class can't be used directly."; static int __pyx_f_3ode_10GeomObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":62 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k84p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static void __pyx_f_3ode_10GeomObject___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_10GeomObject___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":65 */ __pyx_1 = (((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/geomobject.pyx":66 */ dGeomDestroy(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); /* "/home/zefiris/pyode/src/geomobject.pyx":67 */ ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid = NULL; goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k85p; static char (__pyx_k85[]) = "geom has no attribute '%s'."; static PyObject *__pyx_f_3ode_10GeomObject___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_10GeomObject___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/geomobject.pyx":70 */ __pyx_1 = PySequence_Contains(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; goto __pyx_L1;} if (__pyx_1) { /* "/home/zefiris/pyode/src/geomobject.pyx":71 */ __pyx_2 = PyObject_GetItem(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/geomobject.pyx":73 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k85p, __pyx_v_name); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_10GeomObject___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_val); /*proto*/ static int __pyx_f_3ode_10GeomObject___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_val) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_val); /* "/home/zefiris/pyode/src/geomobject.pyx":76 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 76; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomObject.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_val); return __pyx_r; } static PyObject *__pyx_k86p; static char (__pyx_k86[]) = "Bug: The _id() method is not implemented."; static PyObject *__pyx_f_3ode_10GeomObject__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject__id[] = "_id() -> int\n\n Return the internal id of the geom (dGeomID) as returned by\n the dCreateXyz() functions.\n\n This method has to be overwritten in derived methods. \n "; static PyObject *__pyx_f_3ode_10GeomObject__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":86 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k86p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_placeable[] = "placeable() -> bool\n\n Returns True if the geom object is a placeable geom.\n\n This method has to be overwritten in derived methods.\n "; static PyObject *__pyx_f_3ode_10GeomObject_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":95 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_placeable; static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k87p; static char (__pyx_k87[]) = "Non-placeable geoms cannot have a body associated to them."; static PyObject *__pyx_f_3ode_10GeomObject_setBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setBody[] = "setBody(body)\n\n Set the body associated with a placeable geom.\n\n @param body: The Body object or None.\n @type body: Body\n "; static PyObject *__pyx_f_3ode_10GeomObject_setBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; static char *__pyx_argnames[] = {"body",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_body)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_body); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body), __pyx_ptype_3ode_Body, 1, "body")) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 97; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geomobject.pyx":106 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":107 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 107; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k87p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 107; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":109 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body), Py_None, &__pyx_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; goto __pyx_L1;} __pyx_3 = __pyx_3 == 0; if (__pyx_3) { /* "/home/zefiris/pyode/src/geomobject.pyx":110 */ dGeomSetBody(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,NULL); goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/geomobject.pyx":112 */ dGeomSetBody(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_body->bid); } __pyx_L3:; /* "/home/zefiris/pyode/src/geomobject.pyx":113 */ Py_INCREF(((PyObject *)__pyx_v_body)); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body = ((PyObject *)__pyx_v_body); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_body); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getBody[] = "getBody() -> Body\n\n Get the body associated with this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":120 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":121 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":123 */ Py_INCREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); __pyx_r = ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.getBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k88p; static char (__pyx_k88[]) = "Cannot set a position on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setPosition[] = "setPosition(pos)\n\n Set the position of the geom. If the geom is attached to a body,\n the body\'s position will also be changed.\n\n @param pos: Position\n @type pos: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/geomobject.pyx":134 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":135 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 135; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k88p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 135; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":136 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; dGeomSetPosition(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_5,__pyx_6,__pyx_7); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_k89p; static char (__pyx_k89[]) = "Non-placeable geoms do not have a position."; static PyObject *__pyx_f_3ode_10GeomObject_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getPosition[] = "getPosition() -> 3-tuple\n\n Get the current position of the geom. If the geom is attached to\n a body the returned value is the body\'s position.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":144 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":145 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k89p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":148 */ __pyx_v_p = ((dReal (*))dGeomGetPosition(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); /* "/home/zefiris/pyode/src/geomobject.pyx":149 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_1); PyTuple_SET_ITEM(__pyx_6, 2, __pyx_5); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_r = __pyx_6; __pyx_6 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("ode.GeomObject.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k90p; static char (__pyx_k90[]) = "Cannot set a rotation on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setRotation[] = "setRotation(R)\n\n Set the orientation of the geom. If the geom is attached to a body,\n the body\'s orientation will also be changed.\n\n @param R: Rotation matrix\n @type R: 9-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_R = 0; dMatrix3 __pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"R",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_R)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_R); /* "/home/zefiris/pyode/src/geomobject.pyx":160 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":161 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 161; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k90p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 161; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":164 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[0]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":165 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[1]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":166 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[2]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":167 */ (__pyx_v_m[3]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":168 */ __pyx_2 = PyInt_FromLong(3); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[4]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":169 */ __pyx_2 = PyInt_FromLong(4); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[5]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":170 */ __pyx_2 = PyInt_FromLong(5); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[6]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":171 */ (__pyx_v_m[7]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":172 */ __pyx_2 = PyInt_FromLong(6); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[8]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":173 */ __pyx_2 = PyInt_FromLong(7); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[9]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":174 */ __pyx_2 = PyInt_FromLong(8); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[10]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":175 */ (__pyx_v_m[11]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":176 */ dGeomSetRotation(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_m); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_R); return __pyx_r; } static PyObject *__pyx_k91p; static char (__pyx_k91[]) = "Non-placeable geoms do not have a rotation."; static PyObject *__pyx_f_3ode_10GeomObject_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getRotation[] = "getRotation() -> 9-tuple\n\n Get the current orientation of the geom. If the geom is attached to\n a body the returned value is the body\'s orientation.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_m); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; PyObject *__pyx_11 = 0; PyObject *__pyx_12 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":184 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":185 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k91p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":188 */ __pyx_v_m = ((dReal (*))dGeomGetRotation(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); /* "/home/zefiris/pyode/src/geomobject.pyx":189 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_m[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_m[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_m[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_m[4])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_m[5])); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_8 = PyFloat_FromDouble((__pyx_v_m[6])); if (!__pyx_8) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_9 = PyFloat_FromDouble((__pyx_v_m[8])); if (!__pyx_9) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_10 = PyFloat_FromDouble((__pyx_v_m[9])); if (!__pyx_10) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_11 = PyFloat_FromDouble((__pyx_v_m[10])); if (!__pyx_11) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_12 = PyList_New(9); if (!__pyx_12) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} PyList_SET_ITEM(__pyx_12, 0, __pyx_2); PyList_SET_ITEM(__pyx_12, 1, __pyx_1); PyList_SET_ITEM(__pyx_12, 2, __pyx_5); PyList_SET_ITEM(__pyx_12, 3, __pyx_6); PyList_SET_ITEM(__pyx_12, 4, __pyx_7); PyList_SET_ITEM(__pyx_12, 5, __pyx_8); PyList_SET_ITEM(__pyx_12, 6, __pyx_9); PyList_SET_ITEM(__pyx_12, 7, __pyx_10); PyList_SET_ITEM(__pyx_12, 8, __pyx_11); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_8 = 0; __pyx_9 = 0; __pyx_10 = 0; __pyx_11 = 0; __pyx_r = __pyx_12; __pyx_12 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); Py_XDECREF(__pyx_11); Py_XDECREF(__pyx_12); __Pyx_AddTraceback("ode.GeomObject.getRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k92p; static char (__pyx_k92[]) = "Non-placeable geoms do not have an orientation."; static PyObject *__pyx_f_3ode_10GeomObject_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getQuaternion[] = "getQuaternion() -> (w,x,y,z)\n\n Get the current orientation of the geom. If the geom is attached to\n a body the returned value is the body\'s orientation.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dQuaternion __pyx_v_q; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":197 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":198 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k92p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":201 */ dGeomGetQuaternion(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_q); /* "/home/zefiris/pyode/src/geomobject.pyx":202 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_q[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_q[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_q[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_q[3])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_7 = PyTuple_New(4); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_5); PyTuple_SET_ITEM(__pyx_7, 3, __pyx_6); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.GeomObject.getQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k93p; static char (__pyx_k93[]) = "Cannot set a quaternion on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setQuaternion[] = "setQuaternion(q)\n\n Set the orientation of the geom. If the geom is attached to a body,\n the body\'s orientation will also be changed.\n\n @param q: Quaternion (w,x,y,z)\n @type q: 4-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_q = 0; dQuaternion __pyx_v_cq; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"q",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_q)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_q); /* "/home/zefiris/pyode/src/geomobject.pyx":213 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":214 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 214; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k93p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 214; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":217 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[0]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":218 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[1]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":219 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[2]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":220 */ __pyx_2 = PyInt_FromLong(3); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[3]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":221 */ dGeomSetQuaternion(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_cq); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_q); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getAABB(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getAABB[] = "getAABB() -> 6-tuple\n\n Return an axis aligned bounding box that surrounds the geom.\n The return value is a 6-tuple (minx, maxx, miny, maxy, minz, maxz).\n "; static PyObject *__pyx_f_3ode_10GeomObject_getAABB(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (__pyx_v_aabb[6]); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":231 */ dGeomGetAABB(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_aabb); /* "/home/zefiris/pyode/src/geomobject.pyx":232 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_aabb[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_aabb[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_aabb[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_aabb[3])); if (!__pyx_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_aabb[4])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_aabb[5])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_7 = PyTuple_New(6); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_7, 3, __pyx_4); PyTuple_SET_ITEM(__pyx_7, 4, __pyx_5); PyTuple_SET_ITEM(__pyx_7, 5, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.GeomObject.getAABB"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_isSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_isSpace[] = "isSpace() -> bool\n\n Return 1 if the given geom is a space, or 0 if not."; static PyObject *__pyx_f_3ode_10GeomObject_isSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":238 */ __pyx_1 = PyInt_FromLong(dGeomIsSpace(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.isSpace"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getSpace[] = "getSpace() -> Space\n\n Return the space that the given geometry is contained in,\n or return None if it is not contained in any space."; static PyObject *__pyx_f_3ode_10GeomObject_getSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":245 */ Py_INCREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space); __pyx_r = ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_long; static PyObject *__pyx_f_3ode_10GeomObject_setCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setCollideBits[] = "setCollideBits(bits)\n\n Set the \"collide\" bitfields for this geom.\n\n @param bits: Collide bit field\n @type bits: int/long\n "; static PyObject *__pyx_f_3ode_10GeomObject_setCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bits = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; unsigned long __pyx_4; static char *__pyx_argnames[] = {"bits",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bits)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bits); /* "/home/zefiris/pyode/src/geomobject.pyx":255 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_INCREF(__pyx_v_bits); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bits); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dGeomSetCollideBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.setCollideBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bits); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_setCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setCategoryBits[] = "setCategoryBits(bits)\n\n Set the \"category\" bitfields for this geom.\n\n @param bits: Category bit field\n @type bits: int/long\n "; static PyObject *__pyx_f_3ode_10GeomObject_setCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bits = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; unsigned long __pyx_4; static char *__pyx_argnames[] = {"bits",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bits)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bits); /* "/home/zefiris/pyode/src/geomobject.pyx":265 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_INCREF(__pyx_v_bits); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bits); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dGeomSetCategoryBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.setCategoryBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bits); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getCollideBits[] = "getCollideBits() -> long\n\n Return the \"collide\" bitfields for this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":272 */ __pyx_1 = PyLong_FromUnsignedLong(dGeomGetCollideBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 272; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.getCollideBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getCategoryBits[] = "getCategoryBits() -> long\n\n Return the \"category\" bitfields for this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":279 */ __pyx_1 = PyLong_FromUnsignedLong(dGeomGetCategoryBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.getCategoryBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_enable[] = "enable()\n\n Enable the geom."; static PyObject *__pyx_f_3ode_10GeomObject_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":285 */ dGeomEnable(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_disable[] = "disable()\n\n Disable the geom."; static PyObject *__pyx_f_3ode_10GeomObject_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":291 */ dGeomDisable(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_isEnabled[] = "isEnabled() -> bool\n\n Return True if the geom is enabled."; static PyObject *__pyx_f_3ode_10GeomObject_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":297 */ __pyx_1 = PyInt_FromLong(dGeomIsEnabled(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 297; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.isEnabled"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_space; static PyObject *__pyx_n_idx; static PyObject *__pyx_f_3ode_14_SpaceIterator___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator___init__ = {"__init__", (PyCFunction)__pyx_f_3ode_14_SpaceIterator___init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_space = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"self","space",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_space)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":28 */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_space, __pyx_v_space) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":29 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_v_self, __pyx_n_idx, __pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode._SpaceIterator.__init__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_14_SpaceIterator___iter__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator___iter__ = {"__iter__", (PyCFunction)__pyx_f_3ode_14_SpaceIterator___iter__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator___iter__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":32 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_getNumGeoms; static PyObject *__pyx_n_StopIteration; static PyObject *__pyx_n_getGeom; static PyObject *__pyx_f_3ode_14_SpaceIterator_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator_next = {"next", (PyCFunction)__pyx_f_3ode_14_SpaceIterator_next, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; int __pyx_4; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_res = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":35 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_space); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_getNumGeoms); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_4 = __pyx_4 >= 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/space.pyx":36 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; goto __pyx_L1;} __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; goto __pyx_L1;} goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/space.pyx":38 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_space); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_getGeom); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_res); __pyx_v_res = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":39 */ __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_3 = PyNumber_Add(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_idx, __pyx_3) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":40 */ Py_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode._SpaceIterator.next"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_res); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9SpaceBase___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9SpaceBase___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":70 */ __pyx_r = 0; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF((PyObject *)__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_k94p; static char (__pyx_k94[]) = "The SpaceBase class can't be used directly."; static int __pyx_f_3ode_9SpaceBase___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9SpaceBase___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":73 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k94p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF((PyObject *)__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static void __pyx_f_3ode_9SpaceBase___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_9SpaceBase___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":76 */ __pyx_1 = (((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->__pyx_base.gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":77 */ dSpaceDestroy(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid); /* "/home/zefiris/pyode/src/space.pyx":78 */ ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid = NULL; /* "/home/zefiris/pyode/src/space.pyx":79 */ ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->__pyx_base.gid = NULL; goto __pyx_L2; } __pyx_L2:; Py_DECREF((PyObject *)__pyx_v_self); } static PyObject *__pyx_f_3ode_9SpaceBase__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9SpaceBase__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":102 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid); /* "/home/zefiris/pyode/src/space.pyx":103 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 103; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9SpaceBase___len__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_f_3ode_9SpaceBase___len__(PyObject *__pyx_v_self) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":106 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getNumGeoms); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SpaceBase.__len__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase___iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_3ode_9SpaceBase___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":109 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__SpaceIterator); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.SpaceBase.__iter__"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_add[] = "add(geom)\n\n Add a geom to a space. This does nothing if the geom is\n already in the space.\n\n @param geom: Geom object to add\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":121 */ dSpaceAdd(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SpaceBase.add"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_remove[] = "remove(geom)\n\n Remove a geom from a space.\n\n @param geom: Geom object to remove\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 123; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":131 */ dSpaceRemove(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SpaceBase.remove"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_query[] = "query(geom) -> bool\n\n Return True if the given geom is in the space.\n\n @param geom: Geom object to check\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 133; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":141 */ __pyx_1 = PyInt_FromLong(dSpaceQuery(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.query"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_getNumGeoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_getNumGeoms[] = "getNumGeoms() -> int\n\n Return the number of geoms contained within the space.\n "; static PyObject *__pyx_f_3ode_9SpaceBase_getNumGeoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":148 */ __pyx_1 = PyInt_FromLong(dSpaceGetNumGeoms(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid)); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.getNumGeoms"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_RuntimeError; static PyObject *__pyx_k95p; static PyObject *__pyx_k96p; static char (__pyx_k95[]) = "geom index out of range"; static char (__pyx_k96[]) = "geom id cannot be translated to a Python object"; static PyObject *__pyx_f_3ode_9SpaceBase_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_getGeom[] = "getGeom(idx) -> GeomObject\n\n Return the geom with the given index contained within the space.\n\n @param idx: Geom index (0,1,...,getNumGeoms()-1)\n @type idx: int\n "; static PyObject *__pyx_f_3ode_9SpaceBase_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_idx; dGeomID __pyx_v_gid; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"idx",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_idx)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":161 */ __pyx_1 = (__pyx_v_idx < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_idx >= dSpaceGetNumGeoms(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid)); } if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":162 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k95p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":164 */ __pyx_v_gid = dSpaceGetGeom(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_idx); /* "/home/zefiris/pyode/src/space.pyx":165 */ __pyx_2 = PyInt_FromLong(((long )__pyx_v_gid)); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = PySequence_Contains(__pyx_3, __pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = !__pyx_1; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":166 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 166; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k96p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 166; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/space.pyx":168 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(((long )__pyx_v_gid)); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_4 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SpaceBase.getGeom"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_collide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_collide[] = "collide(arg, callback)\n\n Call a callback function one or more times, for all\n potentially intersecting objects in the space. The callback\n function takes 3 arguments:\n\n def NearCallback(arg, geom1, geom2):\n\n The arg parameter is just passed on to the callback function.\n Its meaning is user defined. The geom1 and geom2 arguments are\n the geometry objects that may be near each other. The callback\n function can call the function collide() (not the Space\n method) on geom1 and geom2, perhaps first determining\n whether to collide them at all based on other information.\n\n @param arg: A user argument that is passed to the callback function\n @param callback: Callback function\n @type callback: callable\n "; static PyObject *__pyx_f_3ode_9SpaceBase_collide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_v_callback = 0; void (*__pyx_v_data); PyObject *__pyx_v_tup; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"arg","callback",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_arg, &__pyx_v_callback)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_arg); Py_INCREF(__pyx_v_callback); __pyx_v_tup = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":193 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 193; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_arg); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":194 */ __pyx_v_data = ((void (*))__pyx_v_tup); /* "/home/zefiris/pyode/src/space.pyx":195 */ dSpaceCollide(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_data,__pyx_f_3ode_collide_callback); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.collide"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_callback); return __pyx_r; } static void __pyx_f_3ode_collide_callback(void (*__pyx_v_data),dGeomID __pyx_v_o1,dGeomID __pyx_v_o2) { PyObject *__pyx_v_tup; long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_v_callback; PyObject *__pyx_v_arg; PyObject *__pyx_v_g1; PyObject *__pyx_v_g2; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; __pyx_v_tup = Py_None; Py_INCREF(Py_None); __pyx_v_callback = Py_None; Py_INCREF(Py_None); __pyx_v_arg = Py_None; Py_INCREF(Py_None); __pyx_v_g1 = Py_None; Py_INCREF(Py_None); __pyx_v_g2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":211 */ __pyx_1 = (PyObject *)__pyx_v_data; Py_INCREF(__pyx_1); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":212 */ __pyx_1 = PyObject_GetIter(__pyx_v_tup); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_v_callback); __pyx_v_callback = __pyx_2; __pyx_2 = 0; __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_v_arg); __pyx_v_arg = __pyx_2; __pyx_2 = 0; if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":213 */ __pyx_v_id1 = ((long )__pyx_v_o1); /* "/home/zefiris/pyode/src/space.pyx":214 */ __pyx_v_id2 = ((long )__pyx_v_o2); /* "/home/zefiris/pyode/src/space.pyx":215 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(__pyx_v_id1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_g1); __pyx_v_g1 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":216 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(__pyx_v_id2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_g2); __pyx_v_g2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":217 */ __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; goto __pyx_L1;} Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_arg); Py_INCREF(__pyx_v_g1); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_g1); Py_INCREF(__pyx_v_g2); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_g2); __pyx_1 = PyObject_CallObject(__pyx_v_callback, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_WriteUnraisable("ode.collide_callback"); __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF(__pyx_v_callback); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); } static int __pyx_f_3ode_11SimpleSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SimpleSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k25; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":237 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":238 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":239 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 239; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":240 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":242 */ ((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid = dSimpleSpaceCreate(__pyx_v_parentid); /* "/home/zefiris/pyode/src/space.pyx":245 */ ((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":247 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":248 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.SimpleSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_11SimpleSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SimpleSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k26; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":251 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_9HashSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9HashSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k27; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":270 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":271 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":272 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 272; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":273 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":275 */ ((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid = dHashSpaceCreate(__pyx_v_parentid); /* "/home/zefiris/pyode/src/space.pyx":278 */ ((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":280 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":281 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.HashSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_9HashSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9HashSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k28; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":284 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_k97p; static char (__pyx_k97[]) = "minlevel (%d) must be less than or equal to maxlevel (%d)"; static PyObject *__pyx_f_3ode_9HashSpace_setLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9HashSpace_setLevels[] = "setLevels(minlevel, maxlevel)\n\n Sets the size of the smallest and largest cell used in the\n hash table. The actual size will be 2^minlevel and 2^maxlevel\n respectively.\n "; static PyObject *__pyx_f_3ode_9HashSpace_setLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_minlevel; int __pyx_v_maxlevel; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"minlevel","maxlevel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii", __pyx_argnames, &__pyx_v_minlevel, &__pyx_v_maxlevel)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":294 */ __pyx_1 = (__pyx_v_minlevel > __pyx_v_maxlevel); if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":295 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_minlevel); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(__pyx_v_maxlevel); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_3 = 0; __pyx_4 = 0; __pyx_3 = PyNumber_Remainder(__pyx_k97p, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":297 */ dHashSpaceSetLevels(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,__pyx_v_minlevel,__pyx_v_maxlevel); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.HashSpace.setLevels"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9HashSpace_getLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9HashSpace_getLevels[] = "getLevels() -> (minlevel, maxlevel)\n\n Gets the size of the smallest and largest cell used in the\n hash table. The actual size is 2^minlevel and 2^maxlevel\n respectively.\n "; static PyObject *__pyx_f_3ode_9HashSpace_getLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_minlevel; int __pyx_v_maxlevel; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":309 */ dHashSpaceGetLevels(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,(&__pyx_v_minlevel),(&__pyx_v_maxlevel)); /* "/home/zefiris/pyode/src/space.pyx":310 */ __pyx_1 = PyInt_FromLong(__pyx_v_minlevel); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(__pyx_v_maxlevel); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.HashSpace.getLevels"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_13QuadTreeSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13QuadTreeSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_center = 0; PyObject *__pyx_v_extents = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; dVector3 __pyx_v_c; dVector3 __pyx_v_e; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; static char *__pyx_argnames[] = {"center","extents","depth","space",0}; __pyx_v_space = __pyx_k29; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_center, &__pyx_v_extents, &__pyx_v_depth, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_center); Py_INCREF(__pyx_v_extents); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":331 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":332 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 332; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":333 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 333; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":334 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":336 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[0]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":337 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[1]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":338 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[2]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":339 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[0]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":340 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[1]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":341 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[2]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":342 */ __pyx_1 = PyInt_AsLong(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 342; goto __pyx_L1;} ((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid = dQuadTreeSpaceCreate(__pyx_v_parentid,__pyx_v_c,__pyx_v_e,__pyx_1); /* "/home/zefiris/pyode/src/space.pyx":345 */ ((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":347 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":348 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.QuadTreeSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_center); Py_DECREF(__pyx_v_extents); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_13QuadTreeSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13QuadTreeSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_center = 0; PyObject *__pyx_v_extents = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"center","extents","depth","space",0}; __pyx_v_space = __pyx_k30; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_center, &__pyx_v_extents, &__pyx_v_depth, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_center); Py_INCREF(__pyx_v_extents); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":351 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_center); Py_DECREF(__pyx_v_extents); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_k98p; static char (__pyx_k98[]) = "Unknown space type (%d)"; static PyObject *__pyx_f_3ode_Space(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_Space[] = "Space factory function.\n\n Depending on the type argument this function either returns a\n SimpleSpace (type=0) or a HashSpace (type=1).\n\n This function is provided to remain compatible with previous\n versions of PyODE where there was only one Space class.\n \n >>> space = Space(type=0) # Create a SimpleSpace\n >>> space = Space(type=1) # Create a HashSpace\n "; static PyObject *__pyx_f_3ode_Space(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_type = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"type",0}; __pyx_v_type = __pyx_k31; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_type)) return 0; Py_INCREF(__pyx_v_type); /* "/home/zefiris/pyode/src/space.pyx":366 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 366; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 366; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/space.pyx":367 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_SimpleSpace), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/space.pyx":369 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_HashSpace), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 369; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/space.pyx":371 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k98p, __pyx_v_type); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_3, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Space"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_type); return __pyx_r; } static int __pyx_f_3ode_10GeomSphere___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomSphere___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"space","radius",0}; __pyx_v_space = __pyx_k32; __pyx_v_radius = __pyx_k33; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":37 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":38 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":39 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 39; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":40 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":41 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 41; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid = dCreateSphere(__pyx_v_sid,__pyx_2); /* "/home/zefiris/pyode/src/geoms.pyx":45 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} if (PyObject_SetItem(__pyx_3, __pyx_4, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomSphere.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); return __pyx_r; } static int __pyx_f_3ode_10GeomSphere___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomSphere___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius",0}; __pyx_v_space = __pyx_k34; __pyx_v_radius = __pyx_k35; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/geoms.pyx":49 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":50 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_n_True; static PyObject *__pyx_f_3ode_10GeomSphere_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_10GeomSphere_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":53 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_10GeomSphere__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":57 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":58 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_setRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_setRadius[] = "setRadius(radius)\n\n Set the radius of the sphere.\n\n @param radius: New radius\n @type radius: float\n "; static PyObject *__pyx_f_3ode_10GeomSphere_setRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_radius)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/geoms.pyx":68 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; goto __pyx_L1;} dGeomSphereSetRadius(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomSphere.setRadius"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_getRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_getRadius[] = "getRadius() -> float\n\n Return the radius of the sphere.\n "; static PyObject *__pyx_f_3ode_10GeomSphere_getRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":75 */ __pyx_1 = PyFloat_FromDouble(dGeomSphereGetRadius(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere.getRadius"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the sphere. Points inside\n the geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomSphere_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":88 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomSpherePointDepth(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomSphere.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_7GeomBox___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomBox___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_lengths = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; static char *__pyx_argnames[] = {"space","lengths",0}; __pyx_v_space = __pyx_k36; __pyx_v_lengths = __pyx_k37; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_lengths)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_lengths); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":106 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":107 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 107; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":108 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 108; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":109 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":110 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid = dCreateBox(__pyx_v_sid,__pyx_4,__pyx_5,__pyx_6); /* "/home/zefiris/pyode/src/geoms.pyx":114 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomBox.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static int __pyx_f_3ode_7GeomBox___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomBox___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_lengths = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","lengths",0}; __pyx_v_space = __pyx_k38; __pyx_v_lengths = __pyx_k39; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_lengths)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_lengths); /* "/home/zefiris/pyode/src/geoms.pyx":117 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":118 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":121 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomBox.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":125 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":126 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomBox._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_setLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_setLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lengths = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"lengths",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_lengths)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_lengths); /* "/home/zefiris/pyode/src/geoms.pyx":129 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dGeomBoxSetLengths(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomBox.setLengths"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_getLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_getLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":133 */ dGeomBoxGetLengths(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_v_res); /* "/home/zefiris/pyode/src/geoms.pyx":134 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomBox.getLengths"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7GeomBox_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the box. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_7GeomBox_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":147 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomBoxPointDepth(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomBox.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_9GeomPlane___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9GeomPlane___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; static char *__pyx_argnames[] = {"space","normal","dist",0}; __pyx_v_space = __pyx_k40; __pyx_v_normal = __pyx_k41; __pyx_v_dist = __pyx_k42; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_normal, &__pyx_v_dist)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":170 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":171 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 171; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":172 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":173 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":174 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_v_dist); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid = dCreatePlane(__pyx_v_sid,__pyx_4,__pyx_5,__pyx_6,__pyx_7); /* "/home/zefiris/pyode/src/geoms.pyx":178 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomPlane.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static int __pyx_f_3ode_9GeomPlane___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9GeomPlane___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","normal","dist",0}; __pyx_v_space = __pyx_k43; __pyx_v_normal = __pyx_k44; __pyx_v_dist = __pyx_k45; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_normal, &__pyx_v_dist)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); /* "/home/zefiris/pyode/src/geoms.pyx":182 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":187 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":188 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 188; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomPlane._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; static char *__pyx_argnames[] = {"normal","dist",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_normal, &__pyx_v_dist)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); /* "/home/zefiris/pyode/src/geoms.pyx":191 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_v_dist); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} dGeomPlaneSetParams(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5,__pyx_6); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomPlane.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector4 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":195 */ dGeomPlaneGetParams(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_v_res); /* "/home/zefiris/pyode/src/geoms.pyx":196 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_res[3])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1); __pyx_4 = 0; __pyx_1 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomPlane.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9GeomPlane_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the plane. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_9GeomPlane_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":209 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomPlanePointDepth(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomPlane.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_11GeomCapsule___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomCapsule___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; dReal __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k46; __pyx_v_radius = __pyx_k47; __pyx_v_length = __pyx_k48; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":230 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":231 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":232 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 232; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":233 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":234 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 234; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 234; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid = dCreateCapsule(__pyx_v_sid,__pyx_2,__pyx_3); /* "/home/zefiris/pyode/src/geoms.pyx":238 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_5 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} if (PyObject_SetItem(__pyx_4, __pyx_5, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomCapsule.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static int __pyx_f_3ode_11GeomCapsule___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomCapsule___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k49; __pyx_v_radius = __pyx_k50; __pyx_v_length = __pyx_k51; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":241 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":242 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":245 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 245; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCapsule.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":249 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":250 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCapsule._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"radius","length",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_radius, &__pyx_v_length)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":253 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 253; goto __pyx_L1;} dGeomCapsuleSetParams(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomCapsule.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal __pyx_v_radius; dReal __pyx_v_length; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":257 */ dGeomCapsuleGetParams(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,(&__pyx_v_radius),(&__pyx_v_length)); /* "/home/zefiris/pyode/src/geoms.pyx":258 */ __pyx_1 = PyFloat_FromDouble(__pyx_v_radius); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(__pyx_v_length); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomCapsule.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11GeomCapsule_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the cylinder. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_11GeomCapsule_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":271 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomCapsulePointDepth(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomCapsule.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_12GeomCylinder___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12GeomCylinder___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; dReal __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k52; __pyx_v_radius = __pyx_k53; __pyx_v_length = __pyx_k54; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":292 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":293 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 293; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":294 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 294; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":295 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":296 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 296; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 296; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid = dCreateCylinder(__pyx_v_sid,__pyx_2,__pyx_3); /* "/home/zefiris/pyode/src/geoms.pyx":300 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} __pyx_5 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} if (PyObject_SetItem(__pyx_4, __pyx_5, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomCylinder.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static int __pyx_f_3ode_12GeomCylinder___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12GeomCylinder___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k55; __pyx_v_radius = __pyx_k56; __pyx_v_length = __pyx_k57; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":303 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":304 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":307 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCylinder.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":311 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":312 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 312; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCylinder._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"radius","length",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_radius, &__pyx_v_length)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":315 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 315; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 315; goto __pyx_L1;} dGeomCylinderSetParams(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomCylinder.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal __pyx_v_radius; dReal __pyx_v_length; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":319 */ dGeomCylinderGetParams(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid,(&__pyx_v_radius),(&__pyx_v_length)); /* "/home/zefiris/pyode/src/geoms.pyx":320 */ __pyx_1 = PyFloat_FromDouble(__pyx_v_radius); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(__pyx_v_length); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomCylinder.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_7GeomRay___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomRay___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_rlen = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"space","rlen",0}; __pyx_v_space = __pyx_k58; __pyx_v_rlen = __pyx_k59; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_rlen)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_rlen); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":344 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":345 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":346 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 346; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":347 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":348 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_rlen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 348; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid = dCreateRay(__pyx_v_sid,__pyx_2); /* "/home/zefiris/pyode/src/geoms.pyx":352 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} if (PyObject_SetItem(__pyx_3, __pyx_4, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomRay.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static int __pyx_f_3ode_7GeomRay___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomRay___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_rlen = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","rlen",0}; __pyx_v_space = __pyx_k60; __pyx_v_rlen = __pyx_k61; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_rlen)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_rlen); /* "/home/zefiris/pyode/src/geoms.pyx":356 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":357 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":361 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":362 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomRay._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_setLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_setLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rlen = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"rlen",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_rlen)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_rlen); /* "/home/zefiris/pyode/src/geoms.pyx":365 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_rlen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 365; goto __pyx_L1;} dGeomRaySetLength(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomRay.setLength"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_getLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_getLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":368 */ __pyx_1 = PyFloat_FromDouble(dGeomRayGetLength(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 368; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomRay.getLength"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_v_u = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"p","u",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_p, &__pyx_v_u)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); Py_INCREF(__pyx_v_u); /* "/home/zefiris/pyode/src/geoms.pyx":371 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dGeomRaySet(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomRay.set"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); Py_DECREF(__pyx_v_u); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_start; dVector3 __pyx_v_dir; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":376 */ dGeomRayGet(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_v_start,__pyx_v_dir); /* "/home/zefiris/pyode/src/geoms.pyx":377 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_start[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_start[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_start[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_dir[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_dir[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_dir[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_5); __pyx_4 = 0; __pyx_5 = 0; __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomRay.get"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_13GeomTransform___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13GeomTransform___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k62; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":399 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":400 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 400; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":401 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 401; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":402 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":403 */ ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid = dCreateGeomTransform(__pyx_v_sid); /* "/home/zefiris/pyode/src/geoms.pyx":406 */ dGeomTransformSetCleanup(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,0); /* "/home/zefiris/pyode/src/geoms.pyx":410 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomTransform.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_13GeomTransform___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13GeomTransform___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k63; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":413 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":414 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.body = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":415 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":417 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 417; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.attribs); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.attribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_13GeomTransform_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":420 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 420; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_13GeomTransform__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":424 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":425 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 425; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k99p; static PyObject *__pyx_k100p; static PyObject *__pyx_k101p; static char (__pyx_k99[]) = "Only placeable geoms can be encapsulated by a GeomTransform"; static char (__pyx_k100[]) = "The encapsulated geom was already inserted into a space."; static char (__pyx_k101[]) = "The encapsulated geom is already associated with a body."; static PyObject *__pyx_f_3ode_13GeomTransform_setGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_setGeom[] = "setGeom(geom)\n\n Set the geom that the geometry transform encapsulates.\n A ValueError exception is thrown if a) the geom is not placeable,\n b) the geom was already inserted into a space or c) the geom is\n already associated with a body.\n\n @param geom: Geom object to encapsulate\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_13GeomTransform_setGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; long __pyx_5; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 0, "geom")) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 427; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geoms.pyx":440 */ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_geom), __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geoms.pyx":441 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 441; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k99p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 441; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":442 */ __pyx_3 = (dGeomGetSpace(__pyx_v_geom->gid) != ((struct dxSpace (*))0)); if (__pyx_3) { /* "/home/zefiris/pyode/src/geoms.pyx":443 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k100p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/geoms.pyx":444 */ __pyx_4 = (dGeomGetBody(__pyx_v_geom->gid) != ((struct dxBody (*))0)); if (__pyx_4) { /* "/home/zefiris/pyode/src/geoms.pyx":445 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 445; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k101p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 445; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; /* "/home/zefiris/pyode/src/geoms.pyx":447 */ __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_geom), __pyx_n__id); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/geoms.pyx":448 */ dGeomTransformSetGeom(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,((struct dxGeom (*))__pyx_v_id)); /* "/home/zefiris/pyode/src/geoms.pyx":449 */ Py_INCREF(((PyObject *)__pyx_v_geom)); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom = ((PyObject *)__pyx_v_geom); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomTransform.setGeom"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_getGeom[] = "getGeom() -> GeomObject\n\n Get the geom that the geometry transform encapsulates.\n "; static PyObject *__pyx_f_3ode_13GeomTransform_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":456 */ Py_INCREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); __pyx_r = ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k102p; static char (__pyx_k102[]) = "Invalid information mode (%d). Must be either 0 or 1."; static PyObject *__pyx_f_3ode_13GeomTransform_setInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_setInfo[] = "setInfo(mode)\n\n Set the \"information\" mode of the geometry transform.\n\n With mode 0, when a transform object is collided with another\n object, the geom field of the ContactGeom structure is set to the\n geom that is encapsulated by the transform object.\n\n With mode 1, the geom field of the ContactGeom structure is set\n to the transform object itself.\n\n @param mode: Information mode (0 or 1)\n @type mode: int\n "; static PyObject *__pyx_f_3ode_13GeomTransform_setInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_mode; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":473 */ __pyx_1 = (__pyx_v_mode < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_mode > 1); } if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":474 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} __pyx_4 = PyNumber_Remainder(__pyx_k102p, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, __pyx_4, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":475 */ dGeomTransformSetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,__pyx_v_mode); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomTransform.setInfo"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_getInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_getInfo[] = "getInfo() -> int\n\n Get the \"information\" mode of the geometry transform (0 or 1).\n\n With mode 0, when a transform object is collided with another\n object, the geom field of the ContactGeom structure is set to the\n geom that is encapsulated by the transform object.\n\n With mode 1, the geom field of the ContactGeom structure is set\n to the transform object itself.\n "; static PyObject *__pyx_f_3ode_13GeomTransform_getInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":489 */ __pyx_1 = PyInt_FromLong(dGeomTransformGetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 489; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.getInfo"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k103p; static char (__pyx_k103[]) = "Trimesh support is disabled"; static int __pyx_f_3ode_11TriMeshData___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11TriMeshData___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "src/trimesh_dummy.pyx":33 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 33; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k103p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[8]; __pyx_lineno = 33; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.TriMeshData.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k104p; static char (__pyx_k104[]) = "Trimesh support is disabled"; static int __pyx_f_3ode_11GeomTriMesh___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomTriMesh___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_TriMeshData *__pyx_v_data = 0; PyObject *__pyx_v_space = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"data","space",0}; __pyx_v_space = __pyx_k64; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_data, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_data); Py_INCREF(__pyx_v_space); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_3ode_TriMeshData, 0, "data")) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; goto __pyx_L1;} /* "src/trimesh_dummy.pyx":43 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 43; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k104p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[8]; __pyx_lineno = 43; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTriMesh.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_data); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_collide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_collide[] = "collide(geom1, geom2) -> contacts\n\n Generate contact information for two objects.\n\n Given two geometry objects that potentially touch (geom1 and geom2),\n generate contact information for them. Internally, this just calls\n the correct class-specific collision functions for geom1 and geom2.\n\n [flags specifies how contacts should be generated if the objects\n touch. Currently the lower 16 bits of flags specifies the maximum\n number of contact points to generate. If this number is zero, this\n function just pretends that it is one - in other words you can not\n ask for zero contacts. All other bits in flags must be zero. In\n the future the other bits may be used to select other contact\n generation strategies.]\n\n If the objects touch, this returns a list of Contact objects,\n otherwise it returns an empty list.\n\n @param geom1: First Geom\n @type geom1: GeomObject\n @param geom2: Second Geom\n @type geom2: GeomObject\n @returns: Returns a list of Contact objects.\n "; static PyObject *__pyx_f_3ode_collide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geom1 = 0; PyObject *__pyx_v_geom2 = 0; dContactGeom (__pyx_v_c[150]); long __pyx_v_id1; long __pyx_v_id2; int __pyx_v_i; int __pyx_v_n; struct __pyx_obj_3ode_Contact *__pyx_v_cont; PyObject *__pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; long __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"geom1","geom2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_geom1, &__pyx_v_geom2)) return 0; Py_INCREF(__pyx_v_geom1); Py_INCREF(__pyx_v_geom2); __pyx_v_cont = ((struct __pyx_obj_3ode_Contact *)Py_None); Py_INCREF(Py_None); __pyx_v_res = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/ode.pyx":219 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 219; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id1 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":220 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 220; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id2 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":222 */ __pyx_v_n = dCollide(((struct dxGeom (*))__pyx_v_id1),((struct dxGeom (*))__pyx_v_id2),150,__pyx_v_c,(sizeof(dContactGeom ))); /* "/home/zefiris/pyode/src/ode.pyx":223 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; goto __pyx_L1;} Py_DECREF(__pyx_v_res); __pyx_v_res = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":224 */ __pyx_v_i = 0; /* "/home/zefiris/pyode/src/ode.pyx":225 */ while (1) { __pyx_4 = (__pyx_v_i < __pyx_v_n); if (!__pyx_4) break; /* "/home/zefiris/pyode/src/ode.pyx":226 */ __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_Contact), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 226; goto __pyx_L1;} if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_3ode_Contact)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_cont)); __pyx_v_cont = ((struct __pyx_obj_3ode_Contact *)__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/ode.pyx":227 */ __pyx_v_cont->_contact.geom = (__pyx_v_c[__pyx_v_i]); /* "/home/zefiris/pyode/src/ode.pyx":228 */ __pyx_1 = PyObject_GetAttr(__pyx_v_res, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_cont)); PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_cont)); __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/ode.pyx":229 */ __pyx_v_i = (__pyx_v_i + 1); } /* "/home/zefiris/pyode/src/ode.pyx":231 */ Py_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.collide"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_cont); Py_DECREF(__pyx_v_res); Py_DECREF(__pyx_v_geom1); Py_DECREF(__pyx_v_geom2); return __pyx_r; } static PyObject *__pyx_f_3ode_collide2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_collide2[] = "collide2(geom1, geom2, arg, callback)\n \n Calls the callback for all potentially intersecting pairs that contain\n one geom from geom1 and one geom from geom2.\n\n @param geom1: First Geom\n @type geom1: GeomObject\n @param geom2: Second Geom\n @type geom2: GeomObject\n @param arg: A user argument that is passed to the callback function\n @param callback: Callback function\n @type callback: callable \n "; static PyObject *__pyx_f_3ode_collide2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geom1 = 0; PyObject *__pyx_v_geom2 = 0; PyObject *__pyx_v_arg = 0; PyObject *__pyx_v_callback = 0; void (*__pyx_v_data); PyObject *__pyx_v_tup; long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; long __pyx_3; static char *__pyx_argnames[] = {"geom1","geom2","arg","callback",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_geom1, &__pyx_v_geom2, &__pyx_v_arg, &__pyx_v_callback)) return 0; Py_INCREF(__pyx_v_geom1); Py_INCREF(__pyx_v_geom2); Py_INCREF(__pyx_v_arg); Py_INCREF(__pyx_v_callback); __pyx_v_tup = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/ode.pyx":252 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 252; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 252; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 252; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id1 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":253 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id2 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":255 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 255; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_arg); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":256 */ __pyx_v_data = ((void (*))__pyx_v_tup); /* "/home/zefiris/pyode/src/ode.pyx":258 */ dSpaceCollide2(((struct dxGeom (*))__pyx_v_id1),((struct dxGeom (*))__pyx_v_id2),__pyx_v_data,__pyx_f_3ode_collide_callback); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.collide2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF(__pyx_v_geom1); Py_DECREF(__pyx_v_geom2); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_callback); return __pyx_r; } static PyObject *__pyx_n_bool; static PyObject *__pyx_f_3ode_areConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_areConnected[] = "areConnected(body1, body2) -> bool\n\n Return True if the two bodies are connected together by a joint,\n otherwise return False.\n\n @param body1: First body\n @type body1: Body\n @param body2: Second body\n @type body2: Body\n @returns: True if the bodies are connected\n "; static PyObject *__pyx_f_3ode_areConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body1 = 0; struct __pyx_obj_3ode_Body *__pyx_v_body2 = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"body1","body2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_body1, &__pyx_v_body2)) return 0; Py_INCREF(__pyx_v_body1); Py_INCREF(__pyx_v_body2); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body1), __pyx_ptype_3ode_Body, 1, "body1")) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 261; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body2), __pyx_ptype_3ode_Body, 1, "body2")) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 261; goto __pyx_L1;} /* "/home/zefiris/pyode/src/ode.pyx":274 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 274; goto __pyx_L1;} __pyx_2 = __pyx_v_body1 == __pyx_1; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/ode.pyx":275 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 275; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/ode.pyx":276 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 276; goto __pyx_L1;} __pyx_2 = __pyx_v_body2 == __pyx_1; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/ode.pyx":277 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/ode.pyx":279 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(dAreConnected(((struct dxBody (*))__pyx_v_body1->bid),((struct dxBody (*))__pyx_v_body2->bid))); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 279; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 279; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.areConnected"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_body1); Py_DECREF(__pyx_v_body2); return __pyx_r; } static PyObject *__pyx_f_3ode_CloseODE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_CloseODE[] = "CloseODE()\n\n Deallocate some extra memory used by ODE that can not be deallocated\n using the normal destroy functions.\n "; static PyObject *__pyx_f_3ode_CloseODE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/home/zefiris/pyode/src/ode.pyx":287 */ dCloseODE(); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static __Pyx_InternTabEntry __pyx_intern_tab[] = { {&__pyx_n_AMotorEuler, "AMotorEuler"}, {&__pyx_n_AMotorUser, "AMotorUser"}, {&__pyx_n_AttributeError, "AttributeError"}, {&__pyx_n_CloseODE, "CloseODE"}, {&__pyx_n_ContactApprox0, "ContactApprox0"}, {&__pyx_n_ContactApprox1, "ContactApprox1"}, {&__pyx_n_ContactApprox1_1, "ContactApprox1_1"}, {&__pyx_n_ContactApprox1_2, "ContactApprox1_2"}, {&__pyx_n_ContactBounce, "ContactBounce"}, {&__pyx_n_ContactFDir1, "ContactFDir1"}, {&__pyx_n_ContactMotion1, "ContactMotion1"}, {&__pyx_n_ContactMotion2, "ContactMotion2"}, {&__pyx_n_ContactMu2, "ContactMu2"}, {&__pyx_n_ContactSlip1, "ContactSlip1"}, {&__pyx_n_ContactSlip2, "ContactSlip2"}, {&__pyx_n_ContactSoftCFM, "ContactSoftCFM"}, {&__pyx_n_ContactSoftERP, "ContactSoftERP"}, {&__pyx_n_False, "False"}, {&__pyx_n_GeomCCylinder, "GeomCCylinder"}, {&__pyx_n_I, "I"}, {&__pyx_n_IndexError, "IndexError"}, {&__pyx_n_Infinity, "Infinity"}, {&__pyx_n_MemoryError, "MemoryError"}, {&__pyx_n_NotImplementedError, "NotImplementedError"}, {&__pyx_n_ParamBounce, "ParamBounce"}, {&__pyx_n_ParamBounce2, "ParamBounce2"}, {&__pyx_n_ParamBounce3, "ParamBounce3"}, {&__pyx_n_ParamCFM, "ParamCFM"}, {&__pyx_n_ParamCFM2, "ParamCFM2"}, {&__pyx_n_ParamCFM3, "ParamCFM3"}, {&__pyx_n_ParamFMax, "ParamFMax"}, {&__pyx_n_ParamFMax2, "ParamFMax2"}, {&__pyx_n_ParamFMax3, "ParamFMax3"}, {&__pyx_n_ParamFudgeFactor, "ParamFudgeFactor"}, {&__pyx_n_ParamFudgeFactor2, "ParamFudgeFactor2"}, {&__pyx_n_ParamFudgeFactor3, "ParamFudgeFactor3"}, {&__pyx_n_ParamGroup, "ParamGroup"}, {&__pyx_n_ParamHiStop, "ParamHiStop"}, {&__pyx_n_ParamHiStop2, "ParamHiStop2"}, {&__pyx_n_ParamHiStop3, "ParamHiStop3"}, {&__pyx_n_ParamLoStop, "ParamLoStop"}, {&__pyx_n_ParamLoStop2, "ParamLoStop2"}, {&__pyx_n_ParamLoStop3, "ParamLoStop3"}, {&__pyx_n_ParamStopCFM, "ParamStopCFM"}, {&__pyx_n_ParamStopCFM2, "ParamStopCFM2"}, {&__pyx_n_ParamStopCFM3, "ParamStopCFM3"}, {&__pyx_n_ParamStopERP, "ParamStopERP"}, {&__pyx_n_ParamStopERP2, "ParamStopERP2"}, {&__pyx_n_ParamStopERP3, "ParamStopERP3"}, {&__pyx_n_ParamSuspensionCFM, "ParamSuspensionCFM"}, {&__pyx_n_ParamSuspensionCFM2, "ParamSuspensionCFM2"}, {&__pyx_n_ParamSuspensionCFM3, "ParamSuspensionCFM3"}, {&__pyx_n_ParamSuspensionERP, "ParamSuspensionERP"}, {&__pyx_n_ParamSuspensionERP2, "ParamSuspensionERP2"}, {&__pyx_n_ParamSuspensionERP3, "ParamSuspensionERP3"}, {&__pyx_n_ParamVel, "ParamVel"}, {&__pyx_n_ParamVel2, "ParamVel2"}, {&__pyx_n_ParamVel3, "ParamVel3"}, {&__pyx_n_RuntimeError, "RuntimeError"}, {&__pyx_n_Space, "Space"}, {&__pyx_n_StopIteration, "StopIteration"}, {&__pyx_n_True, "True"}, {&__pyx_n_ValueError, "ValueError"}, {&__pyx_n__SpaceIterator, "_SpaceIterator"}, {&__pyx_n___doc__, "__doc__"}, {&__pyx_n___init__, "__init__"}, {&__pyx_n___iter__, "__iter__"}, {&__pyx_n__addjoint, "_addjoint"}, {&__pyx_n__destroyed, "_destroyed"}, {&__pyx_n__geom_c2py_lut, "_geom_c2py_lut"}, {&__pyx_n__id, "_id"}, {&__pyx_n_add, "add"}, {&__pyx_n_adjust, "adjust"}, {&__pyx_n_append, "append"}, {&__pyx_n_areConnected, "areConnected"}, {&__pyx_n_bool, "bool"}, {&__pyx_n_c, "c"}, {&__pyx_n_collide, "collide"}, {&__pyx_n_collide2, "collide2"}, {&__pyx_n_environment, "environment"}, {&__pyx_n_getGeom, "getGeom"}, {&__pyx_n_getNumGeoms, "getNumGeoms"}, {&__pyx_n_idx, "idx"}, {&__pyx_n_long, "long"}, {&__pyx_n_mass, "mass"}, {&__pyx_n_next, "next"}, {&__pyx_n_paramBounce, "paramBounce"}, {&__pyx_n_paramCFM, "paramCFM"}, {&__pyx_n_paramFMax, "paramFMax"}, {&__pyx_n_paramFudgeFactor, "paramFudgeFactor"}, {&__pyx_n_paramHiStop, "paramHiStop"}, {&__pyx_n_paramLoStop, "paramLoStop"}, {&__pyx_n_paramStopCFM, "paramStopCFM"}, {&__pyx_n_paramStopERP, "paramStopERP"}, {&__pyx_n_paramSuspensionCFM, "paramSuspensionCFM"}, {&__pyx_n_paramSuspensionERP, "paramSuspensionERP"}, {&__pyx_n_paramVel, "paramVel"}, {&__pyx_n_placeable, "placeable"}, {&__pyx_n_setFeedback, "setFeedback"}, {&__pyx_n_space, "space"}, {&__pyx_n_str, "str"}, {0, 0} }; static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_k1p, __pyx_k1, sizeof(__pyx_k1)}, {&__pyx_k24p, __pyx_k24, sizeof(__pyx_k24)}, {&__pyx_k68p, __pyx_k68, sizeof(__pyx_k68)}, {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)}, {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72)}, {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74)}, {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)}, {&__pyx_k76p, __pyx_k76, sizeof(__pyx_k76)}, {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)}, {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)}, {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)}, {&__pyx_k80p, __pyx_k80, sizeof(__pyx_k80)}, {&__pyx_k81p, __pyx_k81, sizeof(__pyx_k81)}, {&__pyx_k82p, __pyx_k82, sizeof(__pyx_k82)}, {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83)}, {&__pyx_k84p, __pyx_k84, sizeof(__pyx_k84)}, {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85)}, {&__pyx_k86p, __pyx_k86, sizeof(__pyx_k86)}, {&__pyx_k87p, __pyx_k87, sizeof(__pyx_k87)}, {&__pyx_k88p, __pyx_k88, sizeof(__pyx_k88)}, {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)}, {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)}, {&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)}, {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)}, {&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)}, {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)}, {&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)}, {&__pyx_k96p, __pyx_k96, sizeof(__pyx_k96)}, {&__pyx_k97p, __pyx_k97, sizeof(__pyx_k97)}, {&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)}, {&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)}, {&__pyx_k100p, __pyx_k100, sizeof(__pyx_k100)}, {&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101)}, {&__pyx_k102p, __pyx_k102, sizeof(__pyx_k102)}, {&__pyx_k103p, __pyx_k103, sizeof(__pyx_k103)}, {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)}, {0, 0, 0} }; static PyObject *__pyx_tp_new_3ode_Mass(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_4Mass___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Mass(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Mass(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_Mass(PyObject *o) { return 0; } static PyObject *__pyx_tp_getattro_3ode_Mass(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_4Mass___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Mass(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_4Mass___setattr__(o, n, v); } else { return PyObject_GenericSetAttr(o, n, 0); } } static struct PyMethodDef __pyx_methods_3ode_Mass[] = { {"setZero", (PyCFunction)__pyx_f_3ode_4Mass_setZero, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setZero}, {"setParameters", (PyCFunction)__pyx_f_3ode_4Mass_setParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setParameters}, {"setSphere", (PyCFunction)__pyx_f_3ode_4Mass_setSphere, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setSphere}, {"setSphereTotal", (PyCFunction)__pyx_f_3ode_4Mass_setSphereTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setSphereTotal}, {"setCappedCylinder", (PyCFunction)__pyx_f_3ode_4Mass_setCappedCylinder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCappedCylinder}, {"setCappedCylinderTotal", (PyCFunction)__pyx_f_3ode_4Mass_setCappedCylinderTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCappedCylinderTotal}, {"setCylinder", (PyCFunction)__pyx_f_3ode_4Mass_setCylinder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCylinder}, {"setCylinderTotal", (PyCFunction)__pyx_f_3ode_4Mass_setCylinderTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCylinderTotal}, {"setBox", (PyCFunction)__pyx_f_3ode_4Mass_setBox, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setBox}, {"setBoxTotal", (PyCFunction)__pyx_f_3ode_4Mass_setBoxTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setBoxTotal}, {"adjust", (PyCFunction)__pyx_f_3ode_4Mass_adjust, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_adjust}, {"translate", (PyCFunction)__pyx_f_3ode_4Mass_translate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_translate}, {"add", (PyCFunction)__pyx_f_3ode_4Mass_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_add}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Mass = { __pyx_f_3ode_4Mass___add__, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Mass = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Mass = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Mass = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Mass = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Mass", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Mass), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Mass, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Mass, /*tp_as_number*/ &__pyx_tp_as_sequence_Mass, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Mass, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_f_3ode_4Mass___str__, /*tp_str*/ __pyx_tp_getattro_3ode_Mass, /*tp_getattro*/ __pyx_tp_setattro_3ode_Mass, /*tp_setattro*/ &__pyx_tp_as_buffer_Mass, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Mass parameters of a rigid body.\n\n This class stores mass parameters of a rigid body which can be\n accessed through the following attributes:\n\n - mass: The total mass of the body (float)\n - c: The center of gravity position in body frame (3-tuple of floats)\n - I: The 3x3 inertia tensor in body frame (3-tuple of 3-tuples)\n\n This class wraps the dMass structure from the C API.\n\n @ivar mass: The total mass of the body\n @ivar c: The center of gravity position in body frame (cx, cy, cz)\n @ivar I: The 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22, I23), (I13, I23, I33))\n @type mass: float\n @type c: 3-tuple of floats\n @type I: 3-tuple of 3-tuples of floats \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Mass, /*tp_traverse*/ __pyx_tp_clear_3ode_Mass, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Mass, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Mass, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Contact(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_7Contact___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Contact(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Contact(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_Contact(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_Contact[] = { {"getMode", (PyCFunction)__pyx_f_3ode_7Contact_getMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMode}, {"setMode", (PyCFunction)__pyx_f_3ode_7Contact_setMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMode}, {"getMu", (PyCFunction)__pyx_f_3ode_7Contact_getMu, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMu}, {"setMu", (PyCFunction)__pyx_f_3ode_7Contact_setMu, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMu}, {"getMu2", (PyCFunction)__pyx_f_3ode_7Contact_getMu2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMu2}, {"setMu2", (PyCFunction)__pyx_f_3ode_7Contact_setMu2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMu2}, {"getBounce", (PyCFunction)__pyx_f_3ode_7Contact_getBounce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getBounce}, {"setBounce", (PyCFunction)__pyx_f_3ode_7Contact_setBounce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setBounce}, {"getBounceVel", (PyCFunction)__pyx_f_3ode_7Contact_getBounceVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getBounceVel}, {"setBounceVel", (PyCFunction)__pyx_f_3ode_7Contact_setBounceVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setBounceVel}, {"getSoftERP", (PyCFunction)__pyx_f_3ode_7Contact_getSoftERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSoftERP}, {"setSoftERP", (PyCFunction)__pyx_f_3ode_7Contact_setSoftERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSoftERP}, {"getSoftCFM", (PyCFunction)__pyx_f_3ode_7Contact_getSoftCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSoftCFM}, {"setSoftCFM", (PyCFunction)__pyx_f_3ode_7Contact_setSoftCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSoftCFM}, {"getMotion1", (PyCFunction)__pyx_f_3ode_7Contact_getMotion1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMotion1}, {"setMotion1", (PyCFunction)__pyx_f_3ode_7Contact_setMotion1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMotion1}, {"getMotion2", (PyCFunction)__pyx_f_3ode_7Contact_getMotion2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMotion2}, {"setMotion2", (PyCFunction)__pyx_f_3ode_7Contact_setMotion2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMotion2}, {"getSlip1", (PyCFunction)__pyx_f_3ode_7Contact_getSlip1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSlip1}, {"setSlip1", (PyCFunction)__pyx_f_3ode_7Contact_setSlip1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSlip1}, {"getSlip2", (PyCFunction)__pyx_f_3ode_7Contact_getSlip2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSlip2}, {"setSlip2", (PyCFunction)__pyx_f_3ode_7Contact_setSlip2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSlip2}, {"getFDir1", (PyCFunction)__pyx_f_3ode_7Contact_getFDir1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getFDir1}, {"setFDir1", (PyCFunction)__pyx_f_3ode_7Contact_setFDir1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setFDir1}, {"getContactGeomParams", (PyCFunction)__pyx_f_3ode_7Contact_getContactGeomParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getContactGeomParams}, {"setContactGeomParams", (PyCFunction)__pyx_f_3ode_7Contact_setContactGeomParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setContactGeomParams}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Contact = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Contact = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Contact = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Contact = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Contact = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Contact", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Contact), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Contact, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Contact, /*tp_as_number*/ &__pyx_tp_as_sequence_Contact, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Contact, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Contact, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This class represents a contact between two bodies in one point.\n\n A Contact object stores all the input parameters for a ContactJoint.\n This class wraps the ODE dContact structure which has 3 components::\n\n struct dContact {\n dSurfaceParameters surface;\n dContactGeom geom;\n dVector3 fdir1;\n }; \n\n This wrapper class provides methods to get and set the items of those\n structures.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Contact, /*tp_traverse*/ __pyx_tp_clear_3ode_Contact, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Contact, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Contact, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_World(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_5World___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_World(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_5World___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_World(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_World(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_World[] = { {"setGravity", (PyCFunction)__pyx_f_3ode_5World_setGravity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setGravity}, {"getGravity", (PyCFunction)__pyx_f_3ode_5World_getGravity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getGravity}, {"setERP", (PyCFunction)__pyx_f_3ode_5World_setERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setERP}, {"getERP", (PyCFunction)__pyx_f_3ode_5World_getERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getERP}, {"setCFM", (PyCFunction)__pyx_f_3ode_5World_setCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setCFM}, {"getCFM", (PyCFunction)__pyx_f_3ode_5World_getCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getCFM}, {"step", (PyCFunction)__pyx_f_3ode_5World_step, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_step}, {"quickStep", (PyCFunction)__pyx_f_3ode_5World_quickStep, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_quickStep}, {"setQuickStepNumIterations", (PyCFunction)__pyx_f_3ode_5World_setQuickStepNumIterations, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setQuickStepNumIterations}, {"getQuickStepNumIterations", (PyCFunction)__pyx_f_3ode_5World_getQuickStepNumIterations, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getQuickStepNumIterations}, {"setContactMaxCorrectingVel", (PyCFunction)__pyx_f_3ode_5World_setContactMaxCorrectingVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setContactMaxCorrectingVel}, {"getContactMaxCorrectingVel", (PyCFunction)__pyx_f_3ode_5World_getContactMaxCorrectingVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getContactMaxCorrectingVel}, {"setContactSurfaceLayer", (PyCFunction)__pyx_f_3ode_5World_setContactSurfaceLayer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setContactSurfaceLayer}, {"getContactSurfaceLayer", (PyCFunction)__pyx_f_3ode_5World_getContactSurfaceLayer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getContactSurfaceLayer}, {"setAutoDisableFlag", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableFlag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableFlag}, {"getAutoDisableFlag", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableFlag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableFlag}, {"setAutoDisableLinearThreshold", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableLinearThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableLinearThreshold}, {"getAutoDisableLinearThreshold", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableLinearThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableLinearThreshold}, {"setAutoDisableAngularThreshold", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableAngularThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableAngularThreshold}, {"getAutoDisableAngularThreshold", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableAngularThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableAngularThreshold}, {"setAutoDisableSteps", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableSteps, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableSteps}, {"getAutoDisableSteps", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableSteps, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableSteps}, {"setAutoDisableTime", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableTime}, {"getAutoDisableTime", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableTime}, {"impulseToForce", (PyCFunction)__pyx_f_3ode_5World_impulseToForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_impulseToForce}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_World = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_World = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_World = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_World = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_World = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.World", /*tp_name*/ sizeof(struct __pyx_obj_3ode_World), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_World, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_World, /*tp_as_number*/ &__pyx_tp_as_sequence_World, /*tp_as_sequence*/ &__pyx_tp_as_mapping_World, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_World, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Dynamics world.\n \n The world object is a container for rigid bodies and joints.\n \n \n Constructor::\n \n World()\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_World, /*tp_traverse*/ __pyx_tp_clear_3ode_World, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_World, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_World, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Body(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; p->world = Py_None; Py_INCREF(Py_None); p->userattribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_4Body___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Body(PyObject *o) { struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_4Body___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->world); Py_XDECREF(p->userattribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Body(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; if (p->world) { e = (*v)(p->world, a); if (e) return e; } if (p->userattribs) { e = (*v)(p->userattribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_Body(PyObject *o) { struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; Py_XDECREF(p->world); p->world = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->userattribs); p->userattribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_Body(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_4Body___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Body(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_4Body___setattr__(o, n, v); } else { return __pyx_f_3ode_4Body___delattr__(o, n); } } static struct PyMethodDef __pyx_methods_3ode_Body[] = { {"setPosition", (PyCFunction)__pyx_f_3ode_4Body_setPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setPosition}, {"getPosition", (PyCFunction)__pyx_f_3ode_4Body_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPosition}, {"setRotation", (PyCFunction)__pyx_f_3ode_4Body_setRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setRotation}, {"getRotation", (PyCFunction)__pyx_f_3ode_4Body_getRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRotation}, {"getQuaternion", (PyCFunction)__pyx_f_3ode_4Body_getQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getQuaternion}, {"setQuaternion", (PyCFunction)__pyx_f_3ode_4Body_setQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setQuaternion}, {"setLinearVel", (PyCFunction)__pyx_f_3ode_4Body_setLinearVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setLinearVel}, {"getLinearVel", (PyCFunction)__pyx_f_3ode_4Body_getLinearVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getLinearVel}, {"setAngularVel", (PyCFunction)__pyx_f_3ode_4Body_setAngularVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setAngularVel}, {"getAngularVel", (PyCFunction)__pyx_f_3ode_4Body_getAngularVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getAngularVel}, {"setMass", (PyCFunction)__pyx_f_3ode_4Body_setMass, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setMass}, {"getMass", (PyCFunction)__pyx_f_3ode_4Body_getMass, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getMass}, {"addForce", (PyCFunction)__pyx_f_3ode_4Body_addForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForce}, {"addTorque", (PyCFunction)__pyx_f_3ode_4Body_addTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addTorque}, {"addRelForce", (PyCFunction)__pyx_f_3ode_4Body_addRelForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForce}, {"addRelTorque", (PyCFunction)__pyx_f_3ode_4Body_addRelTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelTorque}, {"addForceAtPos", (PyCFunction)__pyx_f_3ode_4Body_addForceAtPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForceAtPos}, {"addForceAtRelPos", (PyCFunction)__pyx_f_3ode_4Body_addForceAtRelPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForceAtRelPos}, {"addRelForceAtPos", (PyCFunction)__pyx_f_3ode_4Body_addRelForceAtPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForceAtPos}, {"addRelForceAtRelPos", (PyCFunction)__pyx_f_3ode_4Body_addRelForceAtRelPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForceAtRelPos}, {"getForce", (PyCFunction)__pyx_f_3ode_4Body_getForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getForce}, {"getTorque", (PyCFunction)__pyx_f_3ode_4Body_getTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getTorque}, {"setForce", (PyCFunction)__pyx_f_3ode_4Body_setForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setForce}, {"setTorque", (PyCFunction)__pyx_f_3ode_4Body_setTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setTorque}, {"getRelPointPos", (PyCFunction)__pyx_f_3ode_4Body_getRelPointPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRelPointPos}, {"getRelPointVel", (PyCFunction)__pyx_f_3ode_4Body_getRelPointVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRelPointVel}, {"getPointVel", (PyCFunction)__pyx_f_3ode_4Body_getPointVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPointVel}, {"getPosRelPoint", (PyCFunction)__pyx_f_3ode_4Body_getPosRelPoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPosRelPoint}, {"vectorToWorld", (PyCFunction)__pyx_f_3ode_4Body_vectorToWorld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_vectorToWorld}, {"vectorFromWorld", (PyCFunction)__pyx_f_3ode_4Body_vectorFromWorld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_vectorFromWorld}, {"enable", (PyCFunction)__pyx_f_3ode_4Body_enable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_enable}, {"disable", (PyCFunction)__pyx_f_3ode_4Body_disable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_disable}, {"isEnabled", (PyCFunction)__pyx_f_3ode_4Body_isEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_isEnabled}, {"setFiniteRotationMode", (PyCFunction)__pyx_f_3ode_4Body_setFiniteRotationMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setFiniteRotationMode}, {"getFiniteRotationMode", (PyCFunction)__pyx_f_3ode_4Body_getFiniteRotationMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getFiniteRotationMode}, {"setFiniteRotationAxis", (PyCFunction)__pyx_f_3ode_4Body_setFiniteRotationAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setFiniteRotationAxis}, {"getFiniteRotationAxis", (PyCFunction)__pyx_f_3ode_4Body_getFiniteRotationAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getFiniteRotationAxis}, {"getNumJoints", (PyCFunction)__pyx_f_3ode_4Body_getNumJoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getNumJoints}, {"setGravityMode", (PyCFunction)__pyx_f_3ode_4Body_setGravityMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setGravityMode}, {"getGravityMode", (PyCFunction)__pyx_f_3ode_4Body_getGravityMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getGravityMode}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Body = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Body = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Body = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Body = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Body = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Body", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Body), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Body, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Body, /*tp_as_number*/ &__pyx_tp_as_sequence_Body, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Body, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_Body, /*tp_getattro*/ __pyx_tp_setattro_3ode_Body, /*tp_setattro*/ &__pyx_tp_as_buffer_Body, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "The rigid body class encapsulating the ODE body.\n\n This class represents a rigid body that has a location and orientation\n in space and that stores the mass properties of an object.\n\n When creating a Body object you have to pass the world it belongs to\n as argument to the constructor::\n\n >>> import ode\n >>> w = ode.World()\n >>> b = ode.Body(w)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Body, /*tp_traverse*/ __pyx_tp_clear_3ode_Body, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Body, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_4Body___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Body, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_JointGroup(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; p->jointlist = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_10JointGroup___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_JointGroup(PyObject *o) { struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_10JointGroup___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->jointlist); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_JointGroup(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; if (p->jointlist) { e = (*v)(p->jointlist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_JointGroup(PyObject *o) { struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; Py_XDECREF(p->jointlist); p->jointlist = Py_None; Py_INCREF(Py_None); return 0; } static struct PyMethodDef __pyx_methods_3ode_JointGroup[] = { {"empty", (PyCFunction)__pyx_f_3ode_10JointGroup_empty, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10JointGroup_empty}, {"_addjoint", (PyCFunction)__pyx_f_3ode_10JointGroup__addjoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10JointGroup__addjoint}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_JointGroup = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_JointGroup = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_JointGroup = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_JointGroup = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_JointGroup = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.JointGroup", /*tp_name*/ sizeof(struct __pyx_obj_3ode_JointGroup), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_JointGroup, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_JointGroup, /*tp_as_number*/ &__pyx_tp_as_sequence_JointGroup, /*tp_as_sequence*/ &__pyx_tp_as_mapping_JointGroup, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_JointGroup, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Joint group.\n\n Constructor::\n \n JointGroup() \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_JointGroup, /*tp_traverse*/ __pyx_tp_clear_3ode_JointGroup, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_JointGroup, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10JointGroup___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_JointGroup, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Joint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; p->world = Py_None; Py_INCREF(Py_None); p->body1 = Py_None; Py_INCREF(Py_None); p->body2 = Py_None; Py_INCREF(Py_None); p->userattribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_5Joint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Joint(PyObject *o) { struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_5Joint___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->world); Py_XDECREF(p->body1); Py_XDECREF(p->body2); Py_XDECREF(p->userattribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Joint(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; if (p->world) { e = (*v)(p->world, a); if (e) return e; } if (p->body1) { e = (*v)(p->body1, a); if (e) return e; } if (p->body2) { e = (*v)(p->body2, a); if (e) return e; } if (p->userattribs) { e = (*v)(p->userattribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_Joint(PyObject *o) { struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; Py_XDECREF(p->world); p->world = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body1); p->body1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body2); p->body2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->userattribs); p->userattribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_Joint(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_5Joint___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Joint(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_5Joint___setattr__(o, n, v); } else { return __pyx_f_3ode_5Joint___delattr__(o, n); } } static struct PyMethodDef __pyx_methods_3ode_Joint[] = { {"_destroyed", (PyCFunction)__pyx_f_3ode_5Joint__destroyed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint__destroyed}, {"attach", (PyCFunction)__pyx_f_3ode_5Joint_attach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_attach}, {"getBody", (PyCFunction)__pyx_f_3ode_5Joint_getBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_getBody}, {"setFeedback", (PyCFunction)__pyx_f_3ode_5Joint_setFeedback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_setFeedback}, {"getFeedback", (PyCFunction)__pyx_f_3ode_5Joint_getFeedback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_getFeedback}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Joint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Joint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Joint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Joint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Joint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Joint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Joint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Joint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Joint, /*tp_as_number*/ &__pyx_tp_as_sequence_Joint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Joint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_Joint, /*tp_getattro*/ __pyx_tp_setattro_3ode_Joint, /*tp_setattro*/ &__pyx_tp_as_buffer_Joint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class for all joint classes.", /*tp_doc*/ __pyx_tp_traverse_3ode_Joint, /*tp_traverse*/ __pyx_tp_clear_3ode_Joint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Joint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_5Joint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Joint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_BallJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_9BallJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_BallJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_BallJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_BallJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_BallJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_9BallJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_9BallJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_9BallJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_getAnchor2}, {"setParam", (PyCFunction)__pyx_f_3ode_9BallJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_9BallJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_BallJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_BallJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_BallJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_BallJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_BallJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.BallJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_BallJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_BallJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_BallJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_BallJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_BallJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_BallJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Ball joint.\n\n Constructor::\n \n BallJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_BallJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_BallJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_BallJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9BallJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_BallJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_HingeJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_10HingeJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_HingeJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_HingeJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_HingeJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_HingeJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_10HingeJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAnchor2}, {"setAxis", (PyCFunction)__pyx_f_3ode_10HingeJoint_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAxis}, {"getAngle", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAngle}, {"getAngleRate", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAngleRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAngleRate}, {"addTorque", (PyCFunction)__pyx_f_3ode_10HingeJoint_addTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_addTorque}, {"setParam", (PyCFunction)__pyx_f_3ode_10HingeJoint_setParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setParam}, {"getParam", (PyCFunction)__pyx_f_3ode_10HingeJoint_getParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getParam}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_HingeJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_HingeJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_HingeJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_HingeJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_HingeJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.HingeJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_HingeJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_HingeJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_HingeJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_HingeJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_HingeJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_HingeJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Hinge joint.\n\n Constructor::\n \n HingeJoint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_HingeJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_HingeJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_HingeJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10HingeJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_HingeJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SliderJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_11SliderJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SliderJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SliderJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SliderJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SliderJoint[] = { {"setAxis", (PyCFunction)__pyx_f_3ode_11SliderJoint_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_11SliderJoint_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getAxis}, {"getPosition", (PyCFunction)__pyx_f_3ode_11SliderJoint_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getPosition}, {"getPositionRate", (PyCFunction)__pyx_f_3ode_11SliderJoint_getPositionRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getPositionRate}, {"addForce", (PyCFunction)__pyx_f_3ode_11SliderJoint_addForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_addForce}, {"setParam", (PyCFunction)__pyx_f_3ode_11SliderJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_11SliderJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SliderJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SliderJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SliderJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SliderJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SliderJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SliderJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SliderJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SliderJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SliderJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_SliderJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SliderJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SliderJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Slider joint.\n \n Constructor::\n \n SlideJoint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SliderJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_SliderJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SliderJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11SliderJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SliderJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_UniversalJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_14UniversalJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_UniversalJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_UniversalJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_UniversalJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_UniversalJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAnchor2}, {"setAxis1", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAxis1}, {"getAxis1", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAxis1}, {"setAxis2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAxis2}, {"getAxis2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAxis2}, {"addTorques", (PyCFunction)__pyx_f_3ode_14UniversalJoint_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_UniversalJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_UniversalJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_UniversalJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_UniversalJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_UniversalJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.UniversalJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_UniversalJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_UniversalJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_UniversalJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_UniversalJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_UniversalJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_UniversalJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Universal joint.\n\n Constructor::\n \n UniversalJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_UniversalJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_UniversalJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_UniversalJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_14UniversalJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_UniversalJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Hinge2Joint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_11Hinge2Joint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Hinge2Joint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_Hinge2Joint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_Hinge2Joint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_Hinge2Joint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAnchor2}, {"setAxis1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAxis1}, {"getAxis1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAxis1}, {"setAxis2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAxis2}, {"getAxis2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAxis2}, {"getAngle1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle1}, {"getAngle1Rate", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle1Rate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle1Rate}, {"getAngle2Rate", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle2Rate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle2Rate}, {"addTorques", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Hinge2Joint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Hinge2Joint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Hinge2Joint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Hinge2Joint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Hinge2Joint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Hinge2Joint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Hinge2Joint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Hinge2Joint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Hinge2Joint, /*tp_as_number*/ &__pyx_tp_as_sequence_Hinge2Joint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Hinge2Joint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Hinge2Joint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Hinge2 joint.\n\n Constructor::\n \n Hinge2Joint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Hinge2Joint, /*tp_traverse*/ __pyx_tp_clear_3ode_Hinge2Joint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Hinge2Joint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11Hinge2Joint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Hinge2Joint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_FixedJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_10FixedJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_FixedJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_FixedJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_FixedJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_FixedJoint[] = { {"setFixed", (PyCFunction)__pyx_f_3ode_10FixedJoint_setFixed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10FixedJoint_setFixed}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_FixedJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_FixedJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_FixedJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_FixedJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_FixedJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.FixedJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_FixedJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_FixedJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_FixedJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_FixedJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_FixedJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_FixedJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Fixed joint.\n\n Constructor::\n \n FixedJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_FixedJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_FixedJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_FixedJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10FixedJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_FixedJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_ContactJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_12ContactJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_ContactJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_ContactJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_ContactJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_ContactJoint[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_ContactJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_ContactJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_ContactJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_ContactJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_ContactJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.ContactJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_ContactJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_ContactJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_ContactJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_ContactJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_ContactJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_ContactJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Contact joint.\n\n Constructor::\n \n ContactJoint(world, jointgroup, contact)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_ContactJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_ContactJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_ContactJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12ContactJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_ContactJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_AMotor(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_6AMotor___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_AMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_AMotor(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_AMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_AMotor[] = { {"setMode", (PyCFunction)__pyx_f_3ode_6AMotor_setMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setMode}, {"getMode", (PyCFunction)__pyx_f_3ode_6AMotor_getMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getMode}, {"setNumAxes", (PyCFunction)__pyx_f_3ode_6AMotor_setNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setNumAxes}, {"getNumAxes", (PyCFunction)__pyx_f_3ode_6AMotor_getNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getNumAxes}, {"setAxis", (PyCFunction)__pyx_f_3ode_6AMotor_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_6AMotor_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAxis}, {"getAxisRel", (PyCFunction)__pyx_f_3ode_6AMotor_getAxisRel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAxisRel}, {"setAngle", (PyCFunction)__pyx_f_3ode_6AMotor_setAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setAngle}, {"getAngle", (PyCFunction)__pyx_f_3ode_6AMotor_getAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAngle}, {"getAngleRate", (PyCFunction)__pyx_f_3ode_6AMotor_getAngleRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAngleRate}, {"addTorques", (PyCFunction)__pyx_f_3ode_6AMotor_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_6AMotor_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_6AMotor_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_AMotor = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_AMotor = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_AMotor = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_AMotor = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_AMotor = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.AMotor", /*tp_name*/ sizeof(struct __pyx_obj_3ode_AMotor), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_AMotor, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_AMotor, /*tp_as_number*/ &__pyx_tp_as_sequence_AMotor, /*tp_as_sequence*/ &__pyx_tp_as_mapping_AMotor, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_AMotor, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "AMotor joint.\n \n Constructor::\n \n AMotor(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_AMotor, /*tp_traverse*/ __pyx_tp_clear_3ode_AMotor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_AMotor, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_6AMotor___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_AMotor, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_LMotor(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_6LMotor___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_LMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_LMotor(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_LMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_LMotor[] = { {"setNumAxes", (PyCFunction)__pyx_f_3ode_6LMotor_setNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_setNumAxes}, {"getNumAxes", (PyCFunction)__pyx_f_3ode_6LMotor_getNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_getNumAxes}, {"setAxis", (PyCFunction)__pyx_f_3ode_6LMotor_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_6LMotor_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_getAxis}, {"setParam", (PyCFunction)__pyx_f_3ode_6LMotor_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_6LMotor_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_LMotor = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_LMotor = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_LMotor = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_LMotor = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_LMotor = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.LMotor", /*tp_name*/ sizeof(struct __pyx_obj_3ode_LMotor), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_LMotor, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_LMotor, /*tp_as_number*/ &__pyx_tp_as_sequence_LMotor, /*tp_as_sequence*/ &__pyx_tp_as_mapping_LMotor, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_LMotor, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "LMotor joint.\n \n Constructor::\n \n LMotor(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_LMotor, /*tp_traverse*/ __pyx_tp_clear_3ode_LMotor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_LMotor, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_6LMotor___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_LMotor, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Plane2DJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_12Plane2DJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Plane2DJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_Plane2DJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_Plane2DJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_Plane2DJoint[] = { {"setXParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setXParam, METH_VARARGS|METH_KEYWORDS, 0}, {"setYParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setYParam, METH_VARARGS|METH_KEYWORDS, 0}, {"setAngleParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setAngleParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Plane2DJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Plane2DJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Plane2DJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Plane2DJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Plane2DJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Plane2DJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Plane2DJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Plane2DJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Plane2DJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_Plane2DJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Plane2DJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Plane2DJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plane-2D Joint.\n\n Constructor::\n \n Plane2DJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Plane2DJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_Plane2DJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Plane2DJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12Plane2DJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Plane2DJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomObject(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; p->space = Py_None; Py_INCREF(Py_None); p->body = Py_None; Py_INCREF(Py_None); p->attribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_10GeomObject___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomObject(PyObject *o) { struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_10GeomObject___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->space); Py_XDECREF(p->body); Py_XDECREF(p->attribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_GeomObject(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; if (p->space) { e = (*v)(p->space, a); if (e) return e; } if (p->body) { e = (*v)(p->body, a); if (e) return e; } if (p->attribs) { e = (*v)(p->attribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_GeomObject(PyObject *o) { struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; Py_XDECREF(p->space); p->space = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body); p->body = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->attribs); p->attribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_GeomObject(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_10GeomObject___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_GeomObject(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_10GeomObject___setattr__(o, n, v); } else { return PyObject_GenericSetAttr(o, n, 0); } } static struct PyMethodDef __pyx_methods_3ode_GeomObject[] = { {"_id", (PyCFunction)__pyx_f_3ode_10GeomObject__id, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject__id}, {"placeable", (PyCFunction)__pyx_f_3ode_10GeomObject_placeable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_placeable}, {"setBody", (PyCFunction)__pyx_f_3ode_10GeomObject_setBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setBody}, {"getBody", (PyCFunction)__pyx_f_3ode_10GeomObject_getBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getBody}, {"setPosition", (PyCFunction)__pyx_f_3ode_10GeomObject_setPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setPosition}, {"getPosition", (PyCFunction)__pyx_f_3ode_10GeomObject_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getPosition}, {"setRotation", (PyCFunction)__pyx_f_3ode_10GeomObject_setRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setRotation}, {"getRotation", (PyCFunction)__pyx_f_3ode_10GeomObject_getRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getRotation}, {"getQuaternion", (PyCFunction)__pyx_f_3ode_10GeomObject_getQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getQuaternion}, {"setQuaternion", (PyCFunction)__pyx_f_3ode_10GeomObject_setQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setQuaternion}, {"getAABB", (PyCFunction)__pyx_f_3ode_10GeomObject_getAABB, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getAABB}, {"isSpace", (PyCFunction)__pyx_f_3ode_10GeomObject_isSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_isSpace}, {"getSpace", (PyCFunction)__pyx_f_3ode_10GeomObject_getSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getSpace}, {"setCollideBits", (PyCFunction)__pyx_f_3ode_10GeomObject_setCollideBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setCollideBits}, {"setCategoryBits", (PyCFunction)__pyx_f_3ode_10GeomObject_setCategoryBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setCategoryBits}, {"getCollideBits", (PyCFunction)__pyx_f_3ode_10GeomObject_getCollideBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getCollideBits}, {"getCategoryBits", (PyCFunction)__pyx_f_3ode_10GeomObject_getCategoryBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getCategoryBits}, {"enable", (PyCFunction)__pyx_f_3ode_10GeomObject_enable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_enable}, {"disable", (PyCFunction)__pyx_f_3ode_10GeomObject_disable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_disable}, {"isEnabled", (PyCFunction)__pyx_f_3ode_10GeomObject_isEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_isEnabled}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomObject = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomObject = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomObject = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomObject = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomObject = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomObject", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomObject, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomObject, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomObject, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomObject, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_GeomObject, /*tp_getattro*/ __pyx_tp_setattro_3ode_GeomObject, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomObject, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This is the abstract base class for all geom objects.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomObject, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomObject, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomObject, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10GeomObject___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomObject, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SpaceBase(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_9SpaceBase___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SpaceBase(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_9SpaceBase___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SpaceBase(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SpaceBase(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SpaceBase[] = { {"_id", (PyCFunction)__pyx_f_3ode_9SpaceBase__id, METH_VARARGS|METH_KEYWORDS, 0}, {"add", (PyCFunction)__pyx_f_3ode_9SpaceBase_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_add}, {"remove", (PyCFunction)__pyx_f_3ode_9SpaceBase_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_remove}, {"query", (PyCFunction)__pyx_f_3ode_9SpaceBase_query, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_query}, {"getNumGeoms", (PyCFunction)__pyx_f_3ode_9SpaceBase_getNumGeoms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_getNumGeoms}, {"getGeom", (PyCFunction)__pyx_f_3ode_9SpaceBase_getGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_getGeom}, {"collide", (PyCFunction)__pyx_f_3ode_9SpaceBase_collide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_collide}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SpaceBase = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SpaceBase = { __pyx_f_3ode_9SpaceBase___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SpaceBase = { __pyx_f_3ode_9SpaceBase___len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SpaceBase = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SpaceBase = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SpaceBase", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SpaceBase), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SpaceBase, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SpaceBase, /*tp_as_number*/ &__pyx_tp_as_sequence_SpaceBase, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SpaceBase, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SpaceBase, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Space class (container for geometry objects).\n\n A Space object is a container for geometry objects which are used\n to do collision detection.\n The space does high level collision culling, which means that it\n can identify which pairs of geometry objects are potentially\n touching.\n\n This Space class can be used for both, a SimpleSpace and a HashSpace\n (see ODE documentation).\n\n >>> space = Space(type=0) # Create a SimpleSpace\n >>> space = Space(type=1) # Create a HashSpace\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SpaceBase, /*tp_traverse*/ __pyx_tp_clear_3ode_SpaceBase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_3ode_9SpaceBase___iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SpaceBase, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9SpaceBase___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SpaceBase, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SimpleSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_11SimpleSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SimpleSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SimpleSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SimpleSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SimpleSpace[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SimpleSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SimpleSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SimpleSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SimpleSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SimpleSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SimpleSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SimpleSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SimpleSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SimpleSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_SimpleSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SimpleSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SimpleSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Simple space.\n\n This does not do any collision culling - it simply checks every\n possible pair of geoms for intersection, and reports the pairs\n whose AABBs overlap. The time required to do intersection testing\n for n objects is O(n**2). This should not be used for large numbers\n of objects, but it can be the preferred algorithm for a small\n number of objects. This is also useful for debugging potential\n problems with the collision system.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SimpleSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_SimpleSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SimpleSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11SimpleSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SimpleSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_HashSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_9HashSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_HashSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_HashSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_HashSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_HashSpace[] = { {"setLevels", (PyCFunction)__pyx_f_3ode_9HashSpace_setLevels, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9HashSpace_setLevels}, {"getLevels", (PyCFunction)__pyx_f_3ode_9HashSpace_getLevels, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9HashSpace_getLevels}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_HashSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_HashSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_HashSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_HashSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_HashSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.HashSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_HashSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_HashSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_HashSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_HashSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_HashSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_HashSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Multi-resolution hash table space.\n\n This uses an internal data structure that records how each geom\n overlaps cells in one of several three dimensional grids. Each\n grid has cubical cells of side lengths 2**i, where i is an integer\n that ranges from a minimum to a maximum value. The time required\n to do intersection testing for n objects is O(n) (as long as those\n objects are not clustered together too closely), as each object\n can be quickly paired with the objects around it.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_HashSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_HashSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_HashSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9HashSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_HashSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_QuadTreeSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_13QuadTreeSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_QuadTreeSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_QuadTreeSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_QuadTreeSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_QuadTreeSpace[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_QuadTreeSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_QuadTreeSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_QuadTreeSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_QuadTreeSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_QuadTreeSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.QuadTreeSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_QuadTreeSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_QuadTreeSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_QuadTreeSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_QuadTreeSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_QuadTreeSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_QuadTreeSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Quadtree space.\n\n This uses a pre-allocated hierarchical grid-based AABB tree to\n quickly cull collision checks. It\'s exceptionally quick for large\n amounts of objects in landscape-shaped worlds. The amount of\n memory used is 4**depth * 32 bytes.\n\n Currently getGeom() is not implemented for the quadtree space.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_QuadTreeSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_QuadTreeSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_QuadTreeSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_13QuadTreeSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_QuadTreeSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomSphere(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_10GeomSphere___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomSphere(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomSphere(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomSphere(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomSphere[] = { {"placeable", (PyCFunction)__pyx_f_3ode_10GeomSphere_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_10GeomSphere__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setRadius", (PyCFunction)__pyx_f_3ode_10GeomSphere_setRadius, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_setRadius}, {"getRadius", (PyCFunction)__pyx_f_3ode_10GeomSphere_getRadius, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_getRadius}, {"pointDepth", (PyCFunction)__pyx_f_3ode_10GeomSphere_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomSphere = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomSphere = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomSphere = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomSphere = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomSphere = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomSphere", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomSphere), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomSphere, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomSphere, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomSphere, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomSphere, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomSphere, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Sphere geometry.\n\n This class represents a sphere centered at the origin.\n\n Constructor::\n \n GeomSphere(space=None, radius=1.0)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomSphere, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomSphere, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomSphere, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10GeomSphere___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomSphere, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomBox(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_7GeomBox___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomBox(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomBox(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomBox(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomBox[] = { {"placeable", (PyCFunction)__pyx_f_3ode_7GeomBox_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_7GeomBox__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setLengths", (PyCFunction)__pyx_f_3ode_7GeomBox_setLengths, METH_VARARGS|METH_KEYWORDS, 0}, {"getLengths", (PyCFunction)__pyx_f_3ode_7GeomBox_getLengths, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_7GeomBox_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7GeomBox_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomBox = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomBox = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomBox = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomBox = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomBox = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomBox", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomBox), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomBox, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomBox, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomBox, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomBox, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomBox, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Box geometry.\n\n This class represents a box centered at the origin.\n\n Constructor::\n \n GeomBox(space=None, lengths=(1.0, 1.0, 1.0))\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomBox, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomBox, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomBox, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_7GeomBox___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomBox, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomPlane(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_9GeomPlane___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomPlane(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomPlane(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomPlane(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomPlane[] = { {"_id", (PyCFunction)__pyx_f_3ode_9GeomPlane__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_9GeomPlane_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_9GeomPlane_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_9GeomPlane_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9GeomPlane_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomPlane = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomPlane = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomPlane = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomPlane = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomPlane = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomPlane", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomPlane), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomPlane, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomPlane, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomPlane, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomPlane, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomPlane, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plane geometry.\n\n This class represents an infinite plane. The plane equation is:\n n.x*x + n.y*y + n.z*z = dist\n\n This object can\'t be attached to a body.\n If you call getBody() on this object it always returns ode.environment.\n\n Constructor::\n \n GeomPlane(space=None, normal=(0,0,1), dist=0)\n\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomPlane, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomPlane, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomPlane, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9GeomPlane___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomPlane, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomCapsule(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_11GeomCapsule___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomCapsule(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomCapsule(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomCapsule(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomCapsule[] = { {"placeable", (PyCFunction)__pyx_f_3ode_11GeomCapsule_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_11GeomCapsule__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_11GeomCapsule_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_11GeomCapsule_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_11GeomCapsule_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11GeomCapsule_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomCapsule = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomCapsule = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomCapsule = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomCapsule = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomCapsule = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomCapsule", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomCapsule), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomCapsule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomCapsule, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomCapsule, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomCapsule, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomCapsule, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Capped cylinder geometry.\n\n This class represents a capped cylinder aligned along the local Z axis\n and centered at the origin.\n\n Constructor::\n \n GeomCapsule(space=None, radius=0.5, length=1.0)\n\n The length parameter does not include the caps.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomCapsule, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomCapsule, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomCapsule, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11GeomCapsule___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomCapsule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomCylinder(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_12GeomCylinder___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomCylinder(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomCylinder(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomCylinder(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomCylinder[] = { {"placeable", (PyCFunction)__pyx_f_3ode_12GeomCylinder_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_12GeomCylinder__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_12GeomCylinder_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_12GeomCylinder_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomCylinder = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomCylinder = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomCylinder = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomCylinder = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomCylinder = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomCylinder", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomCylinder), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomCylinder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomCylinder, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomCylinder, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomCylinder, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomCylinder, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plain cylinder geometry.\n\n This class represents an uncapped cylinder aligned along the local Z axis\n and centered at the origin.\n\n Constructor::\n \n GeomCylinder(space=None, radius=0.5, length=1.0)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomCylinder, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomCylinder, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomCylinder, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12GeomCylinder___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomCylinder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomRay(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_7GeomRay___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomRay(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomRay(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomRay(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomRay[] = { {"_id", (PyCFunction)__pyx_f_3ode_7GeomRay__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setLength", (PyCFunction)__pyx_f_3ode_7GeomRay_setLength, METH_VARARGS|METH_KEYWORDS, 0}, {"getLength", (PyCFunction)__pyx_f_3ode_7GeomRay_getLength, METH_VARARGS|METH_KEYWORDS, 0}, {"set", (PyCFunction)__pyx_f_3ode_7GeomRay_set, METH_VARARGS|METH_KEYWORDS, 0}, {"get", (PyCFunction)__pyx_f_3ode_7GeomRay_get, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomRay = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomRay = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomRay = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomRay = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomRay = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomRay", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomRay), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomRay, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomRay, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomRay, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomRay, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomRay, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Ray object.\n\n A ray is different from all the other geom classes in that it does\n not represent a solid object. It is an infinitely thin line that\n starts from the geom\'s position and extends in the direction of\n the geom\'s local Z-axis.\n\n Constructor::\n \n GeomRay(space=None, rlen=1.0)\n \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomRay, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomRay, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomRay, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_7GeomRay___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomRay, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomTransform(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; p->geom = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_13GeomTransform___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomTransform(PyObject *o) { struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; Py_XDECREF(p->geom); __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomTransform(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; if (p->geom) { e = (*v)(p->geom, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_GeomTransform(PyObject *o) { struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; __pyx_ptype_3ode_GeomObject->tp_clear(o); Py_XDECREF(p->geom); p->geom = Py_None; Py_INCREF(Py_None); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomTransform[] = { {"placeable", (PyCFunction)__pyx_f_3ode_13GeomTransform_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_13GeomTransform__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setGeom", (PyCFunction)__pyx_f_3ode_13GeomTransform_setGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_setGeom}, {"getGeom", (PyCFunction)__pyx_f_3ode_13GeomTransform_getGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_getGeom}, {"setInfo", (PyCFunction)__pyx_f_3ode_13GeomTransform_setInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_setInfo}, {"getInfo", (PyCFunction)__pyx_f_3ode_13GeomTransform_getInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_getInfo}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomTransform = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomTransform = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomTransform = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomTransform = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomTransform = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomTransform", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomTransform), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomTransform, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomTransform, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomTransform, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomTransform, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomTransform, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "GeomTransform.\n\n A geometry transform \"T\" is a geom that encapsulates another geom\n \"E\", allowing E to be positioned and rotated arbitrarily with\n respect to its point of reference.\n\n Constructor::\n \n GeomTransform(space=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomTransform, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomTransform, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomTransform, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_13GeomTransform___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomTransform, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_TriMeshData(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); return o; } static void __pyx_tp_dealloc_3ode_TriMeshData(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_TriMeshData(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_TriMeshData(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_TriMeshData[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_TriMeshData = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_TriMeshData = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_TriMeshData = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_TriMeshData = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_TriMeshData = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.TriMeshData", /*tp_name*/ sizeof(struct __pyx_obj_3ode_TriMeshData), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_TriMeshData, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_TriMeshData, /*tp_as_number*/ &__pyx_tp_as_sequence_TriMeshData, /*tp_as_sequence*/ &__pyx_tp_as_mapping_TriMeshData, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_TriMeshData, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This class stores the mesh data.\n\n This is only a dummy class that\'s used when trimesh support was disabled.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_TriMeshData, /*tp_traverse*/ __pyx_tp_clear_3ode_TriMeshData, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_TriMeshData, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11TriMeshData___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_TriMeshData, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomTriMesh(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); return o; } static void __pyx_tp_dealloc_3ode_GeomTriMesh(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomTriMesh(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomTriMesh(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomTriMesh[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomTriMesh = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomTriMesh = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomTriMesh = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomTriMesh = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomTriMesh = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomTriMesh", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomTriMesh), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomTriMesh, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomTriMesh, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomTriMesh, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomTriMesh, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomTriMesh, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Trimesh object.\n \n This is only a dummy class that\'s used when trimesh support was disabled.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomTriMesh, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomTriMesh, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomTriMesh, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11GeomTriMesh___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomTriMesh, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static struct PyMethodDef __pyx_methods[] = { {"Space", (PyCFunction)__pyx_f_3ode_Space, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_Space}, {"collide", (PyCFunction)__pyx_f_3ode_collide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_collide}, {"collide2", (PyCFunction)__pyx_f_3ode_collide2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_collide2}, {"areConnected", (PyCFunction)__pyx_f_3ode_areConnected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_areConnected}, {"CloseODE", (PyCFunction)__pyx_f_3ode_CloseODE, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_CloseODE}, {0, 0, 0, 0} }; static void __pyx_init_filenames(void); /*proto*/ PyMODINIT_FUNC initode(void); /*proto*/ PyMODINIT_FUNC initode(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; PyObject *__pyx_11 = 0; PyObject *__pyx_12 = 0; PyObject *__pyx_13 = 0; PyObject *__pyx_14 = 0; PyObject *__pyx_15 = 0; PyObject *__pyx_16 = 0; PyObject *__pyx_17 = 0; PyObject *__pyx_18 = 0; PyObject *__pyx_19 = 0; PyObject *__pyx_20 = 0; __pyx_init_filenames(); __pyx_m = Py_InitModule4("ode", __pyx_methods, 0, 0, PYTHON_API_VERSION); if (!__pyx_m) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;}; __pyx_b = PyImport_AddModule("__builtin__"); if (!__pyx_b) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;}; if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;}; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;}; if (PyType_Ready(&__pyx_type_3ode_Mass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Mass", (PyObject *)&__pyx_type_3ode_Mass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} __pyx_ptype_3ode_Mass = &__pyx_type_3ode_Mass; if (PyType_Ready(&__pyx_type_3ode_Contact) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Contact", (PyObject *)&__pyx_type_3ode_Contact) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_Contact = &__pyx_type_3ode_Contact; if (PyType_Ready(&__pyx_type_3ode_World) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "World", (PyObject *)&__pyx_type_3ode_World) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_World = &__pyx_type_3ode_World; __pyx_type_3ode_Body.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_Body) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Body", (PyObject *)&__pyx_type_3ode_Body) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_Body = &__pyx_type_3ode_Body; __pyx_type_3ode_JointGroup.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_JointGroup) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "JointGroup", (PyObject *)&__pyx_type_3ode_JointGroup) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; goto __pyx_L1;} __pyx_ptype_3ode_JointGroup = &__pyx_type_3ode_JointGroup; __pyx_type_3ode_Joint.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Joint", (PyObject *)&__pyx_type_3ode_Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; goto __pyx_L1;} __pyx_ptype_3ode_Joint = &__pyx_type_3ode_Joint; __pyx_type_3ode_BallJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_BallJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 258; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "BallJoint", (PyObject *)&__pyx_type_3ode_BallJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_ptype_3ode_BallJoint = &__pyx_type_3ode_BallJoint; __pyx_type_3ode_HingeJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_HingeJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 330; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "HingeJoint", (PyObject *)&__pyx_type_3ode_HingeJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 330; goto __pyx_L1;} __pyx_ptype_3ode_HingeJoint = &__pyx_type_3ode_HingeJoint; __pyx_type_3ode_SliderJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_SliderJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 484; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SliderJoint", (PyObject *)&__pyx_type_3ode_SliderJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 484; goto __pyx_L1;} __pyx_ptype_3ode_SliderJoint = &__pyx_type_3ode_SliderJoint; __pyx_type_3ode_UniversalJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_UniversalJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 570; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "UniversalJoint", (PyObject *)&__pyx_type_3ode_UniversalJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 570; goto __pyx_L1;} __pyx_ptype_3ode_UniversalJoint = &__pyx_type_3ode_UniversalJoint; __pyx_type_3ode_Hinge2Joint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_Hinge2Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 697; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Hinge2Joint", (PyObject *)&__pyx_type_3ode_Hinge2Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 697; goto __pyx_L1;} __pyx_ptype_3ode_Hinge2Joint = &__pyx_type_3ode_Hinge2Joint; __pyx_type_3ode_FixedJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_FixedJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 853; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "FixedJoint", (PyObject *)&__pyx_type_3ode_FixedJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 853; goto __pyx_L1;} __pyx_ptype_3ode_FixedJoint = &__pyx_type_3ode_FixedJoint; __pyx_type_3ode_ContactJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_ContactJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 888; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "ContactJoint", (PyObject *)&__pyx_type_3ode_ContactJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 888; goto __pyx_L1;} __pyx_ptype_3ode_ContactJoint = &__pyx_type_3ode_ContactJoint; __pyx_type_3ode_AMotor.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_AMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 911; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "AMotor", (PyObject *)&__pyx_type_3ode_AMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 911; goto __pyx_L1;} __pyx_ptype_3ode_AMotor = &__pyx_type_3ode_AMotor; __pyx_type_3ode_LMotor.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_LMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1084; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "LMotor", (PyObject *)&__pyx_type_3ode_LMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1084; goto __pyx_L1;} __pyx_ptype_3ode_LMotor = &__pyx_type_3ode_LMotor; __pyx_type_3ode_Plane2DJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_Plane2DJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1173; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Plane2DJoint", (PyObject *)&__pyx_type_3ode_Plane2DJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1173; goto __pyx_L1;} __pyx_ptype_3ode_Plane2DJoint = &__pyx_type_3ode_Plane2DJoint; __pyx_type_3ode_GeomObject.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_GeomObject) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomObject", (PyObject *)&__pyx_type_3ode_GeomObject) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_ptype_3ode_GeomObject = &__pyx_type_3ode_GeomObject; __pyx_type_3ode_SpaceBase.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_SpaceBase) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SpaceBase", (PyObject *)&__pyx_type_3ode_SpaceBase) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; goto __pyx_L1;} __pyx_ptype_3ode_SpaceBase = &__pyx_type_3ode_SpaceBase; __pyx_type_3ode_SimpleSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_SimpleSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SimpleSpace", (PyObject *)&__pyx_type_3ode_SimpleSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; goto __pyx_L1;} __pyx_ptype_3ode_SimpleSpace = &__pyx_type_3ode_SimpleSpace; __pyx_type_3ode_HashSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_HashSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 254; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "HashSpace", (PyObject *)&__pyx_type_3ode_HashSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_ptype_3ode_HashSpace = &__pyx_type_3ode_HashSpace; __pyx_type_3ode_QuadTreeSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_QuadTreeSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 314; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "QuadTreeSpace", (PyObject *)&__pyx_type_3ode_QuadTreeSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 314; goto __pyx_L1;} __pyx_ptype_3ode_QuadTreeSpace = &__pyx_type_3ode_QuadTreeSpace; __pyx_type_3ode_GeomSphere.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomSphere) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomSphere", (PyObject *)&__pyx_type_3ode_GeomSphere) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_GeomSphere = &__pyx_type_3ode_GeomSphere; __pyx_type_3ode_GeomBox.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomBox) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 92; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomBox", (PyObject *)&__pyx_type_3ode_GeomBox) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_ptype_3ode_GeomBox = &__pyx_type_3ode_GeomBox; __pyx_type_3ode_GeomPlane.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomPlane) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomPlane", (PyObject *)&__pyx_type_3ode_GeomPlane) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_ptype_3ode_GeomPlane = &__pyx_type_3ode_GeomPlane; __pyx_type_3ode_GeomCapsule.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomCapsule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 213; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomCapsule", (PyObject *)&__pyx_type_3ode_GeomCapsule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 213; goto __pyx_L1;} __pyx_ptype_3ode_GeomCapsule = &__pyx_type_3ode_GeomCapsule; __pyx_type_3ode_GeomCylinder.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomCylinder) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 277; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomCylinder", (PyObject *)&__pyx_type_3ode_GeomCylinder) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_ptype_3ode_GeomCylinder = &__pyx_type_3ode_GeomCylinder; __pyx_type_3ode_GeomRay.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomRay) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 326; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomRay", (PyObject *)&__pyx_type_3ode_GeomRay) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 326; goto __pyx_L1;} __pyx_ptype_3ode_GeomRay = &__pyx_type_3ode_GeomRay; __pyx_type_3ode_GeomTransform.tp_base = __pyx_ptype_3ode_GeomObject; __pyx_type_3ode_GeomTransform.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_GeomTransform) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomTransform", (PyObject *)&__pyx_type_3ode_GeomTransform) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; goto __pyx_L1;} __pyx_ptype_3ode_GeomTransform = &__pyx_type_3ode_GeomTransform; if (PyType_Ready(&__pyx_type_3ode_TriMeshData) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 26; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "TriMeshData", (PyObject *)&__pyx_type_3ode_TriMeshData) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 26; goto __pyx_L1;} __pyx_ptype_3ode_TriMeshData = &__pyx_type_3ode_TriMeshData; __pyx_type_3ode_GeomTriMesh.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomTriMesh) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 36; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomTriMesh", (PyObject *)&__pyx_type_3ode_GeomTriMesh) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 36; goto __pyx_L1;} __pyx_ptype_3ode_GeomTriMesh = &__pyx_type_3ode_GeomTriMesh; /* "/home/zefiris/pyode/src/ode.pyx":33 */ if (PyObject_SetAttr(__pyx_m, __pyx_n___doc__, __pyx_k1p) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 33; goto __pyx_L1;} /* "/home/zefiris/pyode/src/ode.pyx":81 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 81; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramLoStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":82 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 82; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramHiStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 82; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":83 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramVel, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":84 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 84; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramFMax, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 84; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":85 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramFudgeFactor, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":86 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 86; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":87 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 87; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 87; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":88 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramStopERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":89 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 89; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramStopCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 89; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":90 */ __pyx_1 = PyInt_FromLong(9); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 90; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramSuspensionERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 90; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":91 */ __pyx_1 = PyInt_FromLong(10); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 91; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramSuspensionCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 91; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":93 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 93; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 93; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":94 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 94; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 94; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":95 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 95; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 95; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":96 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 96; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":97 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":98 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 98; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":99 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 99; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 99; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":100 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 100; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 100; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":101 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 101; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 101; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":102 */ __pyx_1 = PyInt_FromLong(9); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 102; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 102; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":103 */ __pyx_1 = PyInt_FromLong(10); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":105 */ __pyx_1 = PyInt_FromLong((256 + 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":106 */ __pyx_1 = PyInt_FromLong((256 + 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 106; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":107 */ __pyx_1 = PyInt_FromLong((256 + 2)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 107; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":108 */ __pyx_1 = PyInt_FromLong((256 + 3)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 108; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 108; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":109 */ __pyx_1 = PyInt_FromLong((256 + 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":110 */ __pyx_1 = PyInt_FromLong((256 + 5)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":111 */ __pyx_1 = PyInt_FromLong((256 + 6)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 111; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":112 */ __pyx_1 = PyInt_FromLong((256 + 7)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 112; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":113 */ __pyx_1 = PyInt_FromLong((256 + 8)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 113; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":114 */ __pyx_1 = PyInt_FromLong((256 + 9)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":115 */ __pyx_1 = PyInt_FromLong((256 + 10)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 115; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":117 */ __pyx_1 = PyInt_FromLong((512 + 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 117; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":118 */ __pyx_1 = PyInt_FromLong((512 + 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 118; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":119 */ __pyx_1 = PyInt_FromLong((512 + 2)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 119; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":120 */ __pyx_1 = PyInt_FromLong((512 + 3)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":121 */ __pyx_1 = PyInt_FromLong((512 + 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 121; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":122 */ __pyx_1 = PyInt_FromLong((512 + 5)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":123 */ __pyx_1 = PyInt_FromLong((512 + 6)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":124 */ __pyx_1 = PyInt_FromLong((512 + 7)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":125 */ __pyx_1 = PyInt_FromLong((512 + 8)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 125; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 125; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":126 */ __pyx_1 = PyInt_FromLong((512 + 9)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 126; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 126; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":127 */ __pyx_1 = PyInt_FromLong((512 + 10)); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 127; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 127; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":129 */ __pyx_1 = PyInt_FromLong(256); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 129; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamGroup, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":131 */ __pyx_1 = PyInt_FromLong(0x001); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 131; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMu2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 131; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":132 */ __pyx_1 = PyInt_FromLong(0x002); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 132; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactFDir1, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 132; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":133 */ __pyx_1 = PyInt_FromLong(0x004); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 133; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 133; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":134 */ __pyx_1 = PyInt_FromLong(0x008); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 134; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSoftERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":135 */ __pyx_1 = PyInt_FromLong(0x010); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 135; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSoftCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 135; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":136 */ __pyx_1 = PyInt_FromLong(0x020); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 136; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMotion1, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":137 */ __pyx_1 = PyInt_FromLong(0x040); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 137; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMotion2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 137; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":138 */ __pyx_1 = PyInt_FromLong(0x080); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 138; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSlip1, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 138; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":139 */ __pyx_1 = PyInt_FromLong(0x100); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSlip2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":141 */ __pyx_1 = PyInt_FromLong(0x0000); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 141; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox0, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 141; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":142 */ __pyx_1 = PyInt_FromLong(0x1000); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 142; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1_1, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 142; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":143 */ __pyx_1 = PyInt_FromLong(0x2000); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":144 */ __pyx_1 = PyInt_FromLong(0x3000); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 144; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":146 */ __pyx_1 = PyInt_FromLong(dAMotorUser); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 146; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_AMotorUser, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 146; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":147 */ __pyx_1 = PyInt_FromLong(dAMotorEuler); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_AMotorEuler, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":149 */ __pyx_1 = PyFloat_FromDouble(dInfinity); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 149; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_Infinity, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 149; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":154 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 154; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n__geom_c2py_lut, __pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 154; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/contact.pyx":309 */ Py_INCREF(Py_None); __pyx_k2 = Py_None; Py_INCREF(Py_None); __pyx_k3 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":202 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_k4 = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":266 */ Py_INCREF(Py_None); __pyx_k5 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":276 */ Py_INCREF(Py_None); __pyx_k6 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":338 */ Py_INCREF(Py_None); __pyx_k7 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":348 */ Py_INCREF(Py_None); __pyx_k8 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":492 */ Py_INCREF(Py_None); __pyx_k9 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":502 */ Py_INCREF(Py_None); __pyx_k10 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":578 */ Py_INCREF(Py_None); __pyx_k11 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":588 */ Py_INCREF(Py_None); __pyx_k12 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":705 */ Py_INCREF(Py_None); __pyx_k13 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":715 */ Py_INCREF(Py_None); __pyx_k14 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":861 */ Py_INCREF(Py_None); __pyx_k15 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":871 */ Py_INCREF(Py_None); __pyx_k16 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":919 */ Py_INCREF(Py_None); __pyx_k17 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":929 */ Py_INCREF(Py_None); __pyx_k18 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1092 */ Py_INCREF(Py_None); __pyx_k19 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1102 */ Py_INCREF(Py_None); __pyx_k20 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1181 */ Py_INCREF(Py_None); __pyx_k21 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1191 */ Py_INCREF(Py_None); __pyx_k22 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":23 */ __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} if (PyDict_SetItemString(__pyx_2, "__doc__", __pyx_k24p) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_4 = __Pyx_CreateClass(__pyx_3, __pyx_2, __pyx_n__SpaceIterator, "ode"); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":27 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator___init__, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n___init__, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/space.pyx":31 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator___iter__, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n___iter__, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/space.pyx":34 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator_next, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n_next, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n__SpaceIterator, __pyx_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/space.pyx":233 */ Py_INCREF(Py_None); __pyx_k25 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":250 */ Py_INCREF(Py_None); __pyx_k26 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":266 */ Py_INCREF(Py_None); __pyx_k27 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":283 */ Py_INCREF(Py_None); __pyx_k28 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":325 */ Py_INCREF(Py_None); __pyx_k29 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":350 */ Py_INCREF(Py_None); __pyx_k30 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":354 */ __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; goto __pyx_L1;} __pyx_k31 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":33 */ Py_INCREF(Py_None); __pyx_k32 = Py_None; __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; goto __pyx_L1;} __pyx_k33 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":48 */ Py_INCREF(Py_None); __pyx_k34 = Py_None; __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 48; goto __pyx_L1;} __pyx_k35 = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":102 */ Py_INCREF(Py_None); __pyx_k36 = Py_None; __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble(1.0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_8 = PyTuple_New(3); if (!__pyx_8) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_8, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_8, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k37 = __pyx_8; __pyx_8 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":116 */ Py_INCREF(Py_None); __pyx_k38 = Py_None; __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble(1.0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_9 = PyTuple_New(3); if (!__pyx_9) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_9, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_9, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_9, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k39 = __pyx_9; __pyx_9 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":166 */ Py_INCREF(Py_None); __pyx_k40 = Py_None; __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_10 = PyTuple_New(3); if (!__pyx_10) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_10, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_10, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_10, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k41 = __pyx_10; __pyx_10 = 0; __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_k42 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":181 */ Py_INCREF(Py_None); __pyx_k43 = Py_None; __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_11 = PyInt_FromLong(1); if (!__pyx_11) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_12 = PyTuple_New(3); if (!__pyx_12) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_12, 0, __pyx_6); PyTuple_SET_ITEM(__pyx_12, 1, __pyx_7); PyTuple_SET_ITEM(__pyx_12, 2, __pyx_11); __pyx_6 = 0; __pyx_7 = 0; __pyx_11 = 0; __pyx_k44 = __pyx_12; __pyx_12 = 0; __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_k45 = __pyx_6; __pyx_6 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":226 */ Py_INCREF(Py_None); __pyx_k46 = Py_None; __pyx_7 = PyFloat_FromDouble(0.5); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 226; goto __pyx_L1;} __pyx_k47 = __pyx_7; __pyx_7 = 0; __pyx_11 = PyFloat_FromDouble(1.0); if (!__pyx_11) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 226; goto __pyx_L1;} __pyx_k48 = __pyx_11; __pyx_11 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":240 */ Py_INCREF(Py_None); __pyx_k49 = Py_None; __pyx_13 = PyFloat_FromDouble(0.5); if (!__pyx_13) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; goto __pyx_L1;} __pyx_k50 = __pyx_13; __pyx_13 = 0; __pyx_14 = PyFloat_FromDouble(1.0); if (!__pyx_14) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; goto __pyx_L1;} __pyx_k51 = __pyx_14; __pyx_14 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":273 */ if (PyObject_SetAttr(__pyx_m, __pyx_n_GeomCCylinder, ((PyObject*)__pyx_ptype_3ode_GeomCapsule)) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 273; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geoms.pyx":288 */ Py_INCREF(Py_None); __pyx_k52 = Py_None; __pyx_15 = PyFloat_FromDouble(0.5); if (!__pyx_15) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_k53 = __pyx_15; __pyx_15 = 0; __pyx_16 = PyFloat_FromDouble(1.0); if (!__pyx_16) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_k54 = __pyx_16; __pyx_16 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":302 */ Py_INCREF(Py_None); __pyx_k55 = Py_None; __pyx_17 = PyFloat_FromDouble(0.5); if (!__pyx_17) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_k56 = __pyx_17; __pyx_17 = 0; __pyx_18 = PyFloat_FromDouble(1.0); if (!__pyx_18) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_k57 = __pyx_18; __pyx_18 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":340 */ Py_INCREF(Py_None); __pyx_k58 = Py_None; __pyx_19 = PyFloat_FromDouble(1.0); if (!__pyx_19) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_k59 = __pyx_19; __pyx_19 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":355 */ Py_INCREF(Py_None); __pyx_k60 = Py_None; __pyx_20 = PyFloat_FromDouble(1.0); if (!__pyx_20) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 355; goto __pyx_L1;} __pyx_k61 = __pyx_20; __pyx_20 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":395 */ Py_INCREF(Py_None); __pyx_k62 = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":412 */ Py_INCREF(Py_None); __pyx_k63 = Py_None; /* "src/trimesh_dummy.pyx":42 */ Py_INCREF(Py_None); __pyx_k64 = Py_None; /* "/home/zefiris/pyode/src/ode.pyx":292 */ if (PyObject_SetAttr(__pyx_m, __pyx_n_environment, Py_None) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 292; goto __pyx_L1;} return; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); Py_XDECREF(__pyx_11); Py_XDECREF(__pyx_12); Py_XDECREF(__pyx_13); Py_XDECREF(__pyx_14); Py_XDECREF(__pyx_15); Py_XDECREF(__pyx_16); Py_XDECREF(__pyx_17); Py_XDECREF(__pyx_18); Py_XDECREF(__pyx_19); Py_XDECREF(__pyx_20); __Pyx_AddTraceback("ode"); } static char *__pyx_filenames[] = { "mass.pyx", "contact.pyx", "world.pyx", "body.pyx", "joints.pyx", "geomobject.pyx", "space.pyx", "geoms.pyx", "trimesh_dummy.pyx", "ode.pyx", }; /* Runtime support code */ static void __pyx_init_filenames(void) { __pyx_f = __pyx_filenames; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, obj->ob_type->tp_name); return 0; } static int __Pyx_GetStarArgs( PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2) { PyObject *x = 0, *args1 = 0, *kwds1 = 0; if (args2) *args2 = 0; if (kwds2) *kwds2 = 0; if (args2) { args1 = PyTuple_GetSlice(*args, 0, nargs); if (!args1) goto bad; *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args)); if (!*args2) goto bad; } else { args1 = *args; Py_INCREF(args1); } if (kwds2) { if (*kwds) { char **p; kwds1 = PyDict_New(); if (!kwds) goto bad; *kwds2 = PyDict_Copy(*kwds); if (!*kwds2) goto bad; for (p = kwd_list; *p; p++) { x = PyDict_GetItemString(*kwds, *p); if (x) { if (PyDict_SetItemString(kwds1, *p, x) < 0) goto bad; if (PyDict_DelItemString(*kwds2, *p) < 0) goto bad; } } } else { *kwds2 = PyDict_New(); if (!*kwds2) goto bad; } } else { kwds1 = *kwds; Py_XINCREF(kwds1); } *args = args1; *kwds = kwds1; return 0; bad: Py_XDECREF(args1); Py_XDECREF(kwds1); if (*args2) { Py_XDECREF(*args2); } if (*kwds2) { Py_XDECREF(*kwds2); } return -1; } static PyObject *__Pyx_CreateClass( PyObject *bases, PyObject *dict, PyObject *name, char *modname) { PyObject *py_modname; PyObject *result = 0; py_modname = PyString_FromString(modname); if (!py_modname) goto bad; if (PyDict_SetItemString(dict, "__module__", py_modname) < 0) goto bad; result = PyClass_New(bases, dict, name); bad: Py_XDECREF(py_modname); return result; } static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) PyErr_SetObject(PyExc_NameError, name); return result; } static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); /* First, check the traceback argument, replacing None with NULL. */ if (tb == Py_None) { Py_DECREF(tb); tb = 0; } else if (tb != NULL && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } /* Next, replace a missing value with None */ if (value == NULL) { value = Py_None; Py_INCREF(value); } /* Next, repeatedly, replace a tuple exception with its first item */ while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { PyObject *tmp = type; type = PyTuple_GET_ITEM(type, 0); Py_INCREF(type); Py_DECREF(tmp); } if (PyString_Check(type)) { if (PyErr_Warn(PyExc_DeprecationWarning, "raising a string exception is deprecated")) goto raise_error; } else if (PyType_Check(type) || PyClass_Check(type)) ; /*PyErr_NormalizeException(&type, &value, &tb);*/ else { /* Raising an instance. The value should be a dummy. */ if (value != Py_None) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } /* Normalize to raise , */ Py_DECREF(value); value = type; if (PyInstance_Check(type)) type = (PyObject*) ((PyInstanceObject*)type)->in_class; else type = (PyObject*) type->ob_type; Py_INCREF(type); } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } static PyObject *__Pyx_GetExcValue(void) { PyObject *type = 0, *value = 0, *tb = 0; PyObject *result = 0; PyThreadState *tstate = PyThreadState_Get(); PyErr_Fetch(&type, &value, &tb); PyErr_NormalizeException(&type, &value, &tb); if (PyErr_Occurred()) goto bad; if (!value) { value = Py_None; Py_INCREF(value); } Py_XDECREF(tstate->exc_type); Py_XDECREF(tstate->exc_value); Py_XDECREF(tstate->exc_traceback); tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; result = value; Py_XINCREF(result); type = 0; value = 0; tb = 0; bad: Py_XDECREF(type); Py_XDECREF(value); Py_XDECREF(tb); return result; } static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (obj == Py_None || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", obj->ob_type->tp_name, type->tp_name); return 0; } static void __Pyx_UnpackError(void) { PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size"); } static PyObject *__Pyx_UnpackItem(PyObject *iter) { PyObject *item; if (!(item = PyIter_Next(iter))) { if (!PyErr_Occurred()) __Pyx_UnpackError(); } return item; } static int __Pyx_EndUnpack(PyObject *iter) { PyObject *item; if ((item = PyIter_Next(iter))) { Py_DECREF(item); __Pyx_UnpackError(); return -1; } else if (!PyErr_Occurred()) return 0; else return -1; } static void __Pyx_WriteUnraisable(char *name) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; PyErr_Fetch(&old_exc, &old_val, &old_tb); ctx = PyString_FromString(name); PyErr_Restore(old_exc, old_val, old_tb); if (!ctx) ctx = Py_None; PyErr_WriteUnraisable(ctx); } static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { while (t->p) { *t->p = PyString_InternFromString(t->s); if (!*t->p) return -1; ++t; } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; ++t; } return 0; } #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(__pyx_filename); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = __pyx_lineno; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } PyODE-1.2.0/LICENSE-BSD0000644000175000001440000000322410144240730013433 0ustar zefirisusers This is the BSD-style license for the Python Open Dynamics Engine Wrapper ------------------------------------------------------------------------- Python Open Dynamics Engine Wrapper Copyright (c) 2004, PyODE developers (see file AUTHORS) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the names of ODE's copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PyODE-1.2.0/AUTHORS0000644000175000001440000000014310146316004013065 0ustar zefirisusersTimothy Stranex Matthias Baas Brett Hartshorn Bernie Roehl PyODE-1.2.0/setup.py0000644000175000001440000001152710551463723013552 0ustar zefirisusers###################################################################### # setup script for the Python wrapper of ODE ###################################################################### from distutils.core import setup, Extension import distutils.sysconfig import shutil, os, os.path, sys, glob from stat import * # Include directories INC_DIRS = [] # Library directories LIB_DIRS = [] # Libraries to link with LIBS = [] # Additional compiler arguments CC_ARGS = [] # Additional linker arguments LINK_ARGS = [] # If your version of ODE was compiled with OPCODE (trimesh support) enabled, # this should be set to True. TRIMESH_ENABLE = True ###################################################################### # Windows specific settings ###################################################################### if sys.platform=="win32": ODE_BASE = r"insert_your_path_here" INC_DIRS += [os.path.join(ODE_BASE, "include")] LIB_DIRS += [os.path.join(ODE_BASE, "lib", "releaselib")] LIBS += ["ode", "user32"] # user32 because of the MessageBox() call CC_ARGS += ["/ML"] LINK_ARGS += ["/NODEFAULTLIB:LIBCMT"] ###################################################################### # Linux (and other) specific settings ###################################################################### else: for base in ["/usr", "/usr/local", "/opt/local"]: INC_DIRS += [os.path.join(base, "include")] LIB_DIRS += [os.path.join(base, "lib")] LIBS += ["ode", "stdc++"] ###################################################################### ###################################################################### ###################################################################### def info(msg): """Output an info message. """ print "INFO:",msg def warning(msg): """Output a warning message. """ print "WARNING:",msg def error(msg, errorcode=1): """Output an error message and abort. """ print "ERROR:",msg sys.exit(errorcode) # Generate the C source file (if necessary) def generate(name, trimesh_support): """Run Pyrex to generate the extension module source code. """ # Generate the trimesh_switch file f = file("_trimesh_switch.pyx", "wt") print >>f, '# This file was generated by the setup script and is included in ode.pyx.\n' if (trimesh_support): print >>f, 'include "trimeshdata.pyx"' print >>f, 'include "trimesh.pyx"' else: print >>f, 'include "trimesh_dummy.pyx"' f.close() cmd = "pyrexc -o %s -I. -Isrc src/ode.pyx" % name pyrex_out = name # Check if the pyrex output is still up to date or if it has to be generated # (ode.c will be updated if any of the *.pyx files in the directory "src" # is newer than ode.c) if os.access(pyrex_out, os.F_OK): ctime = os.stat(pyrex_out)[ST_MTIME] for pyx in glob.glob("src/*.pyx"): pytime = os.stat(pyx)[ST_MTIME] if pytime>ctime: info("Updating %s"%pyrex_out) print cmd err = os.system(cmd) break else: info("%s is up to date"%pyrex_out) err = 0 else: info("Creating %s"%pyrex_out) print cmd err = os.system(cmd) # Check if calling pyrex produced an error if err!=0: error("An error occured while generating the C source file.", err) ###################################################################### # Check if ode.h can be found # (if it is not found it might not be an error because it may be located # in any of the include paths that are built into the compiler) num = 0 for path in INC_DIRS: ode_h = os.path.join(path, "ode", "ode.h") if os.path.exists(ode_h): info(" found in %s"%path) num += 1 if num==0: warning(" not found. You may have to adjust INC_DIRS.") elif num>1: warning("ode.h was found more than once. Make sure the header and lib matches.") # Generate all possible source code versions so that they can be # packaged with the source archive and a user doesn't require Pyrex generate('ode_trimesh.c', True) generate('ode_notrimesh.c', False) if (TRIMESH_ENABLE): info("Installing with trimesh support.") install = 'ode_trimesh.c' else: info("INFO: Installing without trimesh support.") install = 'ode_notrimesh.c' # Compile the module setup(name = "PyODE", version = "1.2.0", description = "Python wrapper for the Open Dynamics Engine", author = "see file AUTHORS", author_email = "timothy@stranex.com", license = "BSD or LGPL", url = "http://pyode.sourceforge.net/", packages = ["xode"], ext_modules = [Extension("ode", [install] ,libraries=LIBS ,include_dirs=INC_DIRS ,library_dirs=LIB_DIRS ,extra_compile_args=CC_ARGS ,extra_link_args=LINK_ARGS) ]) PyODE-1.2.0/INSTALL0000644000175000001440000000212710551204406013054 0ustar zefirisusersInstallation instructions for all systems ========================================= Requirements: ------------- - Python v2.2 (or higher) http://www.python.org/ - ODE 0.7 http://ode.org/ - Pyrex 0.9.3 (or higher) http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ This is only required for PyODE development; you don't need it to install and run PyODE. Installation: ------------- The package uses the Python distutils, so you can build it by calling python setup.py build and install it by calling python setup.py install which installs the package on your system. See the "Installing Python Modules" manual inside your Python documentation or at http://docs.python.org/inst/inst.html if you want to customize the build process or the target location. Note: It is assumed that the ODE library is already compiled and installed somewhere on your system. The setup script will try to find the ODE installation on your system by trying several common locations. However, if the installation can not be found, you will have to modify the setup.py script and add the appropriate paths. PyODE-1.2.0/examples/0000755000175000001440000000000010561403670013644 5ustar zefirisusersPyODE-1.2.0/examples/transforms.py0000644000175000001440000001355110146316005016413 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # PyODE Example: Transforms # This example demonstrates the way object transforms are calculated relative # to the parent element's transform in XODE. from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * from cgtypes import * import pygame import math import ode import xode.parser doc = ''' ''' def prepare_GL(c): """Prepare drawing. """ # Viewport glViewport(0, 0, 640, 480) # Initialize glClearColor(0.8, 0.8, 0.9, 0) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST) glDisable(GL_LIGHTING) glEnable(GL_LIGHTING) glEnable(GL_NORMALIZE) glShadeModel(GL_FLAT) # Projection glMatrixMode(GL_PROJECTION) glLoadIdentity() P = mat4(1).perspective(45,1.3333,0.2,20) glMultMatrixd(P.toList()) # Initialize ModelView matrix glMatrixMode(GL_MODELVIEW) glLoadIdentity() # Light source glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) glEnable(GL_LIGHT0) # View transformation V = mat4(1).lookAt(1.2*vec3(0.5*c,0.7*c,c),(1.0,1.0,0), up=(0,1,0)) V.rotate(math.pi,vec3(0,1,0)) V = V.inverse() glMultMatrixd(V.toList()) def draw_body(body): """Draw an ODE body. """ x,y,z = body.getPosition() R = body.getRotation() T = mat4() T[0,0] = R[0] T[0,1] = R[1] T[0,2] = R[2] T[1,0] = R[3] T[1,1] = R[4] T[1,2] = R[5] T[2,0] = R[6] T[2,1] = R[7] T[2,2] = R[8] T[3] = (x,y,z,1.0) glPushMatrix() glMultMatrixd(T.toList()) if body.shape=="box": sx,sy,sz = body.boxsize glScale(sx, sy, sz) glutSolidCube(1) glPopMatrix() ###################################################################### # Initialize pygame passed, failed = pygame.init() # Open a window srf = pygame.display.set_mode((640,480), pygame.OPENGL | pygame.DOUBLEBUF) root = xode.parser.Parser().parseString(doc) world = root.namedChild('world1').getODEObject() world.setGravity( (0, 0, 0) ) # Add all ODE bodies from the XODE document into bodies. def transverse(node): obj = node.getODEObject() if (isinstance(obj, ode.Body)): # Set attributes for draw_body() obj.shape = 'box' obj.boxsize = (0.4, 0.4, 0.4) bodies.append(obj) for node in node.getChildren(): transverse(node) bodies = [] transverse(root) # Some variables used inside the simulation loop fps = 50 dt = 1.0/fps counter = 0.0 running = True clk = pygame.time.Clock() while running: events = pygame.event.get() for e in events: if e.type==pygame.QUIT: running=False if (counter < 5): counter = counter + 0.1 # Draw the scene prepare_GL(counter) for b in bodies: draw_body(b) pygame.display.flip() # Simulate n = 2 for i in range(n): world.step(dt/n) clk.tick(fps) PyODE-1.2.0/examples/tutorial1.py0000644000175000001440000000112710067631030016135 0ustar zefirisusers# pyODE example 1: Getting started import ode # Create a world object world = ode.World() world.setGravity( (0,-9.81,0) ) # Create a body inside the world body = ode.Body(world) M = ode.Mass() M.setSphere(2500.0, 0.05) M.mass = 1.0 body.setMass(M) body.setPosition( (0,2,0) ) body.addForce( (0,200,0) ) # Do the simulation... total_time = 0.0 dt = 0.04 while total_time<2.0: x,y,z = body.getPosition() u,v,w = body.getLinearVel() print "%1.2fsec: pos=(%6.3f, %6.3f, %6.3f) vel=(%6.3f, %6.3f, %6.3f)" % \ (total_time, x, y, z, u,v,w) world.step(dt) total_time+=dt PyODE-1.2.0/examples/tutorial2.py0000644000175000001440000000705610075737715016165 0ustar zefirisusers# ODE Demo import sys import pygame from pygame.locals import * import ode import xode.parser doc = ''' ''' def coord(x,y): "Convert world coordinates to pixel coordinates." return 320+170*x, 400-170*y def buildObjects(): world = ode.World() world.setGravity((0,-9.81,0)) body1 = ode.Body(world) M = ode.Mass() M.setSphere(2500, 0.05) body1.setMass(M) body1.setPosition((1,2,0)) body2 = ode.Body(world) M = ode.Mass() M.setSphere(2500, 0.05) body2.setMass(M) body2.setPosition((2,2,0)) j1 = ode.BallJoint(world) j1.attach(body1, ode.environment) j1.setAnchor( (0,2,0) ) #j1 = ode.HingeJoint(world) #j1.attach(body1, ode.environment) #j1.setAnchor( (0,2,0) ) #j1.setAxis( (0,0,1) ) #j1.setParam(ode.ParamVel, 3) #j1.setParam(ode.ParamFMax, 22) j2 = ode.BallJoint(world) j2.attach(body1, body2) j2.setAnchor( (1,2,0) ) return world, body1, body2, j1, j2 def buildObjectsXODE(): p = xode.parser.Parser() root = p.parseString(doc) world = root.namedChild('world').getODEObject() body1 = root.namedChild('body1').getODEObject() body2 = root.namedChild('body2').getODEObject() j1 = root.namedChild('joint1').getODEObject() j2 = root.namedChild('joint2').getODEObject() world.setGravity((0,-9.81,0)) #body1.setPosition((1,2,0)) #body2.setPosition((2,2,0)) #j1 = ode.BallJoint(world) #j1.attach(body1, ode.environment) #j1.setAnchor( (0,2,0) ) #j2 = ode.BallJoint(world) #j2.attach(body1, body2) #j2.setAnchor( (1,2,0) ) return world, body1, body2, j1, j2 def simulate(world, body1, body2): # Initialize pygame pygame.init() # Open a display srf = pygame.display.set_mode((640,480)) clk = pygame.time.Clock() # Keep the window open and wait for a key fps = 50 dt = 1.0/fps loopFlag = True while loopFlag: events = pygame.event.get() for e in events: if e.type==QUIT: loopFlag=False # Clear the screen srf.fill((255,255,255)) x1,y1,z1 = body1.getPosition() x2,y2,z2 = body2.getPosition() pygame.draw.circle(srf, (55,0,200), coord(x1,y1), 20, 0) pygame.draw.line(srf, (55,0,200), coord(0,2), coord(x1,y1), 2) pygame.draw.circle(srf, (55,0,200), coord(x2,y2), 20, 0) pygame.draw.line(srf, (55,0,200), coord(x1,y1), coord(x2,y2), 2) pygame.display.flip() world.step(dt) clk.tick(fps) #print "fps: %2.1f dt:%d rawdt:%d"%(clk.get_fps(), clk.get_time(), clk.get_rawtime()) world, body1, body2, j1, j2 = buildObjectsXODE() simulate(world, body1, body2) PyODE-1.2.0/examples/tutorial3.py0000644000175000001440000001421010350572050016135 0ustar zefirisusers# pyODE example 3: Collision detection # Originally by Matthias Baas. # Updated by Pierre Gay to work without pygame or cgkit. import sys, os, random, time from math import * from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import ode # geometric utility functions def scalp (vec, scal): vec[0] *= scal vec[1] *= scal vec[2] *= scal def length (vec): return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) # prepare_GL def prepare_GL(): """Prepare drawing. """ # Viewport glViewport(0,0,640,480) # Initialize glClearColor(0.8,0.8,0.9,0) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST) glDisable(GL_LIGHTING) glEnable(GL_LIGHTING) glEnable(GL_NORMALIZE) glShadeModel(GL_FLAT) # Projection glMatrixMode(GL_PROJECTION) glLoadIdentity() gluPerspective (45,1.3333,0.2,20) # Initialize ModelView matrix glMatrixMode(GL_MODELVIEW) glLoadIdentity() # Light source glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) glEnable(GL_LIGHT0) # View transformation gluLookAt (2.4, 3.6, 4.8, 0.5, 0.5, 0, 0, 1, 0) # draw_body def draw_body(body): """Draw an ODE body. """ x,y,z = body.getPosition() R = body.getRotation() rot = [R[0], R[3], R[6], 0., R[1], R[4], R[7], 0., R[2], R[5], R[8], 0., x, y, z, 1.0] glPushMatrix() glMultMatrixd(rot) if body.shape=="box": sx,sy,sz = body.boxsize glScale(sx, sy, sz) glutSolidCube(1) glPopMatrix() # create_box def create_box(world, space, density, lx, ly, lz): """Create a box body and its corresponding geom.""" # Create body body = ode.Body(world) M = ode.Mass() M.setBox(density, lx, ly, lz) body.setMass(M) # Set parameters for drawing the body body.shape = "box" body.boxsize = (lx, ly, lz) # Create a box geom for collision detection geom = ode.GeomBox(space, lengths=body.boxsize) geom.setBody(body) return body # drop_object def drop_object(): """Drop an object into the scene.""" global bodies, counter, objcount body = create_box(world, space, 1000, 1.0,0.2,0.2) body.setPosition( (random.gauss(0,0.1),3.0,random.gauss(0,0.1)) ) theta = random.uniform(0,2*pi) ct = cos (theta) st = sin (theta) body.setRotation([ct, 0., -st, 0., 1., 0., st, 0., ct]) bodies.append(body) counter=0 objcount+=1 # explosion def explosion(): """Simulate an explosion. Every object is pushed away from the origin. The force is dependent on the objects distance from the origin. """ global bodies for b in bodies: l=b.getPosition () d = length (l) a = max(0, 40000*(1.0-0.2*d*d)) l = [l[0] / 4, l[1], l[2] /4] scalp (l, a / length (l)) b.addForce(l) # pull def pull(): """Pull the objects back to the origin. Every object will be pulled back to the origin. Every couple of frames there'll be a thrust upwards so that the objects won't stick to the ground all the time. """ global bodies, counter for b in bodies: l=list (b.getPosition ()) scalp (l, -1000 / length (l)) b.addForce(l) if counter%60==0: b.addForce((0,10000,0)) # Collision callback def near_callback(args, geom1, geom2): """Callback function for the collide() method. This function checks if the given geoms do collide and creates contact joints if they do. """ # Check if the objects do collide contacts = ode.collide(geom1, geom2) # Create contact joints world,contactgroup = args for c in contacts: c.setBounce(0.2) c.setMu(5000) j = ode.ContactJoint(world, contactgroup, c) j.attach(geom1.getBody(), geom2.getBody()) ###################################################################### # Initialize Glut glutInit ([]) # Open a window glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) x = 0 y = 0 width = 640 height = 480 glutInitWindowPosition (x, y); glutInitWindowSize (width, height); glutCreateWindow ("testode") # Create a world object world = ode.World() world.setGravity( (0,-9.81,0) ) world.setERP(0.8) world.setCFM(1E-5) # Create a space object space = ode.Space() # Create a plane geom which prevent the objects from falling forever floor = ode.GeomPlane(space, (0,1,0), 0) # A list with ODE bodies bodies = [] # A joint group for the contact joints that are generated whenever # two bodies collide contactgroup = ode.JointGroup() # Some variables used inside the simulation loop fps = 50 dt = 1.0/fps running = True state = 0 counter = 0 objcount = 0 lasttime = time.time() # keyboard callback def _keyfunc (c, x, y): sys.exit (0) glutKeyboardFunc (_keyfunc) # draw callback def _drawfunc (): # Draw the scene prepare_GL() for b in bodies: draw_body(b) glutSwapBuffers () glutDisplayFunc (_drawfunc) # idle callback def _idlefunc (): global counter, state, lasttime t = dt - (time.time() - lasttime) if (t > 0): time.sleep(t) counter += 1 if state==0: if counter==20: drop_object() if objcount==30: state=1 counter=0 # State 1: Explosion and pulling back the objects elif state==1: if counter==100: explosion() if counter>300: pull() if counter==500: counter=20 glutPostRedisplay () # Simulate n = 2 for i in range(n): # Detect collisions and create contact joints space.collide((world,contactgroup), near_callback) # Simulation step world.step(dt/n) # Remove all contact joints contactgroup.empty() lasttime = time.time() glutIdleFunc (_idlefunc) glutMainLoop () PyODE-1.2.0/examples/vehicle.py0000644000175000001440000003306510146316005015636 0ustar zefirisusers###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # (1) The GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at # your option) any later version. The text of the GNU Lesser # General Public License is included with this library in the # file LICENSE. # (2) The BSD-style license that is included with this library in # the file LICENSE-BSD. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # LICENSE and LICENSE-BSD for more details. ###################################################################### # PyODE Example: VehicleDemo import ode, xode.parser import pygame from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * info = """VehicleDemo Controls: Left mouse button click: Apply upward force to the vehicle's chassis. W Key: Move forward. S Key: Move backward. A Key: Turn left. D Key: Turn right. Escape Key: Exit. """ # This XODE document contains the description of the vehicle, the ground plane # and the ramp. The stack of boxes are created at runtime. doc = ''' ''' class VehicleDemo: """ Vehicle Demo """ fps = 50.0 cameraDistance = 10.0 vel = 50.0 turn = 1.0 clip = 100.0 res = (640, 480) def __init__(self): """ Initialises this. """ self._initOpenGL() self._loadObjects() self._buildWall() self._cjoints = ode.JointGroup() self._xRot = 0.0 self._yRot = 0.0 self._xCoeff = 360.0 / 480.0 self._yCoeff = 360.0 / 640.0 self._vel = 0.0 self._turn = 0.0 def _loadObjects(self): p = xode.parser.Parser() root = p.parseString(doc) self.world = root.namedChild('world').getODEObject() self.space = root.namedChild('space').getODEObject() self.ground = root.namedChild('ground').getODEObject() self.chassis = root.namedChild('chassis').getODEObject() self.wheel1 = root.namedChild('wheel1').getODEObject() self.wheel2 = root.namedChild('wheel2').getODEObject() self.wheel3 = root.namedChild('wheel3').getODEObject() self.root = root self.world.setGravity((0, -9.81, 0)) # transverse the xode parse tree to make a list of all geoms and joints self._geoms = [] self._joints = [] def transverse(node): obj = node.getODEObject() if (isinstance(obj, ode.GeomObject)): self._geoms.append(obj) if (isinstance(obj, ode.Joint)): self._joints.append(obj) for child in node.getChildren(): transverse(child) transverse(root) def _buildWall(self): """ Create the wall of stacked boxes. """ def makeBox(x, y): body = ode.Body(self.world) body.setPosition((x, y, -40)) geom = ode.GeomBox(self.space, lengths=(0.5, 0.5, 0.5)) geom.setBody(body) self._geoms.append(geom) for x in range(-4, 5): for y in range(7): makeBox(x, y) def _initOpenGL(self): """ Initialise the scene. """ # Create a window pygame.init() screen = pygame.display.set_mode(self.res, pygame.OPENGL | pygame.DOUBLEBUF) pygame.display.set_caption('PyODE Vehicle Demo') pygame.mouse.set_visible(False) glViewport(0, 0, self.res[0], self.res[1]) glClearColor(0.8, 0.8, 0.9, 0) glEnable(GL_DEPTH_TEST) glEnable(GL_LIGHTING) glEnable(GL_NORMALIZE) glShadeModel(GL_FLAT) def _extractMatrix(self, geom): """ Return a 4x4 matrix (represented by a 16-element tuple) created by combining the geom's rotation matrix and position. """ x, y, z = geom.getPosition() rot = geom.getRotation() return (rot[0], rot[3], rot[6], 0.0, rot[1], rot[4], rot[7], 0.0, rot[2], rot[5], rot[8], 0.0, x, y, z, 1.0) def _renderGeom(self, geom): """ Render either a ode.GeomBox or ode.GeomSphere object. """ allowed = [ode.GeomBox, ode.GeomSphere] ok = False for klass in allowed: ok = ok or isinstance(geom, klass) if (not ok): return glPushMatrix() glMultMatrixd(self._extractMatrix(geom)) glMaterialfv(GL_FRONT, GL_SPECULAR, (0.0, 0.0, 0.0)) if (isinstance(geom, ode.GeomBox)): sx, sy, sz = geom.getLengths() glScale(sx, sy, sz) glutSolidCube(1) elif (isinstance(geom, ode.GeomSphere)): r = geom.getRadius() glutSolidSphere(r, 20, 20) glPopMatrix() def _renderGround(self): """ Renders the ground plane. """ # Draw a quad at the position of the vehicle that extends to the # clipping planes. normal, d = self.ground.getParams() x, y, z = self.chassis.getPosition() glPushMatrix() glTranslate(x, 0.0, z) glMaterialfv(GL_FRONT, GL_SPECULAR, (0.0, 1.0, 0.0)) glBegin(GL_QUADS) glColor3(0.0, 1.0, 0.0) glNormal3f(*normal) glVertex3f(-self.clip, d, -self.clip) glNormal3f(*normal) glVertex3f(self.clip, d, -self.clip) glNormal3f(*normal) glVertex3f(self.clip, d, self.clip) glNormal3f(*normal) glVertex3f(-self.clip, d, self.clip) glEnd() glPopMatrix() def _setCamera(self): """ Position the camera to C{self.cameraDistance} units behind the vehicle's current position and rotated depending on the mouse position. """ aspect = float(self.res[0]) / float(self.res[1]) x, y = pygame.mouse.get_pos() self._xRot = (y - self.res[1]/2) * self._xCoeff self._yRot = (x - self.res[0]/2) * self._yCoeff if (self._xRot < 0): self._xRot = 0 glMatrixMode(GL_PROJECTION) glLoadIdentity() glFrustum(-aspect, aspect, -1.0, 1.0, 1.5, self.clip) glLightfv(GL_LIGHT0, GL_POSITION, (-5.0, 10.0, 0, 0)) glLightfv(GL_LIGHT0,GL_DIFFUSE, (1.0, 1.0, 1.0, 1.0)) glLightfv(GL_LIGHT0,GL_SPECULAR, (1.0, 1.0, 1.0, 1.0)) glEnable(GL_LIGHT0) glMatrixMode(GL_MODELVIEW) glLoadIdentity() # Set the camera angle to view the vehicle glTranslate(0.0, 0.0, -self.cameraDistance) glRotate(self._xRot, 1, 0, 0) glRotate(self._yRot, 0, 1, 0) # Set the camera so that the vehicle is drawn in the correct place. x, y, z = self.chassis.getPosition() glTranslate(-x, -y, -z) def render(self): """ Render the current simulation state. """ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) self._renderGround() self._setCamera() for geom in self._geoms: self._renderGeom(geom) glFlush() pygame.display.flip() def _keyDown(self, key): if (key == pygame.K_w): self._vel = self.vel elif (key == pygame.K_a): self._turn = -self.turn elif (key == pygame.K_d): self._turn = self.turn elif (key == pygame.K_s): self._vel = -self.vel elif (key == pygame.K_ESCAPE): self._running = False def _keyUp(self, key): if (key == pygame.K_w): self._vel = 0.0 elif (key == pygame.K_a): self._turn = 0.0 elif (key == pygame.K_d): self._turn = 0.0 elif (key == pygame.K_s): self._vel = 0.0 def doEvents(self): """ Process any input events. """ events = pygame.event.get() for e in events: if (e.type == pygame.QUIT): self._running = False elif (e.type == pygame.KEYDOWN): self._keyDown(e.key) elif (e.type == pygame.KEYUP): self._keyUp(e.key) elif (e.type == pygame.MOUSEBUTTONDOWN): if (e.button == 1): self.chassis.addForce((0.0, 500000, 0.0)) def _nearcb(self, args, geom1, geom2): """ Create contact joints between colliding geoms. """ body1, body2 = geom1.getBody(), geom2.getBody() if (body1 is None): body1 = ode.environment if (body2 is None): body2 = ode.environment if (ode.areConnected(body1, body2)): return contacts = ode.collide(geom1, geom2) for c in contacts: c.setBounce(0.2) c.setMu(10000) j = ode.ContactJoint(self.world, self._cjoints, c) j.attach(body1, body2) def run(self): """ Start the demo. This method will block until the demo exits. """ clock = pygame.time.Clock() self._running = True while self._running: self.doEvents() # Steering self.wheel1.setParam(ode.ParamVel, self._turn) # Engine self.wheel1.setParam(ode.ParamVel2, self._vel) self.wheel2.setParam(ode.ParamVel2, self._vel) self.wheel3.setParam(ode.ParamVel2, self._vel) self.space.collide((), self._nearcb) self.world.step(1/self.fps) self._cjoints.empty() self.render() # Limit the FPS. clock.tick(self.fps) if (__name__ == '__main__'): print info demo = VehicleDemo() demo.run() PyODE-1.2.0/ChangeLog0000644000175000001440000000621510533062331013576 0ustar zefirisusers2006-11-28 Matthias Baas * setup.py: Modified the setup script to upgrade to ODE 0.7. 2006-11-10 Matthias Baas * joints.pyx, geoms.pyx: Applied some more patches by Ethan Glasser-Camp (switched from the ccylinder functions to the capsule functions and renamed the GeomCCylinder to GeomCapsule. For backwards compatibility, the name GeomCCylinder is still available and is an alias for GeomCapsule. Added support for GeomCylinder (the uncapped one)). 2006-11-09 Matthias Baas * joints.pyx: Applied a patch from the mailing list that adds support for the LMotor (thanks to Ethan Glasser-Camp). * joints.pyx: Applied a patch from the mailing list that adds support for the Plane2DJoint (thanks to Leonard Ritter). These changes requires a more recent version of ODE than 0.5 (I've switched to v0.7 now). 2006-08-15 Matthias Baas * joints.pyx: The JointGroup.__dealloc__() method now notifies the contained joints about the destruction of the ODE joints (i.e. _destroyed() is called). 2006-05-30 Matthias Baas * mass.pyx: Applied Chris Bainbridge's patch that adds the Mass.setBoxTotal() method, and while I was at it I added the other set*Total() methods, too. 2006-04-13 Matthias Baas * space.pyx, joints.pyx: Fixed some doc strings that generated epydoc warnings. * ode.pyx: Added the collide2() function (and fixed some more doc strings). 2006-01-17 Matthias Baas * geomobject.pyx: Added the getQuaternion()/setQuaternion() methods 2005-12-16 Timothy Stranex * setup.py: Modified setup to look for ODE installations in common locations. * examples/tutorial3.py: Updated with Pierre Gay's changes so that it does not depend on cgkit or pygame. * tests/test_xode.py: Fixed some instances of testing floats for equality. 2005-09-20 Matthias Baas * ode.pyx: Added the ParamX3 parameter names and the ParamGroup definition 2005-06-24 Matthias Baas * Modified the base joint class so that its possible to store arbitrary attributes (as is the case with regular Python classes). This was suggested in "bug" 1121141. 2005-06-06 Matthias Baas * Creating a Body now requires a World object. Empty Bodies are not allowed anymore. The ode.environment object now simply holds None instead of an empty Body. It's now also possible to pass None to the attach() method. * Added an iterator to iterate over the geoms inside a Space. 2005-05-05 Matthias Baas * src\joints.pyx (Joints): Added methods to set joint forces/torques directly (section 7.6 in the ODE manual). 2005-03-03 Matthias Baas * src\geomobject.pyx (setCollideBits, setCategoryBits): Bits can now also be passed as int. Updated doc about collide and category bits (which are actually long instead of int). 2004-11-30 Timothy Stranex * Modified setup to work with both Trimesh-enabled and Trimesh-disabled builds of ODE without needing Pyrex to be installed. PyODE-1.2.0/ode_trimesh.c0000644000175000001440000334411410561403665014512 0ustar zefirisusers/* Generated by Pyrex 0.9.5.1a on Sun Feb 4 18:20:05 2007 */ #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif __PYX_EXTERN_C double pow(double, double); #include "stdlib.h" #include "stdio.h" #include "ode/ode.h" typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; static char *__pyx_filename; static char **__pyx_f; static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_GetExcValue(void); /*proto*/ static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/ static int __Pyx_EndUnpack(PyObject *); /*proto*/ static void __Pyx_WriteUnraisable(char *name); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ static void __Pyx_AddTraceback(char *funcname); /*proto*/ /* Declarations from ode */ struct __pyx_obj_3ode_Mass { PyObject_HEAD dMass _mass; }; struct __pyx_obj_3ode_Contact { PyObject_HEAD dContact _contact; }; struct __pyx_obj_3ode_World { PyObject_HEAD dWorldID wid; }; struct __pyx_obj_3ode_Body { PyObject_HEAD dBodyID bid; PyObject *world; PyObject *userattribs; }; struct __pyx_obj_3ode_JointGroup { PyObject_HEAD dJointGroupID gid; PyObject *jointlist; }; struct __pyx_obj_3ode_Joint { PyObject_HEAD dJointID jid; PyObject *world; dJointFeedback (*feedback); PyObject *body1; PyObject *body2; PyObject *userattribs; }; struct __pyx_obj_3ode_BallJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_HingeJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_SliderJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_UniversalJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_Hinge2Joint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_FixedJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_ContactJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_AMotor { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_LMotor { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_Plane2DJoint { struct __pyx_obj_3ode_Joint __pyx_base; }; struct __pyx_obj_3ode_GeomObject { PyObject_HEAD dGeomID gid; PyObject *space; PyObject *body; PyObject *attribs; }; struct __pyx_obj_3ode_SpaceBase { struct __pyx_obj_3ode_GeomObject __pyx_base; dSpaceID sid; }; struct __pyx_obj_3ode_SimpleSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_HashSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_QuadTreeSpace { struct __pyx_obj_3ode_SpaceBase __pyx_base; }; struct __pyx_obj_3ode_GeomSphere { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomBox { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomPlane { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomCapsule { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomCylinder { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomRay { struct __pyx_obj_3ode_GeomObject __pyx_base; }; struct __pyx_obj_3ode_GeomTransform { struct __pyx_obj_3ode_GeomObject __pyx_base; PyObject *geom; }; struct __pyx_obj_3ode_TriMeshData { PyObject_HEAD dTriMeshDataID tmdid; dReal (*vertex_buffer); int (*face_buffer); }; struct __pyx_obj_3ode_GeomTriMesh { struct __pyx_obj_3ode_GeomObject __pyx_base; struct __pyx_obj_3ode_TriMeshData *data; }; static PyTypeObject *__pyx_ptype_3ode_Mass = 0; static PyTypeObject *__pyx_ptype_3ode_Contact = 0; static PyTypeObject *__pyx_ptype_3ode_World = 0; static PyTypeObject *__pyx_ptype_3ode_Body = 0; static PyTypeObject *__pyx_ptype_3ode_JointGroup = 0; static PyTypeObject *__pyx_ptype_3ode_Joint = 0; static PyTypeObject *__pyx_ptype_3ode_BallJoint = 0; static PyTypeObject *__pyx_ptype_3ode_HingeJoint = 0; static PyTypeObject *__pyx_ptype_3ode_SliderJoint = 0; static PyTypeObject *__pyx_ptype_3ode_UniversalJoint = 0; static PyTypeObject *__pyx_ptype_3ode_Hinge2Joint = 0; static PyTypeObject *__pyx_ptype_3ode_FixedJoint = 0; static PyTypeObject *__pyx_ptype_3ode_ContactJoint = 0; static PyTypeObject *__pyx_ptype_3ode_AMotor = 0; static PyTypeObject *__pyx_ptype_3ode_LMotor = 0; static PyTypeObject *__pyx_ptype_3ode_Plane2DJoint = 0; static PyTypeObject *__pyx_ptype_3ode_GeomObject = 0; static PyTypeObject *__pyx_ptype_3ode_SpaceBase = 0; static PyTypeObject *__pyx_ptype_3ode_SimpleSpace = 0; static PyTypeObject *__pyx_ptype_3ode_HashSpace = 0; static PyTypeObject *__pyx_ptype_3ode_QuadTreeSpace = 0; static PyTypeObject *__pyx_ptype_3ode_GeomSphere = 0; static PyTypeObject *__pyx_ptype_3ode_GeomBox = 0; static PyTypeObject *__pyx_ptype_3ode_GeomPlane = 0; static PyTypeObject *__pyx_ptype_3ode_GeomCapsule = 0; static PyTypeObject *__pyx_ptype_3ode_GeomCylinder = 0; static PyTypeObject *__pyx_ptype_3ode_GeomRay = 0; static PyTypeObject *__pyx_ptype_3ode_GeomTransform = 0; static PyTypeObject *__pyx_ptype_3ode_TriMeshData = 0; static PyTypeObject *__pyx_ptype_3ode_GeomTriMesh = 0; static PyObject *__pyx_k2; static PyObject *__pyx_k3; static PyObject *__pyx_k4; static PyObject *__pyx_k5; static PyObject *__pyx_k6; static PyObject *__pyx_k7; static PyObject *__pyx_k8; static PyObject *__pyx_k9; static PyObject *__pyx_k10; static PyObject *__pyx_k11; static PyObject *__pyx_k12; static PyObject *__pyx_k13; static PyObject *__pyx_k14; static PyObject *__pyx_k15; static PyObject *__pyx_k16; static PyObject *__pyx_k17; static PyObject *__pyx_k18; static PyObject *__pyx_k19; static PyObject *__pyx_k20; static PyObject *__pyx_k21; static PyObject *__pyx_k22; static PyObject *__pyx_k25; static PyObject *__pyx_k26; static PyObject *__pyx_k27; static PyObject *__pyx_k28; static PyObject *__pyx_k29; static PyObject *__pyx_k30; static PyObject *__pyx_k31; static PyObject *__pyx_k32; static PyObject *__pyx_k33; static PyObject *__pyx_k34; static PyObject *__pyx_k35; static PyObject *__pyx_k36; static PyObject *__pyx_k37; static PyObject *__pyx_k38; static PyObject *__pyx_k39; static PyObject *__pyx_k40; static PyObject *__pyx_k41; static PyObject *__pyx_k42; static PyObject *__pyx_k43; static PyObject *__pyx_k44; static PyObject *__pyx_k45; static PyObject *__pyx_k46; static PyObject *__pyx_k47; static PyObject *__pyx_k48; static PyObject *__pyx_k49; static PyObject *__pyx_k50; static PyObject *__pyx_k51; static PyObject *__pyx_k52; static PyObject *__pyx_k53; static PyObject *__pyx_k54; static PyObject *__pyx_k55; static PyObject *__pyx_k56; static PyObject *__pyx_k57; static PyObject *__pyx_k58; static PyObject *__pyx_k59; static PyObject *__pyx_k60; static PyObject *__pyx_k61; static PyObject *__pyx_k62; static PyObject *__pyx_k63; static PyObject *__pyx_k64; static PyObject *__pyx_k65; static void (__pyx_f_3ode_collide_callback(void (*),dGeomID ,dGeomID )); /*proto*/ /* Implementation of ode */ static char (__pyx_k1[]) = "Python Open Dynamics Engine (ODE) wrapper.\n\nThis module contains classes and functions that wrap the functionality\nof the Open Dynamics Engine (ODE) which can be found at \nhttp://opende.sourceforge.net.\n\nThere are the following classes and functions:\n\n - World\n - Body\n - JointGroup\n - Contact\n - Space\n - Mass\n\nJoint classes:\n\n - BallJoint\n - HingeJoint\n - Hinge2Joint\n - SliderJoint\n - UniversalJoint\n - FixedJoint\n - ContactJoint\n - AMotor\n - LMotor\n - Plane2DJoint\n\nGeom classes:\n\n - GeomSphere\n - GeomBox\n - GeomPlane\n - GeomCapsule\n - GeomCylinder\n - GeomRay\n - GeomTransform\n - GeomTriMesh / TriMeshData\n\nFunctions:\n\n - CloseODE()\n - collide()\n\n"; static char (__pyx_k24[]) = "Iterates over the geoms inside a Space.\n "; static PyObject *__pyx_n___doc__; static PyObject *__pyx_n_paramLoStop; static PyObject *__pyx_n_paramHiStop; static PyObject *__pyx_n_paramVel; static PyObject *__pyx_n_paramFMax; static PyObject *__pyx_n_paramFudgeFactor; static PyObject *__pyx_n_paramBounce; static PyObject *__pyx_n_paramCFM; static PyObject *__pyx_n_paramStopERP; static PyObject *__pyx_n_paramStopCFM; static PyObject *__pyx_n_paramSuspensionERP; static PyObject *__pyx_n_paramSuspensionCFM; static PyObject *__pyx_n_ParamLoStop; static PyObject *__pyx_n_ParamHiStop; static PyObject *__pyx_n_ParamVel; static PyObject *__pyx_n_ParamFMax; static PyObject *__pyx_n_ParamFudgeFactor; static PyObject *__pyx_n_ParamBounce; static PyObject *__pyx_n_ParamCFM; static PyObject *__pyx_n_ParamStopERP; static PyObject *__pyx_n_ParamStopCFM; static PyObject *__pyx_n_ParamSuspensionERP; static PyObject *__pyx_n_ParamSuspensionCFM; static PyObject *__pyx_n_ParamLoStop2; static PyObject *__pyx_n_ParamHiStop2; static PyObject *__pyx_n_ParamVel2; static PyObject *__pyx_n_ParamFMax2; static PyObject *__pyx_n_ParamFudgeFactor2; static PyObject *__pyx_n_ParamBounce2; static PyObject *__pyx_n_ParamCFM2; static PyObject *__pyx_n_ParamStopERP2; static PyObject *__pyx_n_ParamStopCFM2; static PyObject *__pyx_n_ParamSuspensionERP2; static PyObject *__pyx_n_ParamSuspensionCFM2; static PyObject *__pyx_n_ParamLoStop3; static PyObject *__pyx_n_ParamHiStop3; static PyObject *__pyx_n_ParamVel3; static PyObject *__pyx_n_ParamFMax3; static PyObject *__pyx_n_ParamFudgeFactor3; static PyObject *__pyx_n_ParamBounce3; static PyObject *__pyx_n_ParamCFM3; static PyObject *__pyx_n_ParamStopERP3; static PyObject *__pyx_n_ParamStopCFM3; static PyObject *__pyx_n_ParamSuspensionERP3; static PyObject *__pyx_n_ParamSuspensionCFM3; static PyObject *__pyx_n_ParamGroup; static PyObject *__pyx_n_ContactMu2; static PyObject *__pyx_n_ContactFDir1; static PyObject *__pyx_n_ContactBounce; static PyObject *__pyx_n_ContactSoftERP; static PyObject *__pyx_n_ContactSoftCFM; static PyObject *__pyx_n_ContactMotion1; static PyObject *__pyx_n_ContactMotion2; static PyObject *__pyx_n_ContactSlip1; static PyObject *__pyx_n_ContactSlip2; static PyObject *__pyx_n_ContactApprox0; static PyObject *__pyx_n_ContactApprox1_1; static PyObject *__pyx_n_ContactApprox1_2; static PyObject *__pyx_n_ContactApprox1; static PyObject *__pyx_n_AMotorUser; static PyObject *__pyx_n_AMotorEuler; static PyObject *__pyx_n_Infinity; static PyObject *__pyx_n__geom_c2py_lut; static PyObject *__pyx_n__SpaceIterator; static PyObject *__pyx_n_Space; static PyObject *__pyx_n_GeomCCylinder; static PyObject *__pyx_n_collide; static PyObject *__pyx_n_collide2; static PyObject *__pyx_n_areConnected; static PyObject *__pyx_n_CloseODE; static PyObject *__pyx_n_environment; static PyObject *__pyx_n___init__; static PyObject *__pyx_n___iter__; static PyObject *__pyx_n_next; static PyObject *__pyx_k1p; static PyObject *__pyx_k24p; static int __pyx_f_3ode_4Mass___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_4Mass___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/mass.pyx":44 */ dMassSetZero((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass)); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setZero(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setZero[] = "setZero()\n\n Set all the mass parameters to zero."; static PyObject *__pyx_f_3ode_4Mass_setZero(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/mass.pyx":50 */ dMassSetZero((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setParameters[] = "setParameters(mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23)\n\n Set the mass parameters to the given values.\n\n @param mass: Total mass of the body.\n @param cgx: Center of gravity position in the body frame (x component).\n @param cgy: Center of gravity position in the body frame (y component).\n @param cgz: Center of gravity position in the body frame (z component).\n @param I11: Inertia tensor\n @param I22: Inertia tensor\n @param I33: Inertia tensor\n @param I12: Inertia tensor\n @param I13: Inertia tensor\n @param I23: Inertia tensor\n @type mass: float\n @type cgx: float\n @type cgy: float\n @type cgz: float\n @type I11: float\n @type I22: float\n @type I33: float\n @type I12: float\n @type I13: float\n @type I23: float\n "; static PyObject *__pyx_f_3ode_4Mass_setParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mass = 0; PyObject *__pyx_v_cgx = 0; PyObject *__pyx_v_cgy = 0; PyObject *__pyx_v_cgz = 0; PyObject *__pyx_v_I11 = 0; PyObject *__pyx_v_I22 = 0; PyObject *__pyx_v_I33 = 0; PyObject *__pyx_v_I12 = 0; PyObject *__pyx_v_I13 = 0; PyObject *__pyx_v_I23 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; dReal __pyx_9; dReal __pyx_10; static char *__pyx_argnames[] = {"mass","cgx","cgy","cgz","I11","I22","I33","I12","I13","I23",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOOOOOOOO", __pyx_argnames, &__pyx_v_mass, &__pyx_v_cgx, &__pyx_v_cgy, &__pyx_v_cgz, &__pyx_v_I11, &__pyx_v_I22, &__pyx_v_I33, &__pyx_v_I12, &__pyx_v_I13, &__pyx_v_I23)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mass); Py_INCREF(__pyx_v_cgx); Py_INCREF(__pyx_v_cgy); Py_INCREF(__pyx_v_cgz); Py_INCREF(__pyx_v_I11); Py_INCREF(__pyx_v_I22); Py_INCREF(__pyx_v_I33); Py_INCREF(__pyx_v_I12); Py_INCREF(__pyx_v_I13); Py_INCREF(__pyx_v_I23); /* "/home/zefiris/pyode/src/mass.pyx":78 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_cgx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_cgy); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_cgz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_5 = PyFloat_AsDouble(__pyx_v_I11); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_6 = PyFloat_AsDouble(__pyx_v_I22); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_7 = PyFloat_AsDouble(__pyx_v_I33); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_8 = PyFloat_AsDouble(__pyx_v_I12); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_9 = PyFloat_AsDouble(__pyx_v_I13); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} __pyx_10 = PyFloat_AsDouble(__pyx_v_I23); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} dMassSetParameters((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8,__pyx_9,__pyx_10); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setParameters"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mass); Py_DECREF(__pyx_v_cgx); Py_DECREF(__pyx_v_cgy); Py_DECREF(__pyx_v_cgz); Py_DECREF(__pyx_v_I11); Py_DECREF(__pyx_v_I22); Py_DECREF(__pyx_v_I33); Py_DECREF(__pyx_v_I12); Py_DECREF(__pyx_v_I13); Py_DECREF(__pyx_v_I23); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setSphere[] = "setSphere(density, radius)\n \n Set the mass parameters to represent a sphere of the given radius\n and density, with the center of mass at (0,0,0) relative to the body.\n\n @param density: The density of the sphere\n @param radius: The radius of the sphere\n @type density: float\n @type radius: float\n "; static PyObject *__pyx_f_3ode_4Mass_setSphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"density","radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_density, &__pyx_v_radius)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/mass.pyx":91 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} dMassSetSphere((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setSphere"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setSphereTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setSphereTotal[] = "setSphereTotal(total_mass, radius)\n \n Set the mass parameters to represent a sphere of the given radius\n and mass, with the center of mass at (0,0,0) relative to the body.\n\n @param total_mass: The total mass of the sphere\n @param radius: The radius of the sphere\n @type total_mass: float\n @type radius: float\n "; static PyObject *__pyx_f_3ode_4Mass_setSphereTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"total_mass","radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_radius)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/mass.pyx":104 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} dMassSetSphere((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setSphereTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCappedCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCappedCylinder[] = "setCappedCylinder(density, direction, r, h)\n \n Set the mass parameters to represent a capped cylinder of the\n given parameters and density, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder (and\n the spherical cap) is r. The length of the cylinder (not\n counting the spherical cap) is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the\n value of direction (1=x, 2=y, 3=z).\n\n @param density: The density of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder (without the caps)\n @type density: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCappedCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":126 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} dMassSetCappedCylinder((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCappedCylinder"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCappedCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCappedCylinderTotal[] = "setCappedCylinderTotal(total_mass, direction, r, h)\n \n Set the mass parameters to represent a capped cylinder of the\n given parameters and mass, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder (and\n the spherical cap) is r. The length of the cylinder (not\n counting the spherical cap) is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the\n value of direction (1=x, 2=y, 3=z).\n\n @param total_mass: The total mass of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder (without the caps)\n @type total_mass: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCappedCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":148 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; goto __pyx_L1;} dMassSetCappedCylinderTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCappedCylinderTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCylinder[] = "setCylinder(density, direction, r, h)\n \n Set the mass parameters to represent a flat-ended cylinder of\n the given parameters and density, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder is r.\n The length of the cylinder is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the value\n of direction (1=x, 2=y, 3=z).\n\n @param density: The density of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder\n @type density: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":169 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} dMassSetCylinder((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCylinder"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setCylinderTotal[] = "setCylinderTotal(total_mass, direction, r, h)\n \n Set the mass parameters to represent a flat-ended cylinder of\n the given parameters and mass, with the center of mass at\n (0,0,0) relative to the body. The radius of the cylinder is r.\n The length of the cylinder is h. The cylinder\'s long axis is\n oriented along the body\'s x, y or z axis according to the value\n of direction (1=x, 2=y, 3=z).\n\n @param total_mass: The total mass of the cylinder\n @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis)\n @param r: The radius of the cylinder\n @param h: The length of the cylinder\n @type total_mass: float\n @type direction: int\n @type r: float\n @type h: float\n "; static PyObject *__pyx_f_3ode_4Mass_setCylinderTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_r = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_r; dReal __pyx_1; int __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","direction","r","h",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_direction, &__pyx_v_r, &__pyx_v_h)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_direction); Py_INCREF(__pyx_v_r); Py_INCREF(__pyx_v_h); /* "/home/zefiris/pyode/src/mass.pyx":190 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_direction); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_r); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_h); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} dMassSetCylinderTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setCylinderTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_direction); Py_DECREF(__pyx_v_r); Py_DECREF(__pyx_v_h); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setBox(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setBox[] = "setBox(density, lx, ly, lz)\n\n Set the mass parameters to represent a box of the given\n dimensions and density, with the center of mass at (0,0,0)\n relative to the body. The side lengths of the box along the x,\n y and z axes are lx, ly and lz.\n\n @param density: The density of the box\n @param lx: The length along the x axis\n @param ly: The length along the y axis\n @param lz: The length along the z axis\n @type density: float\n @type lx: float\n @type ly: float\n @type lz: float\n "; static PyObject *__pyx_f_3ode_4Mass_setBox(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_density = 0; PyObject *__pyx_v_lx = 0; PyObject *__pyx_v_ly = 0; PyObject *__pyx_v_lz = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"density","lx","ly","lz",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_density, &__pyx_v_lx, &__pyx_v_ly, &__pyx_v_lz)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_density); Py_INCREF(__pyx_v_lx); Py_INCREF(__pyx_v_ly); Py_INCREF(__pyx_v_lz); /* "/home/zefiris/pyode/src/mass.pyx":209 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_density); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_lx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_ly); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_lz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} dMassSetBox((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setBox"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_density); Py_DECREF(__pyx_v_lx); Py_DECREF(__pyx_v_ly); Py_DECREF(__pyx_v_lz); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_setBoxTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_setBoxTotal[] = "setBoxTotal(total_mass, lx, ly, lz)\n\n Set the mass parameters to represent a box of the given\n dimensions and mass, with the center of mass at (0,0,0)\n relative to the body. The side lengths of the box along the x,\n y and z axes are lx, ly and lz.\n\n @param total_mass: The total mass of the box\n @param lx: The length along the x axis\n @param ly: The length along the y axis\n @param lz: The length along the z axis\n @type total_mass: float\n @type lx: float\n @type ly: float\n @type lz: float\n "; static PyObject *__pyx_f_3ode_4Mass_setBoxTotal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_total_mass = 0; PyObject *__pyx_v_lx = 0; PyObject *__pyx_v_ly = 0; PyObject *__pyx_v_lz = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; dReal __pyx_4; static char *__pyx_argnames[] = {"total_mass","lx","ly","lz",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_total_mass, &__pyx_v_lx, &__pyx_v_ly, &__pyx_v_lz)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_total_mass); Py_INCREF(__pyx_v_lx); Py_INCREF(__pyx_v_ly); Py_INCREF(__pyx_v_lz); /* "/home/zefiris/pyode/src/mass.pyx":228 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_total_mass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_lx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_ly); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_4 = PyFloat_AsDouble(__pyx_v_lz); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} dMassSetBoxTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.setBoxTotal"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_total_mass); Py_DECREF(__pyx_v_lx); Py_DECREF(__pyx_v_ly); Py_DECREF(__pyx_v_lz); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_adjust(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_adjust[] = "adjust(newmass)\n\n Adjust the total mass. Given mass parameters for some object,\n adjust them so the total mass is now newmass. This is useful\n when using the setXyz() methods to set the mass parameters for\n certain objects - they take the object density, not the total\n mass.\n\n @param newmass: The new total mass\n @type newmass: float\n "; static PyObject *__pyx_f_3ode_4Mass_adjust(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_newmass = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"newmass",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_newmass)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_newmass); /* "/home/zefiris/pyode/src/mass.pyx":242 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_newmass); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;} dMassAdjust((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.adjust"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_newmass); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_translate[] = "translate(t)\n\n Adjust mass parameters. Given mass parameters for some object,\n adjust them to represent the object displaced by (x,y,z)\n relative to the body frame.\n\n @param t: Translation vector (x, y, z)\n @type t: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Mass_translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/mass.pyx":254 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dMassTranslate((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Mass.translate"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Mass_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Mass_add[] = "add(b)\n\n Add the mass b to the mass object. Masses can also be added using\n the + operator.\n\n @param b: The mass to add to this mass\n @type b: Mass\n "; static PyObject *__pyx_f_3ode_4Mass_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_b = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"b",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3ode_Mass, 1, "b")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} /* "/home/zefiris/pyode/src/mass.pyx":272 */ dMassAdd((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),(&__pyx_v_b->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Mass.add"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_n_mass; static PyObject *__pyx_n_c; static PyObject *__pyx_n_I; static PyObject *__pyx_n_AttributeError; static PyObject *__pyx_k69p; static PyObject *__pyx_k70p; static char (__pyx_k69[]) = "Mass object has no attribute '"; static char (__pyx_k70[]) = "\'"; static PyObject *__pyx_f_3ode_4Mass___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/mass.pyx":275 */ if (PyObject_Cmp(__pyx_v_name, __pyx_n_mass, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":276 */ __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.mass); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_c, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":278 */ __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_r = __pyx_5; __pyx_5 = 0; goto __pyx_L0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_I, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":280 */ __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[4])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[5])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[6])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_6, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[8])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[9])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[10])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_7); __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/mass.pyx":284 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_4 = PyNumber_Add(__pyx_k69p, __pyx_v_name); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_5 = PyNumber_Add(__pyx_4, __pyx_k70p); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_3, __pyx_5, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Mass.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_n_adjust; static PyObject *__pyx_k73p; static PyObject *__pyx_k75p; static PyObject *__pyx_k76p; static PyObject *__pyx_k77p; static char (__pyx_k73[]) = "Use the setParameter() method to change c"; static char (__pyx_k75[]) = "Use the setParameter() method to change I"; static char (__pyx_k76[]) = "Mass object has no attribute '"; static char (__pyx_k77[]) = "\'"; static int __pyx_f_3ode_4Mass___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_4Mass___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/mass.pyx":287 */ if (PyObject_Cmp(__pyx_v_name, __pyx_n_mass, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":288 */ __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_adjust); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_c, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":290 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k73p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;} goto __pyx_L2; } if (PyObject_Cmp(__pyx_v_name, __pyx_n_I, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/mass.pyx":292 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;} __Pyx_Raise(__pyx_3, __pyx_k75p, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;} goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/mass.pyx":294 */ __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} __pyx_2 = PyNumber_Add(__pyx_k76p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} __pyx_3 = PyNumber_Add(__pyx_2, __pyx_k77p); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_4, __pyx_3, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Mass.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_n_add; static PyObject *__pyx_f_3ode_4Mass___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3ode_Mass, 1, "b")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} /* "/home/zefiris/pyode/src/mass.pyx":297 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":298 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Mass.__add__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_n_str; static PyObject *__pyx_k78p; static char (__pyx_k78[]) = "Mass=%s\nCg=(%s, %s, %s)\nI11=%s I22=%s I33=%s\nI12=%s I13=%s I23=%s"; static PyObject *__pyx_f_3ode_4Mass___str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_3ode_4Mass___str__(PyObject *__pyx_v_self) { PyObject *__pyx_v_m; PyObject *__pyx_v_sc0; PyObject *__pyx_v_sc1; PyObject *__pyx_v_sc2; PyObject *__pyx_v_I11; PyObject *__pyx_v_I22; PyObject *__pyx_v_I33; PyObject *__pyx_v_I12; PyObject *__pyx_v_I13; PyObject *__pyx_v_I23; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); __pyx_v_m = Py_None; Py_INCREF(Py_None); __pyx_v_sc0 = Py_None; Py_INCREF(Py_None); __pyx_v_sc1 = Py_None; Py_INCREF(Py_None); __pyx_v_sc2 = Py_None; Py_INCREF(Py_None); __pyx_v_I11 = Py_None; Py_INCREF(Py_None); __pyx_v_I22 = Py_None; Py_INCREF(Py_None); __pyx_v_I33 = Py_None; Py_INCREF(Py_None); __pyx_v_I12 = Py_None; Py_INCREF(Py_None); __pyx_v_I13 = Py_None; Py_INCREF(Py_None); __pyx_v_I23 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/mass.pyx":301 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.mass); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_m); __pyx_v_m = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":302 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[0])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_sc0); __pyx_v_sc0 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":303 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_sc1); __pyx_v_sc1 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":304 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.c[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_sc2); __pyx_v_sc2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":305 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I11); __pyx_v_I11 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":306 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[5])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I22); __pyx_v_I22 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":307 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[10])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I33); __pyx_v_I33 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":308 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I12); __pyx_v_I12 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":309 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[2])); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_I13); __pyx_v_I13 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/mass.pyx":310 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass.I[6])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_I23); __pyx_v_I23 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/mass.pyx":311 */ __pyx_1 = PyTuple_New(10); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} Py_INCREF(__pyx_v_m); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_m); Py_INCREF(__pyx_v_sc0); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_sc0); Py_INCREF(__pyx_v_sc1); PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_sc1); Py_INCREF(__pyx_v_sc2); PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_sc2); Py_INCREF(__pyx_v_I11); PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_I11); Py_INCREF(__pyx_v_I22); PyTuple_SET_ITEM(__pyx_1, 5, __pyx_v_I22); Py_INCREF(__pyx_v_I33); PyTuple_SET_ITEM(__pyx_1, 6, __pyx_v_I33); Py_INCREF(__pyx_v_I12); PyTuple_SET_ITEM(__pyx_1, 7, __pyx_v_I12); Py_INCREF(__pyx_v_I13); PyTuple_SET_ITEM(__pyx_1, 8, __pyx_v_I13); Py_INCREF(__pyx_v_I23); PyTuple_SET_ITEM(__pyx_1, 9, __pyx_v_I23); __pyx_2 = PyNumber_Remainder(__pyx_k78p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Mass.__str__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_m); Py_DECREF(__pyx_v_sc0); Py_DECREF(__pyx_v_sc1); Py_DECREF(__pyx_v_sc2); Py_DECREF(__pyx_v_I11); Py_DECREF(__pyx_v_I22); Py_DECREF(__pyx_v_I33); Py_DECREF(__pyx_v_I12); Py_DECREF(__pyx_v_I13); Py_DECREF(__pyx_v_I23); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_7Contact___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7Contact___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":42 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ContactBounce); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode = __pyx_2; /* "/home/zefiris/pyode/src/contact.pyx":43 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu = dInfinity; /* "/home/zefiris/pyode/src/contact.pyx":45 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce = 0.1; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMode[] = "getMode() -> flags\n\n Return the contact flags.\n "; static PyObject *__pyx_f_3ode_7Contact_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":53 */ __pyx_1 = PyInt_FromLong(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMode[] = "setMode(flags)\n\n Set the contact flags. The argument m is a combination of the\n ContactXyz flags (ContactMu2, ContactBounce, ...).\n \n @param flags: Contact flags\n @type flags: int\n "; static PyObject *__pyx_f_3ode_7Contact_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flags = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"flags",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flags)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flags); /* "/home/zefiris/pyode/src/contact.pyx":65 */ __pyx_1 = PyInt_AsLong(__pyx_v_flags); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mode = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flags); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMu[] = "getMu() -> float\n\n Return the Coulomb friction coefficient. \n "; static PyObject *__pyx_f_3ode_7Contact_getMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":73 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMu"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMu[] = "setMu(mu)\n\n Set the Coulomb friction coefficient.\n\n @param mu: Coulomb friction coefficient (0..Infinity)\n @type mu: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mu = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"mu",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mu)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mu); /* "/home/zefiris/pyode/src/contact.pyx":84 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMu"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mu); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMu2[] = "getMu2() -> float\n\n Return the optional Coulomb friction coefficient for direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":92 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMu2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMu2[] = "setMu2(mu)\n\n Set the optional Coulomb friction coefficient for direction 2.\n\n @param mu: Coulomb friction coefficient (0..Infinity)\n @type mu: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMu2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mu = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"mu",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mu)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mu); /* "/home/zefiris/pyode/src/contact.pyx":103 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_mu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.mu2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMu2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mu); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getBounce[] = "getBounce() -> float\n\n Return the restitution parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":111 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getBounce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setBounce[] = "setBounce(b)\n\n @param b: Restitution parameter (0..1)\n @type b: float\n "; static PyObject *__pyx_f_3ode_7Contact_setBounce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_b = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"b",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_b)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_b); /* "/home/zefiris/pyode/src/contact.pyx":120 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_b); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setBounce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_b); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getBounceVel[] = "getBounceVel() -> float\n\n Return the minimum incoming velocity necessary for bounce.\n "; static PyObject *__pyx_f_3ode_7Contact_getBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":128 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce_vel); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getBounceVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setBounceVel[] = "setBounceVel(bv)\n\n Set the minimum incoming velocity necessary for bounce. Incoming\n velocities below this will effectively have a bounce parameter of 0.\n\n @param bv: Velocity\n @type bv: float\n "; static PyObject *__pyx_f_3ode_7Contact_setBounceVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bv = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"bv",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bv)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bv); /* "/home/zefiris/pyode/src/contact.pyx":140 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_bv); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.bounce_vel = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setBounceVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bv); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSoftERP[] = "getSoftERP() -> float\n\n Return the contact normal \"softness\" parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":148 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_erp); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSoftERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSoftERP[] = "setSoftERP(erp)\n\n Set the contact normal \"softness\" parameter.\n\n @param erp: Softness parameter\n @type erp: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSoftERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_erp = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"erp",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_erp)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_erp); /* "/home/zefiris/pyode/src/contact.pyx":159 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_erp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_erp = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSoftERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_erp); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSoftCFM[] = "getSoftCFM() -> float\n\n Return the contact normal \"softness\" parameter.\n "; static PyObject *__pyx_f_3ode_7Contact_getSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":167 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_cfm); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSoftCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSoftCFM[] = "setSoftCFM(cfm)\n\n Set the contact normal \"softness\" parameter.\n\n @param cfm: Softness parameter\n @type cfm: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSoftCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cfm = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"cfm",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_cfm)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_cfm); /* "/home/zefiris/pyode/src/contact.pyx":178 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_cfm); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.soft_cfm = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSoftCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_cfm); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMotion1[] = "getMotion1() -> float\n\n Get the surface velocity in friction direction 1.\n "; static PyObject *__pyx_f_3ode_7Contact_getMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":186 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 186; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMotion1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMotion1[] = "setMotion1(m)\n\n Set the surface velocity in friction direction 1.\n\n @param m: Surface velocity\n @type m: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMotion1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_m = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"m",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_m)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_m); /* "/home/zefiris/pyode/src/contact.pyx":197 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_m); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion1 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMotion1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_m); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getMotion2[] = "getMotion2() -> float\n\n Get the surface velocity in friction direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":205 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getMotion2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setMotion2[] = "setMotion2(m)\n\n Set the surface velocity in friction direction 2.\n\n @param m: Surface velocity\n @type m: float\n "; static PyObject *__pyx_f_3ode_7Contact_setMotion2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_m = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"m",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_m)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_m); /* "/home/zefiris/pyode/src/contact.pyx":216 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_m); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.motion2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setMotion2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_m); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSlip1[] = "getSlip1() -> float\n\n Get the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n "; static PyObject *__pyx_f_3ode_7Contact_getSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":225 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSlip1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSlip1[] = "setSlip1(s)\n\n Set the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n\n @param s: FDS coefficient\n @type s: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSlip1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"s",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_s)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_s); /* "/home/zefiris/pyode/src/contact.pyx":237 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip1 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSlip1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getSlip2[] = "getSlip2() -> float\n\n Get the coefficient of force-dependent-slip (FDS) for friction\n direction 2.\n "; static PyObject *__pyx_f_3ode_7Contact_getSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":246 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Contact.getSlip2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setSlip2[] = "setSlip2(s)\n\n Set the coefficient of force-dependent-slip (FDS) for friction\n direction 1.\n\n @param s: FDS coefficient\n @type s: float\n "; static PyObject *__pyx_f_3ode_7Contact_setSlip2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"s",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_s)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_s); /* "/home/zefiris/pyode/src/contact.pyx":258 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.surface.slip2 = __pyx_1; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Contact.setSlip2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_s); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getFDir1[] = "getFDir1() -> (x, y, z)\n\n Get the \"first friction direction\" vector that defines a direction\n along which frictional force is applied.\n "; static PyObject *__pyx_f_3ode_7Contact_getFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/contact.pyx":267 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Contact.getFDir1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_setFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setFDir1[] = "setFDir1(fdir)\n\n Set the \"first friction direction\" vector that defines a direction\n along which frictional force is applied. It must be of unit length\n and perpendicular to the contact normal (so it is typically\n tangential to the contact surface).\n\n @param fdir: Friction direction\n @type fdir: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_7Contact_setFDir1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fdir = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"fdir",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_fdir)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_fdir); /* "/home/zefiris/pyode/src/contact.pyx":281 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":282 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":283 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_fdir, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.fdir1[2]) = __pyx_3; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Contact.setFDir1"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_fdir); return __pyx_r; } static PyObject *__pyx_f_3ode_7Contact_getContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_getContactGeomParams[] = "getContactGeomParams() -> (pos, normal, depth, geom1, geom2)\n\n Get the ContactGeom structure of the contact.\n\n The return value is a tuple (pos, normal, depth, geom1, geom2)\n where pos and normal are 3-tuples of floats and depth is a single\n float. geom1 and geom2 are the Geom objects of the geoms in contact.\n "; static PyObject *__pyx_f_3ode_7Contact_getContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_v_pos; PyObject *__pyx_v_normal; PyObject *__pyx_v_depth; PyObject *__pyx_v_g1; PyObject *__pyx_v_g2; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_pos = Py_None; Py_INCREF(Py_None); __pyx_v_normal = Py_None; Py_INCREF(Py_None); __pyx_v_depth = Py_None; Py_INCREF(Py_None); __pyx_v_g1 = Py_None; Py_INCREF(Py_None); __pyx_v_g2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/contact.pyx":298 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; Py_DECREF(__pyx_v_pos); __pyx_v_pos = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":299 */ __pyx_1 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; Py_DECREF(__pyx_v_normal); __pyx_v_normal = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":300 */ __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.depth); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; goto __pyx_L1;} Py_DECREF(__pyx_v_depth); __pyx_v_depth = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/contact.pyx":302 */ __pyx_v_id1 = ((long )((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1); /* "/home/zefiris/pyode/src/contact.pyx":303 */ __pyx_v_id2 = ((long )((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2); /* "/home/zefiris/pyode/src/contact.pyx":304 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_id1); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_g1); __pyx_v_g1 = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/contact.pyx":305 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(__pyx_v_id2); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_g2); __pyx_v_g2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/contact.pyx":306 */ __pyx_4 = PyTuple_New(5); if (!__pyx_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; goto __pyx_L1;} Py_INCREF(__pyx_v_pos); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_pos); Py_INCREF(__pyx_v_normal); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_normal); Py_INCREF(__pyx_v_depth); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_depth); Py_INCREF(__pyx_v_g1); PyTuple_SET_ITEM(__pyx_4, 3, __pyx_v_g1); Py_INCREF(__pyx_v_g2); PyTuple_SET_ITEM(__pyx_4, 4, __pyx_v_g2); __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Contact.getContactGeomParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_pos); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n__id; static PyObject *__pyx_f_3ode_7Contact_setContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7Contact_setContactGeomParams[] = "setContactGeomParams(pos, normal, depth, geom1=None, geom2=None)\n \n Set the ContactGeom structure of the contact.\n\n @param pos: Contact position, in global coordinates\n @type pos: 3-sequence of floats\n @param normal: Unit length normal vector\n @type normal: 3-sequence of floats\n @param depth: Depth to which the two bodies inter-penetrate\n @type depth: float\n @param geom1: Geometry object 1 that collided\n @type geom1: Geom\n @param geom2: Geometry object 2 that collided\n @type geom2: Geom\n "; static PyObject *__pyx_f_3ode_7Contact_setContactGeomParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_g1 = 0; PyObject *__pyx_v_g2 = 0; long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; int __pyx_4; long __pyx_5; static char *__pyx_argnames[] = {"pos","normal","depth","g1","g2",0}; __pyx_v_g1 = __pyx_k2; __pyx_v_g2 = __pyx_k3; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|OO", __pyx_argnames, &__pyx_v_pos, &__pyx_v_normal, &__pyx_v_depth, &__pyx_v_g1, &__pyx_v_g2)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_g1); Py_INCREF(__pyx_v_g2); /* "/home/zefiris/pyode/src/contact.pyx":328 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":329 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":330 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.pos[2]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":331 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[0]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":332 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[1]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":333 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.normal[2]) = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":334 */ __pyx_3 = PyFloat_AsDouble(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; goto __pyx_L1;} ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.depth = __pyx_3; /* "/home/zefiris/pyode/src/contact.pyx":335 */ if (PyObject_Cmp(__pyx_v_g1, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/contact.pyx":336 */ __pyx_1 = PyObject_GetAttr(__pyx_v_g1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/contact.pyx":337 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1 = ((struct dxGeom (*))__pyx_v_id); goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/contact.pyx":339 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g1 = ((struct dxGeom (*))0); } __pyx_L2:; /* "/home/zefiris/pyode/src/contact.pyx":341 */ if (PyObject_Cmp(__pyx_v_g2, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/contact.pyx":342 */ __pyx_1 = PyObject_GetAttr(__pyx_v_g2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/contact.pyx":343 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2 = ((struct dxGeom (*))__pyx_v_id); goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/contact.pyx":345 */ ((struct __pyx_obj_3ode_Contact *)__pyx_v_self)->_contact.geom.g2 = ((struct dxGeom (*))0); } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Contact.setContactGeomParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); return __pyx_r; } static int __pyx_f_3ode_5World___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5World___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":37 */ ((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid = dWorldCreate(); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static void __pyx_f_3ode_5World___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_5World___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":40 */ __pyx_1 = (((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/world.pyx":41 */ dWorldDestroy(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid); goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_f_3ode_5World_setGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setGravity[] = "setGravity(gravity)\n\n Set the world\'s global gravity vector.\n\n @param gravity: Gravity vector\n @type gravity: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_5World_setGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_gravity = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"gravity",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_gravity)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_gravity); /* "/home/zefiris/pyode/src/world.pyx":52 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_gravity, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dWorldSetGravity(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.World.setGravity"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_gravity); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getGravity[] = "getGravity() -> 3-tuple\n\n Return the world\'s global gravity vector as a 3-tuple of floats.\n "; static PyObject *__pyx_f_3ode_5World_getGravity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_g; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":61 */ dWorldGetGravity(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_v_g); /* "/home/zefiris/pyode/src/world.pyx":62 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_g[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_g[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_g[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.World.getGravity"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setERP[] = "setERP(erp)\n\n Set the global ERP value, that controls how much error\n correction is performed in each time step. Typical values are\n in the range 0.1-0.8. The default is 0.2.\n\n @param erp: Global ERP value\n @type erp: float\n "; static PyObject *__pyx_f_3ode_5World_setERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_erp = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"erp",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_erp)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_erp); /* "/home/zefiris/pyode/src/world.pyx":75 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_erp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; goto __pyx_L1;} dWorldSetERP(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_erp); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getERP[] = "getERP() -> float\n\n Get the global ERP value, that controls how much error\n correction is performed in each time step. Typical values are\n in the range 0.1-0.8. The default is 0.2.\n "; static PyObject *__pyx_f_3ode_5World_getERP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":85 */ __pyx_1 = PyFloat_FromDouble(dWorldGetERP(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getERP"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setCFM[] = "setCFM(cfm)\n\n Set the global CFM (constraint force mixing) value. Typical\n values are in the range 10E-9 - 1. The default is 10E-5 if\n single precision is being used, or 10E-10 if double precision\n is being used.\n\n @param cfm: Constraint force mixing value\n @type cfm: float\n "; static PyObject *__pyx_f_3ode_5World_setCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cfm = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"cfm",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_cfm)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_cfm); /* "/home/zefiris/pyode/src/world.pyx":99 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_cfm); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; goto __pyx_L1;} dWorldSetCFM(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_cfm); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getCFM[] = "getCFM() -> float\n\n Get the global CFM (constraint force mixing) value. Typical\n values are in the range 10E-9 - 1. The default is 10E-5 if\n single precision is being used, or 10E-10 if double precision\n is being used.\n "; static PyObject *__pyx_f_3ode_5World_getCFM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":110 */ __pyx_1 = PyFloat_FromDouble(dWorldGetCFM(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getCFM"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_step[] = "step(stepsize)\n\n Step the world. This uses a \"big matrix\" method that takes\n time on the order of O(m3) and memory on the order of O(m2), where m\n is the total number of constraint rows.\n\n For large systems this will use a lot of memory and can be\n very slow, but this is currently the most accurate method.\n\n @param stepsize: Time step\n @type stepsize: float\n "; static PyObject *__pyx_f_3ode_5World_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"stepsize",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_stepsize)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); /* "/home/zefiris/pyode/src/world.pyx":127 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; goto __pyx_L1;} dWorldStep(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.step"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_quickStep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_quickStep[] = "quickStep(stepsize)\n \n Step the world. This uses an iterative method that takes time\n on the order of O(m*N) and memory on the order of O(m), where m is\n the total number of constraint rows and N is the number of\n iterations.\n\n For large systems this is a lot faster than dWorldStep, but it\n is less accurate.\n\n @param stepsize: Time step\n @type stepsize: float \n "; static PyObject *__pyx_f_3ode_5World_quickStep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"stepsize",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_stepsize)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); /* "/home/zefiris/pyode/src/world.pyx":144 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 144; goto __pyx_L1;} dWorldQuickStep(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.quickStep"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setQuickStepNumIterations[] = "setQuickStepNumIterations(num)\n \n Set the number of iterations that the QuickStep method\n performs per step. More iterations will give a more accurate\n solution, but will take longer to compute. The default is 20\n iterations.\n\n @param num: Number of iterations\n @type num: int\n "; static PyObject *__pyx_f_3ode_5World_setQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_num = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_num); /* "/home/zefiris/pyode/src/world.pyx":159 */ __pyx_1 = PyInt_AsLong(__pyx_v_num); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; goto __pyx_L1;} dWorldSetQuickStepNumIterations(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setQuickStepNumIterations"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_num); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getQuickStepNumIterations[] = "getQuickStepNumIterations() -> int\n \n Get the number of iterations that the QuickStep method\n performs per step. More iterations will give a more accurate\n solution, but will take longer to compute. The default is 20\n iterations.\n "; static PyObject *__pyx_f_3ode_5World_getQuickStepNumIterations(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":170 */ __pyx_1 = PyInt_FromLong(dWorldGetQuickStepNumIterations(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getQuickStepNumIterations"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setContactMaxCorrectingVel[] = "setContactMaxCorrectingVel(vel)\n\n Set the maximum correcting velocity that contacts are allowed\n to generate. The default value is infinity (i.e. no\n limit). Reducing this value can help prevent \"popping\" of\n deeply embedded objects.\n\n @param vel: Maximum correcting velocity\n @type vel: float\n "; static PyObject *__pyx_f_3ode_5World_setContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/world.pyx":184 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_vel); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; goto __pyx_L1;} dWorldSetContactMaxCorrectingVel(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setContactMaxCorrectingVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getContactMaxCorrectingVel[] = "getContactMaxCorrectingVel() -> float\n\n Get the maximum correcting velocity that contacts are allowed\n to generate. The default value is infinity (i.e. no\n limit). Reducing this value can help prevent \"popping\" of\n deeply embedded objects. \n "; static PyObject *__pyx_f_3ode_5World_getContactMaxCorrectingVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":195 */ __pyx_1 = PyFloat_FromDouble(dWorldGetContactMaxCorrectingVel(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getContactMaxCorrectingVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setContactSurfaceLayer[] = "setContactSurfaceLayer(depth)\n\n Set the depth of the surface layer around all geometry\n objects. Contacts are allowed to sink into the surface layer\n up to the given depth before coming to rest. The default value\n is zero. Increasing this to some small value (e.g. 0.001) can\n help prevent jittering problems due to contacts being\n repeatedly made and broken.\n\n @param depth: Surface layer depth\n @type depth: float\n "; static PyObject *__pyx_f_3ode_5World_setContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_depth = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"depth",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_depth)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_depth); /* "/home/zefiris/pyode/src/world.pyx":211 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; goto __pyx_L1;} dWorldSetContactSurfaceLayer(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setContactSurfaceLayer"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_depth); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getContactSurfaceLayer[] = "getContactSurfaceLayer()\n\n Get the depth of the surface layer around all geometry\n objects. Contacts are allowed to sink into the surface layer\n up to the given depth before coming to rest. The default value\n is zero. Increasing this to some small value (e.g. 0.001) can\n help prevent jittering problems due to contacts being\n repeatedly made and broken.\n "; static PyObject *__pyx_f_3ode_5World_getContactSurfaceLayer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":224 */ __pyx_1 = PyFloat_FromDouble(dWorldGetContactSurfaceLayer(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getContactSurfaceLayer"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableFlag[] = "setAutoDisableFlag(flag)\n \n Set the default auto-disable flag for newly created bodies.\n\n @param flag: True = Do auto disable\n @type flag: bool\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"flag",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flag)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flag); /* "/home/zefiris/pyode/src/world.pyx":235 */ __pyx_1 = PyInt_AsLong(__pyx_v_flag); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 235; goto __pyx_L1;} dWorldSetAutoDisableFlag(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableFlag"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flag); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableFlag[] = "getAutoDisableFlag() -> bool\n \n Get the default auto-disable flag for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableFlag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":243 */ __pyx_1 = PyInt_FromLong(dWorldGetAutoDisableFlag(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableFlag"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableLinearThreshold[] = "setAutoDisableLinearThreshold(threshold)\n \n Set the default auto-disable linear threshold for newly created\n bodies.\n\n @param threshold: Linear threshold\n @type threshold: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_threshold = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"threshold",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_threshold)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_threshold); /* "/home/zefiris/pyode/src/world.pyx":256 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_threshold); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; goto __pyx_L1;} dWorldSetAutoDisableLinearThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableLinearThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_threshold); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableLinearThreshold[] = "getAutoDisableLinearThreshold() -> float\n \n Get the default auto-disable linear threshold for newly created\n bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableLinearThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":265 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableLinearThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 265; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableLinearThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableAngularThreshold[] = "setAutoDisableAngularThreshold(threshold)\n \n Set the default auto-disable angular threshold for newly created\n bodies.\n\n @param threshold: Angular threshold\n @type threshold: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_threshold = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"threshold",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_threshold)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_threshold); /* "/home/zefiris/pyode/src/world.pyx":277 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_threshold); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; goto __pyx_L1;} dWorldSetAutoDisableAngularThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableAngularThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_threshold); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableAngularThreshold[] = "getAutoDisableAngularThreshold() -> float\n \n Get the default auto-disable angular threshold for newly created\n bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableAngularThreshold(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":286 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableAngularThreshold(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableAngularThreshold"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableSteps[] = "setAutoDisableSteps(steps)\n \n Set the default auto-disable steps for newly created bodies.\n\n @param steps: Auto disable steps\n @type steps: int\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_steps = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"steps",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_steps)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_steps); /* "/home/zefiris/pyode/src/world.pyx":297 */ __pyx_1 = PyInt_AsLong(__pyx_v_steps); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 297; goto __pyx_L1;} dWorldSetAutoDisableSteps(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableSteps"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_steps); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableSteps[] = "getAutoDisableSteps() -> int\n \n Get the default auto-disable steps for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableSteps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":305 */ __pyx_1 = PyInt_FromLong(dWorldGetAutoDisableSteps(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableSteps"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_setAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_setAutoDisableTime[] = "setAutoDisableTime(time)\n \n Set the default auto-disable time for newly created bodies.\n\n @param time: Auto disable time\n @type time: float\n "; static PyObject *__pyx_f_3ode_5World_setAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_time = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"time",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_time)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_time); /* "/home/zefiris/pyode/src/world.pyx":316 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_time); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; goto __pyx_L1;} dWorldSetAutoDisableTime(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.World.setAutoDisableTime"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_time); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_getAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_getAutoDisableTime[] = "getAutoDisableTime() -> float\n \n Get the default auto-disable time for newly created bodies.\n "; static PyObject *__pyx_f_3ode_5World_getAutoDisableTime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/world.pyx":324 */ __pyx_1 = PyFloat_FromDouble(dWorldGetAutoDisableTime(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid)); if (!__pyx_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 324; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.World.getAutoDisableTime"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5World_impulseToForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5World_impulseToForce[] = "impulseToForce(stepsize, impulse) -> 3-tuple\n\n If you want to apply a linear or angular impulse to a rigid\n body, instead of a force or a torque, then you can use this\n function to convert the desired impulse into a force/torque\n vector before calling the dBodyAdd... function.\n\n @param stepsize: Time step\n @param impulse: Impulse vector\n @type stepsize: float\n @type impulse: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_5World_impulseToForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stepsize = 0; PyObject *__pyx_v_impulse = 0; dVector3 __pyx_v_force; PyObject *__pyx_r; dReal __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; static char *__pyx_argnames[] = {"stepsize","impulse",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_stepsize, &__pyx_v_impulse)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_stepsize); Py_INCREF(__pyx_v_impulse); /* "/home/zefiris/pyode/src/world.pyx":341 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_stepsize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_impulse, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dWorldImpulseToForce(((struct __pyx_obj_3ode_World *)__pyx_v_self)->wid,__pyx_1,__pyx_4,__pyx_5,__pyx_6,__pyx_v_force); /* "/home/zefiris/pyode/src/world.pyx":342 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_force[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_force[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_force[2])); if (!__pyx_7) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_8 = PyTuple_New(3); if (!__pyx_8) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_8, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_8, 2, __pyx_7); __pyx_2 = 0; __pyx_3 = 0; __pyx_7 = 0; __pyx_r = __pyx_8; __pyx_8 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); __Pyx_AddTraceback("ode.World.impulseToForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_stepsize); Py_DECREF(__pyx_v_impulse); return __pyx_r; } static int __pyx_f_3ode_4Body___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_4Body___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; int __pyx_r; static char *__pyx_argnames[] = {"world",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_world)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_world); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 46; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":47 */ ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid = dBodyCreate(__pyx_v_world->wid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_world); return __pyx_r; } static int __pyx_f_3ode_4Body___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body___init__[] = "Constructor.\n\n @param world: The world in which the body should be created.\n @type world: World\n "; static int __pyx_f_3ode_4Body___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"world",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_world)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_world); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":55 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->world); ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/body.pyx":56 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 56; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs); ((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_world); return __pyx_r; } static void __pyx_f_3ode_4Body___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_4Body___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":59 */ __pyx_1 = (((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/body.pyx":60 */ dBodyDestroy(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k79p; static char (__pyx_k79[]) = "Body object has no attribute '%s'"; static PyObject *__pyx_f_3ode_4Body___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_4Body___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/body.pyx":63 */ /*try:*/ { /* "/home/zefiris/pyode/src/body.pyx":64 */ __pyx_1 = PyObject_GetItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; goto __pyx_L2;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; } goto __pyx_L3; __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":65 */ /*except:*/ { __Pyx_AddTraceback("ode.__getattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":66 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k79p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_4Body___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_4Body___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/body.pyx":69 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_k80p; static char (__pyx_k80[]) = "Body object has no attribute '%s'"; static int __pyx_f_3ode_4Body___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_f_3ode_4Body___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/body.pyx":72 */ /*try:*/ { /* "/home/zefiris/pyode/src/body.pyx":73 */ if (PyObject_DelItem(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->userattribs, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; /* "/home/zefiris/pyode/src/body.pyx":74 */ /*except:*/ { __Pyx_AddTraceback("ode.__delattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":75 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k80p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.__delattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setPosition[] = "setPosition(pos)\n\n Set the position of the body.\n\n @param pos: The new position\n @type pos: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/body.pyx":86 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetPosition(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPosition[] = "getPosition() -> 3-tuple\n\n Return the current position of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":96 */ __pyx_v_p = ((dReal (*))dBodyGetPosition(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":97 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setRotation[] = "setRotation(R)\n\n Set the orientation of the body. The rotation matrix must be\n given as a sequence of 9 floats which are the elements of the\n matrix in row-major order.\n\n @param R: Rotation matrix\n @type R: 9-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_R = 0; dMatrix3 __pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"R",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_R)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_R); /* "/home/zefiris/pyode/src/body.pyx":111 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[0]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":112 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[1]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":113 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[2]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":114 */ (__pyx_v_m[3]) = 0; /* "/home/zefiris/pyode/src/body.pyx":115 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[4]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":116 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[5]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":117 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[6]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":118 */ (__pyx_v_m[7]) = 0; /* "/home/zefiris/pyode/src/body.pyx":119 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[8]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":120 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[9]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":121 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_R, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_m[10]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":122 */ (__pyx_v_m[11]) = 0; /* "/home/zefiris/pyode/src/body.pyx":123 */ dBodySetRotation(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_m); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_R); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRotation[] = "getRotation() -> 9-tuple\n\n Return the current rotation matrix as a tuple of 9 floats (row-major\n order).\n "; static PyObject *__pyx_f_3ode_4Body_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_m); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":134 */ __pyx_v_m = ((dReal (*))dBodyGetRotation(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":135 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_m[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_m[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_m[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_m[4])); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_m[5])); if (!__pyx_5) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_m[6])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_m[8])); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_8 = PyFloat_FromDouble((__pyx_v_m[9])); if (!__pyx_8) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_9 = PyFloat_FromDouble((__pyx_v_m[10])); if (!__pyx_9) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_10 = PyTuple_New(9); if (!__pyx_10) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_10, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_10, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_10, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_10, 3, __pyx_4); PyTuple_SET_ITEM(__pyx_10, 4, __pyx_5); PyTuple_SET_ITEM(__pyx_10, 5, __pyx_6); PyTuple_SET_ITEM(__pyx_10, 6, __pyx_7); PyTuple_SET_ITEM(__pyx_10, 7, __pyx_8); PyTuple_SET_ITEM(__pyx_10, 8, __pyx_9); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_8 = 0; __pyx_9 = 0; __pyx_r = __pyx_10; __pyx_10 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); __Pyx_AddTraceback("ode.Body.getRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getQuaternion[] = "getQuaternion() -> 4-tuple\n\n Return the current rotation as a quaternion. The return value\n is a list of 4 floats.\n "; static PyObject *__pyx_f_3ode_4Body_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_q); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":145 */ __pyx_v_q = ((dReal (*))dBodyGetQuaternion(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":146 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_q[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_q[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_q[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_q[3])); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} __pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_r = __pyx_5; __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.Body.getQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setQuaternion[] = "setQuaternion(q)\n\n Set the orientation of the body. The quaternion must be given as a\n sequence of 4 floats.\n\n @param q: Quaternion\n @type q: 4-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_q = 0; dQuaternion __pyx_v_w; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; static char *__pyx_argnames[] = {"q",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_q)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_q); /* "/home/zefiris/pyode/src/body.pyx":159 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[0]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":160 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[1]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":161 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[2]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":162 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_q, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_w[3]) = __pyx_3; /* "/home/zefiris/pyode/src/body.pyx":163 */ dBodySetQuaternion(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_w); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_q); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setLinearVel[] = "setLinearVel(vel)\n\n Set the linear velocity of the body.\n\n @param vel: New velocity\n @type vel: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/body.pyx":174 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetLinearVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setLinearVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getLinearVel[] = "getLinearVel() -> 3-tuple\n\n Get the current linear velocity of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getLinearVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":184 */ __pyx_v_p = ((dReal (*))dBodyGetLinearVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":185 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getLinearVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setAngularVel[] = "setAngularVel(vel)\n\n Set the angular velocity of the body.\n\n @param vel: New angular velocity\n @type vel: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_vel = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"vel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_vel)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_vel); /* "/home/zefiris/pyode/src/body.pyx":196 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_vel, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetAngularVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setAngularVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_vel); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getAngularVel[] = "getAngularVel() -> 3-tuple\n\n Get the current angular velocity of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getAngularVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":206 */ __pyx_v_p = ((dReal (*))dBodyGetAngularVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":207 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 207; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getAngularVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setMass[] = "setMass(mass)\n\n Set the mass properties of the body. The argument mass must be\n an instance of a Mass object.\n\n @param mass: Mass properties\n @type mass: Mass\n "; static PyObject *__pyx_f_3ode_4Body_setMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_mass = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"mass",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mass)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mass); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mass), __pyx_ptype_3ode_Mass, 1, "mass")) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 210; goto __pyx_L1;} /* "/home/zefiris/pyode/src/body.pyx":219 */ dBodySetMass(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,(&__pyx_v_mass->_mass)); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setMass"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mass); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getMass[] = "getMass() -> mass\n\n Return the mass properties as a Mass object.\n "; static PyObject *__pyx_f_3ode_4Body_getMass(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Mass *__pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_m = ((struct __pyx_obj_3ode_Mass *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/body.pyx":228 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_Mass), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; goto __pyx_L1;} if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_3ode_Mass)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_m)); __pyx_v_m = ((struct __pyx_obj_3ode_Mass *)__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/body.pyx":229 */ dBodyGetMass(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,(&__pyx_v_m->_mass)); /* "/home/zefiris/pyode/src/body.pyx":230 */ Py_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = ((PyObject *)__pyx_v_m); goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getMass"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_m); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForce[] = "addForce(f)\n\n Add an external force f given in absolute coordinates. The force\n is applied at the center of mass.\n\n @param f: Force\n @type f: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":242 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 242; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addTorque[] = "addTorque(t)\n\n Add an external torque t given in absolute coordinates.\n\n @param t: Torque\n @type t: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":253 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForce[] = "addRelForce(f)\n\n Add an external force f given in relative coordinates\n (relative to the body\'s own frame of reference). The force\n is applied at the center of mass.\n\n @param f: Force\n @type f: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":266 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelTorque[] = "addRelTorque(t)\n\n Add an external torque t given in relative coordinates\n (relative to the body\'s own frame of reference).\n\n @param t: Torque\n @type t: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":278 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForceAtPos[] = "addForceAtPos(f, p)\n\n Add an external force f at position p. Both arguments must be\n given in absolute coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":292 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForceAtPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForceAtPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addForceAtRelPos[] = "addForceAtRelPos(f, p)\n\n Add an external force f at position p. f is given in absolute\n coordinates and p in absolute coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":306 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddForceAtRelPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addForceAtRelPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForceAtPos[] = "addRelForceAtPos(f, p)\n\n Add an external force f at position p. f is given in relative\n coordinates and p in relative coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForceAtPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":320 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 320; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForceAtPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForceAtPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_addRelForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_addRelForceAtRelPos[] = "addRelForceAtRelPos(f, p)\n\n Add an external force f at position p. Both arguments must be\n given in relative coordinates.\n\n @param f: Force\n @param p: Position\n @type f: 3-sequence of floats\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_addRelForceAtRelPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"f","p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_f, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":334 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyAddRelForceAtRelPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.addRelForceAtRelPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getForce[] = "getForce() -> 3-tuple\n\n Return the current accumulated force.\n "; static PyObject *__pyx_f_3ode_4Body_getForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_f); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":344 */ __pyx_v_f = ((dReal (*))dBodyGetForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":345 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_f[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_f[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_f[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getTorque[] = "getTorque() -> 3-tuple\n\n Return the current accumulated torque.\n "; static PyObject *__pyx_f_3ode_4Body_getTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_f); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":355 */ __pyx_v_f = ((dReal (*))dBodyGetTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); /* "/home/zefiris/pyode/src/body.pyx":356 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_f[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_f[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_f[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 356; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setForce[] = "setForce(f)\n\n Set the body force accumulation vector.\n\n @param f: Force\n @type f: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Body_setForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"f",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_f)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_f); /* "/home/zefiris/pyode/src/body.pyx":367 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetForce(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_f); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setTorque[] = "setTorque(t)\n\n Set the body torque accumulation vector.\n\n @param t: Torque\n @type t: 3-tuple of floats\n "; static PyObject *__pyx_f_3ode_4Body_setTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_t = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"t",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_t)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_t); /* "/home/zefiris/pyode/src/body.pyx":378 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_t, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 378; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetTorque(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_t); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRelPointPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRelPointPos[] = "getRelPointPos(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s position in global coordinates. The point p\n must be given in body relative coordinates.\n\n @param p: Body point (local coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getRelPointPos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":393 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetRelPointPos(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":394 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 394; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getRelPointPos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getRelPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getRelPointVel[] = "getRelPointVel(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s velocity in global coordinates. The point p\n must be given in body relative coordinates.\n\n @param p: Body point (local coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getRelPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":408 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 408; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetRelPointVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":409 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 409; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getRelPointVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPointVel[] = "getPointVel(p) -> 3-tuple\n\n Utility function that takes a point p on a body and returns\n that point\'s velocity in global coordinates. The point p\n must be given in global coordinates.\n\n @param p: Body point (global coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getPointVel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":423 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetPointVel(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":424 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 424; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getPointVel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getPosRelPoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getPosRelPoint[] = "getPosRelPoint(p) -> 3-tuple\n\n This is the inverse of getRelPointPos(). It takes a point p in\n global coordinates and returns the point\'s position in\n body-relative coordinates.\n\n @param p: Body point (global coordinates)\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_getPosRelPoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":438 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 438; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyGetPosRelPoint(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":439 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 439; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.getPosRelPoint"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_vectorToWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_vectorToWorld[] = "vectorToWorld(v) -> 3-tuple\n\n Given a vector v expressed in the body coordinate system, rotate\n it to the world coordinate system.\n\n @param v: Vector in body coordinate system\n @type v: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_vectorToWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_v = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"v",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_v)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_v); /* "/home/zefiris/pyode/src/body.pyx":452 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 452; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyVectorToWorld(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":453 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 453; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.vectorToWorld"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_v); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_vectorFromWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_vectorFromWorld[] = "vectorFromWorld(v) -> 3-tuple\n\n Given a vector v expressed in the world coordinate system, rotate\n it to the body coordinate system.\n\n @param v: Vector in world coordinate system\n @type v: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_vectorFromWorld(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_v = 0; dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"v",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_v)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_v); /* "/home/zefiris/pyode/src/body.pyx":466 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodyVectorFromWorld(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5,__pyx_v_res); /* "/home/zefiris/pyode/src/body.pyx":467 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_6) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 467; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.Body.vectorFromWorld"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_v); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_enable[] = "enable()\n\n Manually enable a body.\n "; static PyObject *__pyx_f_3ode_4Body_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":476 */ dBodyEnable(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_disable[] = "disable()\n\n Manually disable a body. Note that a disabled body that is connected\n through a joint to an enabled body will be automatically re-enabled\n at the next simulation step.\n "; static PyObject *__pyx_f_3ode_4Body_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":486 */ dBodyDisable(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_isEnabled[] = "isEnabled() -> bool\n\n Check if a body is currently enabled.\n "; static PyObject *__pyx_f_3ode_4Body_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":494 */ __pyx_1 = PyInt_FromLong(dBodyIsEnabled(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 494; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.isEnabled"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setFiniteRotationMode[] = "setFiniteRotationMode(mode)\n\n This function controls the way a body\'s orientation is updated at\n each time step. The mode argument can be:\n \n - 0: An \"infinitesimal\" orientation update is used. This is\n fast to compute, but it can occasionally cause inaccuracies\n for bodies that are rotating at high speed, especially when\n those bodies are joined to other bodies. This is the default\n for every new body that is created.\n \n - 1: A \"finite\" orientation update is used. This is more\n costly to compute, but will be more accurate for high speed\n rotations. Note however that high speed rotations can result\n in many types of error in a simulation, and this mode will\n only fix one of those sources of error.\n\n @param mode: Rotation mode (0/1)\n @type mode: int\n "; static PyObject *__pyx_f_3ode_4Body_setFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/body.pyx":518 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 518; goto __pyx_L1;} dBodySetFiniteRotationMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setFiniteRotationMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getFiniteRotationMode[] = "getFiniteRotationMode() -> mode (0/1)\n\n Return the current finite rotation mode of a body (0 or 1).\n See setFiniteRotationMode().\n "; static PyObject *__pyx_f_3ode_4Body_getFiniteRotationMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":527 */ __pyx_1 = PyInt_FromLong(dBodyGetFiniteRotationMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 527; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getFiniteRotationMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setFiniteRotationAxis[] = "setFiniteRotationAxis(a)\n\n Set the finite rotation axis of the body. This axis only has a\n meaning when the finite rotation mode is set\n (see setFiniteRotationMode()).\n \n @param a: Axis\n @type a: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_4Body_setFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"a",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_a)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_a); /* "/home/zefiris/pyode/src/body.pyx":540 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_a, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dBodySetFiniteRotationAxis(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Body.setFiniteRotationAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_a); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getFiniteRotationAxis[] = "getFiniteRotationAxis() -> 3-tuple\n\n Return the current finite rotation axis of the body.\n "; static PyObject *__pyx_f_3ode_4Body_getFiniteRotationAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":550 */ dBodyGetFiniteRotationAxis(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_v_p); /* "/home/zefiris/pyode/src/body.pyx":551 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 551; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Body.getFiniteRotationAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getNumJoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getNumJoints[] = "getNumJoints() -> int\n\n Return the number of joints that are attached to this body.\n "; static PyObject *__pyx_f_3ode_4Body_getNumJoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":559 */ __pyx_1 = PyInt_FromLong(dBodyGetNumJoints(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 559; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getNumJoints"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_setGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_setGravityMode[] = "setGravityMode(mode)\n\n Set whether the body is influenced by the world\'s gravity\n or not. If mode is True it is, otherwise it isn\'t.\n Newly created bodies are always influenced by the world\'s gravity.\n\n @param mode: Gravity mode\n @type mode: bool\n "; static PyObject *__pyx_f_3ode_4Body_setGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/body.pyx":572 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 572; goto __pyx_L1;} dBodySetGravityMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Body.setGravityMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_4Body_getGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_4Body_getGravityMode[] = "getGravityMode() -> bool\n\n Return True if the body is influenced by the world\'s gravity.\n "; static PyObject *__pyx_f_3ode_4Body_getGravityMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/body.pyx":580 */ __pyx_1 = PyInt_FromLong(dBodyGetGravityMode(((struct __pyx_obj_3ode_Body *)__pyx_v_self)->bid)); if (!__pyx_1) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 580; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Body.getGravityMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_10JointGroup___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10JointGroup___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":51 */ ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid = dJointGroupCreate(0); __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_10JointGroup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10JointGroup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":54 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.JointGroup.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n__destroyed; static void __pyx_f_3ode_10JointGroup___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_10JointGroup___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_v_j; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); __pyx_v_j = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":57 */ __pyx_1 = (((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":58 */ __pyx_2 = PyObject_GetIter(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; goto __pyx_L1;} for (;;) { __pyx_3 = PyIter_Next(__pyx_2); if (!__pyx_3) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_j); __pyx_v_j = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/joints.pyx":59 */ __pyx_3 = PyObject_GetAttr(__pyx_v_j, __pyx_n__destroyed); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; goto __pyx_L1;} __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":60 */ dJointGroupDestroy(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid); goto __pyx_L2; } __pyx_L2:; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.JointGroup.__dealloc__"); __pyx_L0:; Py_DECREF(__pyx_v_j); Py_DECREF(__pyx_v_self); } static PyObject *__pyx_f_3ode_10JointGroup_empty(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10JointGroup_empty[] = "empty()\n\n Destroy all joints in the group.\n "; static PyObject *__pyx_f_3ode_10JointGroup_empty(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_j; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_j = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":68 */ dJointGroupEmpty(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->gid); /* "/home/zefiris/pyode/src/joints.pyx":69 */ __pyx_1 = PyObject_GetIter(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; goto __pyx_L1;} for (;;) { __pyx_2 = PyIter_Next(__pyx_1); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_j); __pyx_v_j = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":70 */ __pyx_2 = PyObject_GetAttr(__pyx_v_j, __pyx_n__destroyed); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; goto __pyx_L1;} __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":71 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 71; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist); ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist = __pyx_2; __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.JointGroup.empty"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_j); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_append; static PyObject *__pyx_f_3ode_10JointGroup__addjoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10JointGroup__addjoint[] = "_addjoint(j)\n\n Add a joint to the group. This is an internal method that is\n called by the joints. The group has to know the Python\n wrappers because it has to notify them when the group is\n emptied (so that the ODE joints won\'t get destroyed\n twice). The notification is done by calling _destroyed() on\n the Python joints.\n\n @param j: The joint to add\n @type j: Joint\n "; static PyObject *__pyx_f_3ode_10JointGroup__addjoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_j = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"j",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_j)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_j); /* "/home/zefiris/pyode/src/joints.pyx":87 */ __pyx_1 = PyObject_GetAttr(((struct __pyx_obj_3ode_JointGroup *)__pyx_v_self)->jointlist, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} Py_INCREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_j); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.JointGroup._addjoint"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_j); return __pyx_r; } static int __pyx_f_3ode_5Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":112 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":113 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->world); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->world = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":114 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = NULL; /* "/home/zefiris/pyode/src/joints.pyx":115 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":116 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":117 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Joint.__new__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_n_NotImplementedError; static PyObject *__pyx_k81p; static char (__pyx_k81[]) = "The Joint base class can't be used directly."; static int __pyx_f_3ode_5Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_5Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":120 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k81p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Joint.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_n_setFeedback; static PyObject *__pyx_n_False; static void __pyx_f_3ode_5Joint___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_5Joint___dealloc__(PyObject *__pyx_v_self) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; int __pyx_4; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":123 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_setFeedback); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 123; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/joints.pyx":124 */ __pyx_4 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid != NULL); if (__pyx_4) { /* "/home/zefiris/pyode/src/joints.pyx":125 */ dJointDestroy(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid); goto __pyx_L2; } __pyx_L2:; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Joint.__dealloc__"); __pyx_L0:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k82p; static char (__pyx_k82[]) = "Joint object has no attribute '%s'"; static PyObject *__pyx_f_3ode_5Joint___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_5Joint___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/joints.pyx":128 */ /*try:*/ { /* "/home/zefiris/pyode/src/joints.pyx":129 */ __pyx_1 = PyObject_GetItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 129; goto __pyx_L2;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; } goto __pyx_L3; __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":130 */ /*except:*/ { __Pyx_AddTraceback("ode.__getattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 130; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":131 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k82p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 131; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Joint.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_5Joint___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_3ode_5Joint___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":134 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Joint.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_k83p; static char (__pyx_k83[]) = "Joint object has no attribute '%s'"; static int __pyx_f_3ode_5Joint___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_f_3ode_5Joint___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/joints.pyx":137 */ /*try:*/ { /* "/home/zefiris/pyode/src/joints.pyx":138 */ if (PyObject_DelItem(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->userattribs, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 138; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":139 */ /*except:*/ { __Pyx_AddTraceback("ode.__delattr__"); __pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 139; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":140 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} __pyx_2 = PyNumber_Remainder(__pyx_k83p, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_2, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 140; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Joint.__delattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint__destroyed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint__destroyed[] = "Notify the joint object about an external destruction of the ODE joint.\n\n This method has to be called when the underlying ODE object\n was destroyed by someone else (e.g. by a joint group). The Python\n wrapper will then refrain from destroying it again.\n "; static PyObject *__pyx_f_3ode_5Joint__destroyed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":150 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid = NULL; __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint_attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_attach[] = "attach(body1, body2)\n\n Attach the joint to some new bodies. A body can be attached\n to the environment by passing None as second body.\n \n @param body1: First body\n @param body2: Second body\n @type body1: Body\n @type body2: Body\n "; static PyObject *__pyx_f_3ode_5Joint_attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body1 = 0; struct __pyx_obj_3ode_Body *__pyx_v_body2 = 0; dBodyID __pyx_v_id1; dBodyID __pyx_v_id2; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"body1","body2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_body1, &__pyx_v_body2)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_body1); Py_INCREF(__pyx_v_body2); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body1), __pyx_ptype_3ode_Body, 1, "body1")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 153; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body2), __pyx_ptype_3ode_Body, 1, "body2")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 153; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":166 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body1), Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":167 */ __pyx_v_id1 = NULL; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":169 */ __pyx_v_id1 = __pyx_v_body1->bid; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":171 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body2), Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 171; goto __pyx_L1;} __pyx_1 = __pyx_1 == 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":172 */ __pyx_v_id2 = NULL; goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":174 */ __pyx_v_id2 = __pyx_v_body2->bid; } __pyx_L3:; /* "/home/zefiris/pyode/src/joints.pyx":176 */ Py_INCREF(((PyObject *)__pyx_v_body1)); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1 = ((PyObject *)__pyx_v_body1); /* "/home/zefiris/pyode/src/joints.pyx":177 */ Py_INCREF(((PyObject *)__pyx_v_body2)); Py_DECREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2 = ((PyObject *)__pyx_v_body2); /* "/home/zefiris/pyode/src/joints.pyx":178 */ dJointAttach(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,__pyx_v_id1,__pyx_v_id2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Joint.attach"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_body1); Py_DECREF(__pyx_v_body2); return __pyx_r; } static PyObject *__pyx_n_IndexError; static PyObject *__pyx_f_3ode_5Joint_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_getBody[] = "getBody(index) -> Body\n\n Return the bodies that this joint connects. If index is 0 the\n \"first\" body will be returned, corresponding to the body1\n argument of the attach() method. If index is 1 the \"second\" body\n will be returned, corresponding to the body2 argument of the\n attach() method.\n\n @param index: Bodx index (0 or 1).\n @type index: int\n "; static PyObject *__pyx_f_3ode_5Joint_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"index",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_index)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_index); /* "/home/zefiris/pyode/src/joints.pyx":194 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 194; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_index, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 194; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/joints.pyx":195 */ Py_INCREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1); __pyx_r = ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body1; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 196; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_index, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/joints.pyx":197 */ Py_INCREF(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2); __pyx_r = ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->body2; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":199 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 199; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Joint.getBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_index); return __pyx_r; } static PyObject *__pyx_n_MemoryError; static PyObject *__pyx_k84p; static char (__pyx_k84[]) = "can't allocate feedback buffer"; static PyObject *__pyx_f_3ode_5Joint_setFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_setFeedback[] = "setFeedback(flag=True)\n\n Create a feedback buffer. If flag is True then a buffer is\n allocated and the forces/torques applied by the joint can\n be read using the getFeedback() method. If flag is False the\n buffer is released.\n\n @param flag: Specifies whether a buffer should be created or released\n @type flag: bool\n "; static PyObject *__pyx_f_3ode_5Joint_setFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_flag = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"flag",0}; __pyx_v_flag = __pyx_k4; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_flag)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_flag); /* "/home/zefiris/pyode/src/joints.pyx":214 */ __pyx_1 = PyObject_IsTrue(__pyx_v_flag); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 214; goto __pyx_L1;} if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":216 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":217 */ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/joints.pyx":219 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = ((dJointFeedback (*))malloc((sizeof(dJointFeedback )))); /* "/home/zefiris/pyode/src/joints.pyx":220 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback == NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":221 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} Py_INCREF(__pyx_k84p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k84p); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 221; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; /* "/home/zefiris/pyode/src/joints.pyx":222 */ dJointSetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback); goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/joints.pyx":224 */ __pyx_1 = (((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":226 */ dJointSetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid,NULL); /* "/home/zefiris/pyode/src/joints.pyx":227 */ free(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback); /* "/home/zefiris/pyode/src/joints.pyx":228 */ ((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->feedback = NULL; goto __pyx_L5; } __pyx_L5:; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Joint.setFeedback"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_flag); return __pyx_r; } static PyObject *__pyx_f_3ode_5Joint_getFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_5Joint_getFeedback[] = "getFeedback() -> (force1, torque1, force2, torque2)\n\n Get the forces/torques applied by the joint. If feedback is\n activated (i.e. setFeedback(True) was called) then this method\n returns a tuple (force1, torque1, force2, torque2) with the\n forces and torques applied to body 1 and body 2. The\n forces/torques are given as 3-tuples.\n\n If feedback is deactivated then the method always returns None.\n "; static PyObject *__pyx_f_3ode_5Joint_getFeedback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dJointFeedback (*__pyx_v_fb); PyObject *__pyx_v_f1; PyObject *__pyx_v_t1; PyObject *__pyx_v_f2; PyObject *__pyx_v_t2; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_f1 = Py_None; Py_INCREF(Py_None); __pyx_v_t1 = Py_None; Py_INCREF(Py_None); __pyx_v_f2 = Py_None; Py_INCREF(Py_None); __pyx_v_t2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/joints.pyx":244 */ __pyx_v_fb = dJointGetFeedback(((struct __pyx_obj_3ode_Joint *)__pyx_v_self)->jid); /* "/home/zefiris/pyode/src/joints.pyx":245 */ __pyx_1 = (__pyx_v_fb == NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":246 */ Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":248 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->f1[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->f1[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->f1[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 248; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_f1); __pyx_v_f1 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":249 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->t1[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->t1[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->t1[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 249; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_t1); __pyx_v_t1 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":250 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->f2[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->f2[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->f2[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 250; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_f2); __pyx_v_f2 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":251 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_fb->t2[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_fb->t2[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_fb->t2[2])); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 251; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4); __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; Py_DECREF(__pyx_v_t2); __pyx_v_t2 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/joints.pyx":252 */ __pyx_2 = PyTuple_New(4); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 252; goto __pyx_L1;} Py_INCREF(__pyx_v_f1); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_f1); Py_INCREF(__pyx_v_t1); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_t1); Py_INCREF(__pyx_v_f2); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_f2); Py_INCREF(__pyx_v_t2); PyTuple_SET_ITEM(__pyx_2, 3, __pyx_v_t2); __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.Joint.getFeedback"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_f1); Py_DECREF(__pyx_v_t1); Py_DECREF(__pyx_v_f2); Py_DECREF(__pyx_v_t2); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9BallJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9BallJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k5; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 266; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":270 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":271 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":272 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":273 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":274 */ ((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateBall(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.BallJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_n__addjoint; static int __pyx_f_3ode_9BallJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9BallJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k6; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 276; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":277 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":278 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":279 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 279; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_setAnchor[] = "setAnchor(pos)\n\n Set the joint anchor point which must be specified in world\n coordinates.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_9BallJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":291 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 291; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetBallAnchor(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.BallJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This\n returns the point on body 1. If the joint is perfectly\n satisfied, this will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_9BallJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":303 */ dJointGetBallAnchor(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":304 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 304; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9BallJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This\n returns the point on body 2. If the joint is perfectly\n satisfied, this will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_9BallJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":316 */ dJointGetBallAnchor2(((struct __pyx_obj_3ode_BallJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":317 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 317; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.BallJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9BallJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":322 */ __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_9BallJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9BallJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":326 */ __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 326; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.BallJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_10HingeJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10HingeJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k7; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 338; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":342 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":343 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 343; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":344 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 344; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":345 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":346 */ ((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateHinge(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_10HingeJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10HingeJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k8; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 348; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":349 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":350 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 350; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":351 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 351; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setAnchor[] = "setAnchor(pos)\n\n Set the hinge anchor which must be given in world coordinates.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_10HingeJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":362 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 362; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHingeAnchor(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":373 */ dJointGetHingeAnchor(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":374 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 374; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":385 */ dJointGetHingeAnchor2(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":386 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 386; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setAxis[] = "setAxis(axis)\n\n Set the hinge axis.\n\n @param axis: Hinge axis\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10HingeJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":397 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHingeAxis(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAxis[] = "getAxis() -> 3-tuple of floats\n\n Get the hinge axis.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":406 */ dJointGetHingeAxis(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":407 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 407; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.HingeJoint.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAngle[] = "getAngle() -> float\n\n Get the hinge angle. The angle is measured between the two\n bodies, or between the body and the static environment. The\n angle will be between -pi..pi.\n\n When the hinge anchor or axis is set, the current position of\n the attached bodies is examined and that position will be the\n zero angle.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":422 */ __pyx_1 = PyFloat_FromDouble(dJointGetHingeAngle(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 422; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.HingeJoint.getAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getAngleRate[] = "getAngleRate() -> float\n\n Get the time derivative of the angle.\n "; static PyObject *__pyx_f_3ode_10HingeJoint_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":430 */ __pyx_1 = PyFloat_FromDouble(dJointGetHingeAngleRate(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 430; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.HingeJoint.getAngleRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_addTorque[] = "addTorque(torque)\n\n Applies the torque about the hinge axis.\n\n @param torque: Torque magnitude\n @type torque: float\n "; static PyObject *__pyx_f_3ode_10HingeJoint_addTorque(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"torque",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_torque)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque); /* "/home/zefiris/pyode/src/joints.pyx":441 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 441; goto __pyx_L1;} dJointAddHingeTorque(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.addTorque"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_setParam[] = "setParam(param, value)\n\n Set limit/motor parameters for the joint.\n\n param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax,\n ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM,\n ParamSuspensionERP, ParamSuspensionCFM.\n\n These parameter names can be optionally followed by a digit (2\n or 3) to indicate the second or third set of parameters.\n\n @param param: Selects the parameter to set\n @param value: Parameter value \n @type param: int\n @type value: float\n "; static PyObject *__pyx_f_3ode_10HingeJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":462 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 462; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 462; goto __pyx_L1;} dJointSetHingeParam(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.HingeJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_10HingeJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10HingeJoint_getParam[] = "getParam(param) -> float\n\n Get limit/motor parameters for the joint.\n\n param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax,\n ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM,\n ParamSuspensionERP, ParamSuspensionCFM.\n\n These parameter names can be optionally followed by a digit (2\n or 3) to indicate the second or third set of parameters.\n\n @param param: Selects the parameter to read\n @type param: int \n "; static PyObject *__pyx_f_3ode_10HingeJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":480 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 480; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetHingeParam(((struct __pyx_obj_3ode_HingeJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 480; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.HingeJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_11SliderJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SliderJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k9; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 492; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":496 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":497 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 497; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":498 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 498; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":499 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":500 */ ((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateSlider(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_11SliderJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SliderJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k10; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 502; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":503 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":504 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 504; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":505 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 505; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SliderJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_setAxis[] = "setAxis(axis)\n\n Set the slider axis parameter.\n\n @param axis: Slider axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11SliderJoint_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":516 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetSliderAxis(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SliderJoint.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getAxis[] = "getAxis() -> 3-tuple of floats\n\n Get the slider axis parameter.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":525 */ dJointGetSliderAxis(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":526 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 526; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SliderJoint.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getPosition[] = "getPosition() -> float\n\n Get the slider linear position (i.e. the slider\'s \"extension\").\n\n When the axis is set, the current position of the attached\n bodies is examined and that position will be the zero\n position.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":539 */ __pyx_1 = PyFloat_FromDouble(dJointGetSliderPosition(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 539; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SliderJoint.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getPositionRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_getPositionRate[] = "getPositionRate() -> float\n\n Get the time derivative of the position.\n "; static PyObject *__pyx_f_3ode_11SliderJoint_getPositionRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":547 */ __pyx_1 = PyFloat_FromDouble(dJointGetSliderPositionRate(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 547; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SliderJoint.getPositionRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11SliderJoint_addForce[] = "addForce(force)\n\n Applies the given force in the slider\'s direction.\n\n @param force: Force magnitude\n @type force: float\n "; static PyObject *__pyx_f_3ode_11SliderJoint_addForce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_force = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"force",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_force)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_force); /* "/home/zefiris/pyode/src/joints.pyx":558 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_force); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 558; goto __pyx_L1;} dJointAddSliderForce(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.addForce"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_force); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11SliderJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":562 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 562; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 562; goto __pyx_L1;} dJointSetSliderParam(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SliderJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_11SliderJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11SliderJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":566 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 566; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetSliderParam(((struct __pyx_obj_3ode_SliderJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 566; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SliderJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_14UniversalJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_14UniversalJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k11; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 578; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":582 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":583 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 583; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":584 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 584; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":585 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":586 */ ((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateUniversal(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_14UniversalJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_14UniversalJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k12; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 588; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":589 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":590 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 590; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":591 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 591; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAnchor[] = "setAnchor(pos)\n\n Set the universal anchor.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":602 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAnchor(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":614 */ dJointGetUniversalAnchor(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":615 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":627 */ dJointGetUniversalAnchor2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":628 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 628; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAxis1[] = "setAxis1(axis)\n\n Set the first universal axis. Axis 1 and axis 2 should be\n perpendicular to each other.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":640 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 640; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAxis1(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAxis1[] = "getAxis1() -> 3-tuple of floats\n\n Get the first univeral axis.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":649 */ dJointGetUniversalAxis1(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":650 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 650; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_setAxis2[] = "setAxis2(axis)\n\n Set the second universal axis. Axis 1 and axis 2 should be\n perpendicular to each other.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_14UniversalJoint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":662 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 662; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetUniversalAxis2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.setAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_getAxis2[] = "getAxis2() -> 3-tuple of floats\n\n Get the second univeral axis.\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":671 */ dJointGetUniversalAxis2(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":672 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 672; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.UniversalJoint.getAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_14UniversalJoint_addTorques[] = "addTorques(torque1, torque2)\n\n Applies torque1 about axis 1, and torque2 about axis 2.\n\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_14UniversalJoint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":685 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 685; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 685; goto __pyx_L1;} dJointAddUniversalTorques(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_14UniversalJoint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":689 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 689; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 689; goto __pyx_L1;} dJointSetUniversalParam(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.UniversalJoint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_14UniversalJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_14UniversalJoint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":693 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 693; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetUniversalParam(((struct __pyx_obj_3ode_UniversalJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 693; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.UniversalJoint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_11Hinge2Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11Hinge2Joint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k13; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 705; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":709 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":710 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 710; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":711 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 711; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":712 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":713 */ ((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid = dJointCreateHinge2(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_11Hinge2Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11Hinge2Joint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k14; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 1, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 715; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":716 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":717 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 717; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":718 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 718; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAnchor[] = "setAnchor(pos)\n\n Set the hinge-2 anchor.\n\n @param pos: Anchor position\n @type pos: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/joints.pyx":729 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_pos, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Anchor(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAnchor[] = "getAnchor() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 1. If the joint is perfectly satisfied, this\n will be the same as the point on body 2.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":741 */ dJointGetHinge2Anchor(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":742 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 742; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAnchor"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAnchor2[] = "getAnchor2() -> 3-tuple of floats\n\n Get the joint anchor point, in world coordinates. This returns\n the point on body 2. If the joint is perfectly satisfied, this\n will be the same as the point on body 1.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAnchor2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_p; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":754 */ dJointGetHinge2Anchor2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_p); /* "/home/zefiris/pyode/src/joints.pyx":755 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 755; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAnchor2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAxis1[] = "setAxis1(axis)\n\n Set the first hinge-2 axis. Axis 1 and axis 2 must not lie\n along the same line.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":768 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 768; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Axis1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAxis1[] = "getAxis1() -> 3-tuple of floats\n\n Get the first hinge-2 axis.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":777 */ dJointGetHinge2Axis1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":778 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 778; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAxis1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_setAxis2[] = "setAxis2(axis)\n\n Set the second hinge-2 axis. Axis 1 and axis 2 must not lie\n along the same line.\n\n @param axis: Joint axis\n @type axis: 3-sequence of floats \n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_setAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":790 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 790; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetHinge2Axis2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.setAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAxis2[] = "getAxis2() -> 3-tuple of floats\n\n Get the second hinge-2 axis.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAxis2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":799 */ dJointGetHinge2Axis2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":800 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 800; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Hinge2Joint.getAxis2"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle1[] = "getAngle1() -> float\n\n Get the first hinge-2 angle (around axis 1).\n\n When the anchor or axis is set, the current position of the\n attached bodies is examined and that position will be the zero\n angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":812 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 812; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle1"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle1Rate[] = "getAngle1Rate() -> float\n\n Get the time derivative of the first hinge-2 angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle1Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":820 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle1Rate(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 820; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle1Rate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle2Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_getAngle2Rate[] = "getAngle2Rate() -> float\n\n Get the time derivative of the second hinge-2 angle.\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_getAngle2Rate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":828 */ __pyx_1 = PyFloat_FromDouble(dJointGetHinge2Angle2Rate(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 828; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.Hinge2Joint.getAngle2Rate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11Hinge2Joint_addTorques[] = "addTorques(torque1, torque2)\n\n Applies torque1 about axis 1, and torque2 about axis 2.\n\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_11Hinge2Joint_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":841 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 841; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 841; goto __pyx_L1;} dJointAddHinge2Torques(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11Hinge2Joint_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":845 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 845; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 845; goto __pyx_L1;} dJointSetHinge2Param(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Hinge2Joint.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_11Hinge2Joint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11Hinge2Joint_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":849 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 849; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetHinge2Param(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 849; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.Hinge2Joint.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_10FixedJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10FixedJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k15; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 861; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":865 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":866 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 866; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":867 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 867; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":868 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":869 */ ((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateFixed(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.FixedJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_10FixedJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10FixedJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k16; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 871; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":872 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":873 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 873; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":874 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 874; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.FixedJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_10FixedJoint_setFixed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10FixedJoint_setFixed[] = "setFixed()\n\n Call this on the fixed joint after it has been attached to\n remember the current desired relative offset and desired\n relative rotation between the bodies.\n "; static PyObject *__pyx_f_3ode_10FixedJoint_setFixed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":884 */ dJointSetFixed(((struct __pyx_obj_3ode_FixedJoint *)__pyx_v_self)->__pyx_base.jid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_12ContactJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12ContactJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_Contact *__pyx_v_contact = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup","contact",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup, &__pyx_v_contact)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); Py_INCREF(__pyx_v_contact); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 896; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contact), __pyx_ptype_3ode_Contact, 1, "contact")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 896; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":899 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":900 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 900; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":901 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 901; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":902 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":903 */ ((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreateContact(__pyx_v_world->wid,__pyx_v_jgid,(&__pyx_v_contact->_contact)); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.ContactJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); Py_DECREF(__pyx_v_contact); return __pyx_r; } static int __pyx_f_3ode_12ContactJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12ContactJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_Contact *__pyx_v_contact = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup","contact",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup, &__pyx_v_contact)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); Py_INCREF(__pyx_v_contact); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 905; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contact), __pyx_ptype_3ode_Contact, 1, "contact")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 905; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":906 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_ContactJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":907 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 907; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":908 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 908; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.ContactJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); Py_DECREF(__pyx_v_contact); return __pyx_r; } static int __pyx_f_3ode_6AMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6AMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k17; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 919; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":923 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":924 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 924; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":925 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 925; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":926 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":927 */ ((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid = dJointCreateAMotor(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_6AMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6AMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k18; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 929; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":930 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":931 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 931; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":932 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 932; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.AMotor.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setMode[] = "setMode(mode)\n\n Set the angular motor mode. mode must be either AMotorUser or\n AMotorEuler.\n\n @param mode: Angular motor mode\n @type mode: int\n "; static PyObject *__pyx_f_3ode_6AMotor_setMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mode = 0; PyObject *__pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_mode); /* "/home/zefiris/pyode/src/joints.pyx":944 */ __pyx_1 = PyInt_AsLong(__pyx_v_mode); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 944; goto __pyx_L1;} dJointSetAMotorMode(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_mode); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getMode[] = "getMode()\n\n Return the angular motor mode (AMotorUser or AMotorEuler).\n "; static PyObject *__pyx_f_3ode_6AMotor_getMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":952 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorMode(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 952; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getMode"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setNumAxes[] = "setNumAxes(num)\n\n Set the number of angular axes that will be controlled by the AMotor.\n num may be in the range from 0 to 3.\n\n @param num: Number of axes (0-3)\n @type num: int\n "; static PyObject *__pyx_f_3ode_6AMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_num; PyObject *__pyx_r; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":964 */ dJointSetAMotorNumAxes(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_num); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getNumAxes[] = "getNumAxes() -> int\n\n Get the number of angular axes that are controlled by the AMotor.\n "; static PyObject *__pyx_f_3ode_6AMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":972 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorNumAxes(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 972; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getNumAxes"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setAxis[] = "setAxis(anum, rel, axis)\n\n Set an AMotor axis.\n\n The anum argument selects the axis to change (0,1 or 2).\n Each axis can have one of three \"relative orientation\" modes,\n selected by rel:\n \n 0: The axis is anchored to the global frame. \n 1: The axis is anchored to the first body. \n 2: The axis is anchored to the second body.\n\n The axis vector is always specified in global coordinates\n regardless of the setting of rel.\n\n @param anum: Axis number\n @param rel: Relative orientation mode\n @param axis: Axis\n @type anum: int\n @type rel: int\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_6AMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; int __pyx_v_rel; PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"anum","rel","axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iiO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_rel, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":998 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 998; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetAMotorAxis(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_rel,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.AMotor.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAxis[] = "getAxis(anum)\n\n Get an AMotor axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1010 */ dJointGetAMotorAxis(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":1011 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1011; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.AMotor.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAxisRel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAxisRel[] = "getAxisRel(anum) -> int\n\n Get the relative mode of an axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAxisRel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1022 */ __pyx_1 = PyInt_FromLong(dJointGetAMotorAxisRel(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1022; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAxisRel"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_setAngle[] = "setAngle(anum, angle)\n\n Tell the AMotor what the current angle is along axis anum.\n\n @param anum: Axis index\n @param angle: Angle\n @type anum: int\n @type angle: float\n "; static PyObject *__pyx_f_3ode_6AMotor_setAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_v_angle = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"anum","angle",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_angle)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_angle); /* "/home/zefiris/pyode/src/joints.pyx":1035 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_angle); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1035; goto __pyx_L1;} dJointSetAMotorAngle(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_angle); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAngle[] = "getAngle(anum) -> float\n\n Return the current angle for axis anum.\n\n @param anum: Axis index\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAngle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1046 */ __pyx_1 = PyFloat_FromDouble(dJointGetAMotorAngle(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1046; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAngle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_getAngleRate[] = "getAngleRate(anum) -> float\n\n Return the current angle rate for axis anum.\n\n @param anum: Axis index\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6AMotor_getAngleRate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1057 */ __pyx_1 = PyFloat_FromDouble(dJointGetAMotorAngleRate(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1057; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.AMotor.getAngleRate"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6AMotor_addTorques[] = "addTorques(torque0, torque1, torque2)\n\n Applies torques about the AMotor\'s axes.\n\n @param torque0: Torque 0 magnitude\n @param torque1: Torque 1 magnitude\n @param torque2: Torque 2 magnitude\n @type torque0: float\n @type torque1: float\n @type torque2: float\n "; static PyObject *__pyx_f_3ode_6AMotor_addTorques(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_torque0 = 0; PyObject *__pyx_v_torque1 = 0; PyObject *__pyx_v_torque2 = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; dReal __pyx_3; static char *__pyx_argnames[] = {"torque0","torque1","torque2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_torque0, &__pyx_v_torque1, &__pyx_v_torque2)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_torque0); Py_INCREF(__pyx_v_torque1); Py_INCREF(__pyx_v_torque2); /* "/home/zefiris/pyode/src/joints.pyx":1072 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_torque0); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_torque1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_torque2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1072; goto __pyx_L1;} dJointAddAMotorTorques(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2,__pyx_3); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.addTorques"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_torque0); Py_DECREF(__pyx_v_torque1); Py_DECREF(__pyx_v_torque2); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6AMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1076 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1076; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1076; goto __pyx_L1;} dJointSetAMotorParam(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.AMotor.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_6AMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6AMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":1080 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1080; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetAMotorParam(((struct __pyx_obj_3ode_AMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1080; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.AMotor.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_6LMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6LMotor___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k19; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1092; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1096 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":1097 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1097; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1098 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1098; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":1099 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":1100 */ ((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid = dJointCreateLMotor(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.LMotor.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_6LMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_6LMotor___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k20; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1102; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1103 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":1104 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1104; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1105 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1105; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.LMotor.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_setNumAxes[] = "setNumAxes(num)\n\n Set the number of angular axes that will be controlled by the LMotor.\n num may be in the range from 0 to 3.\n\n @param num: Number of axes (0-3)\n @type num: int\n "; static PyObject *__pyx_f_3ode_6LMotor_setNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_num; PyObject *__pyx_r; static char *__pyx_argnames[] = {"num",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_num)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1117 */ dJointSetLMotorNumAxes(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_num); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_getNumAxes[] = "getNumAxes() -> int\n\n Get the number of angular axes that are controlled by the LMotor.\n "; static PyObject *__pyx_f_3ode_6LMotor_getNumAxes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1125 */ __pyx_1 = PyInt_FromLong(dJointGetLMotorNumAxes(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid)); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1125; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.LMotor.getNumAxes"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_setAxis[] = "setAxis(anum, rel, axis)\n\n Set an LMotor axis.\n\n The anum argument selects the axis to change (0,1 or 2).\n Each axis can have one of three \"relative orientation\" modes,\n selected by rel:\n\n 0: The axis is anchored to the global frame. \n 1: The axis is anchored to the first body. \n 2: The axis is anchored to the second body.\n\n @param anum: Axis number\n @param rel: Relative orientation mode\n @param axis: Axis\n @type anum: int\n @type rel: int\n @type axis: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_6LMotor_setAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; int __pyx_v_rel; PyObject *__pyx_v_axis = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"anum","rel","axis",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iiO", __pyx_argnames, &__pyx_v_anum, &__pyx_v_rel, &__pyx_v_axis)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_axis); /* "/home/zefiris/pyode/src/joints.pyx":1148 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_axis, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1148; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dJointSetLMotorAxis(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_rel,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.LMotor.setAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_axis); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_6LMotor_getAxis[] = "getAxis(anum)\n\n Get an LMotor axis.\n\n @param anum: Axis index (0-2)\n @type anum: int \n "; static PyObject *__pyx_f_3ode_6LMotor_getAxis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_anum; dVector3 __pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"anum",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_anum)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/joints.pyx":1160 */ dJointGetLMotorAxis(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_v_anum,__pyx_v_a); /* "/home/zefiris/pyode/src/joints.pyx":1161 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_a[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_a[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_a[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1161; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.LMotor.getAxis"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6LMotor_setParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1165 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1165; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1165; goto __pyx_L1;} dJointSetLMotorParam(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.LMotor.setParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_6LMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_6LMotor_getParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"param",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_param)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); /* "/home/zefiris/pyode/src/joints.pyx":1169 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(dJointGetLMotorParam(((struct __pyx_obj_3ode_LMotor *)__pyx_v_self)->__pyx_base.jid,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.LMotor.getParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); return __pyx_r; } static int __pyx_f_3ode_12Plane2DJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12Plane2DJoint___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; struct __pyx_obj_3ode_JointGroup *__pyx_v_jg; dJointGroupID __pyx_v_jgid; int __pyx_r; int __pyx_1; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k21; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1181; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1185 */ __pyx_v_jgid = NULL; /* "/home/zefiris/pyode/src/joints.pyx":1186 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1187 */ if (!__Pyx_TypeTest(__pyx_v_jointgroup, __pyx_ptype_3ode_JointGroup)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1187; goto __pyx_L1;} Py_INCREF(__pyx_v_jointgroup); Py_DECREF(((PyObject *)__pyx_v_jg)); __pyx_v_jg = ((struct __pyx_obj_3ode_JointGroup *)__pyx_v_jointgroup); /* "/home/zefiris/pyode/src/joints.pyx":1188 */ __pyx_v_jgid = __pyx_v_jg->gid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/joints.pyx":1189 */ ((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid = dJointCreatePlane2D(__pyx_v_world->wid,__pyx_v_jgid); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_jg); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static int __pyx_f_3ode_12Plane2DJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12Plane2DJoint___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_World *__pyx_v_world = 0; PyObject *__pyx_v_jointgroup = 0; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"world","jointgroup",0}; __pyx_v_jointgroup = __pyx_k22; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_world, &__pyx_v_jointgroup)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_world); Py_INCREF(__pyx_v_jointgroup); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_world), __pyx_ptype_3ode_World, 0, "world")) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1191; goto __pyx_L1;} /* "/home/zefiris/pyode/src/joints.pyx":1192 */ Py_INCREF(((PyObject *)__pyx_v_world)); Py_DECREF(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.world); ((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.world = ((PyObject *)__pyx_v_world); /* "/home/zefiris/pyode/src/joints.pyx":1193 */ if (PyObject_Cmp(__pyx_v_jointgroup, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1193; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/joints.pyx":1194 */ __pyx_2 = PyObject_GetAttr(__pyx_v_jointgroup, __pyx_n__addjoint); if (!__pyx_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1194; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; goto __pyx_L2; } __pyx_L2:; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.Plane2DJoint.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_world); Py_DECREF(__pyx_v_jointgroup); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setXParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setXParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1197 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1197; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1197; goto __pyx_L1;} dJointSetPlane2DXParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setXParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setYParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setYParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1200 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1200; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1200; goto __pyx_L1;} dJointSetPlane2DYParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setYParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_f_3ode_12Plane2DJoint_setAngleParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12Plane2DJoint_setAngleParam(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_param = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r; int __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"param","value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_param, &__pyx_v_value)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_param); Py_INCREF(__pyx_v_value); /* "/home/zefiris/pyode/src/joints.pyx":1203 */ __pyx_1 = PyInt_AsLong(__pyx_v_param); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; goto __pyx_L1;} dJointSetPlane2DAngleParam(((struct __pyx_obj_3ode_Plane2DJoint *)__pyx_v_self)->__pyx_base.jid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.Plane2DJoint.setAngleParam"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_param); Py_DECREF(__pyx_v_value); return __pyx_r; } static int __pyx_f_3ode_10GeomObject___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomObject___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":56 */ ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid = NULL; /* "/home/zefiris/pyode/src/geomobject.pyx":57 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space = Py_None; /* "/home/zefiris/pyode/src/geomobject.pyx":58 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body = Py_None; /* "/home/zefiris/pyode/src/geomobject.pyx":59 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 59; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.__new__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_k85p; static char (__pyx_k85[]) = "The GeomObject base class can't be used directly."; static int __pyx_f_3ode_10GeomObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomObject___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":62 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k85p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF(__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static void __pyx_f_3ode_10GeomObject___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_10GeomObject___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":65 */ __pyx_1 = (((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/geomobject.pyx":66 */ dGeomDestroy(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); /* "/home/zefiris/pyode/src/geomobject.pyx":67 */ ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid = NULL; goto __pyx_L2; } __pyx_L2:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k86p; static char (__pyx_k86[]) = "geom has no attribute '%s'."; static PyObject *__pyx_f_3ode_10GeomObject___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static PyObject *__pyx_f_3ode_10GeomObject___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); /* "/home/zefiris/pyode/src/geomobject.pyx":70 */ __pyx_1 = PySequence_Contains(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; goto __pyx_L1;} if (__pyx_1) { /* "/home/zefiris/pyode/src/geomobject.pyx":71 */ __pyx_2 = PyObject_GetItem(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 71; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/geomobject.pyx":73 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k86p, __pyx_v_name); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 73; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.__getattr__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); return __pyx_r; } static int __pyx_f_3ode_10GeomObject___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_val); /*proto*/ static int __pyx_f_3ode_10GeomObject___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_val) { int __pyx_r; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); Py_INCREF(__pyx_v_val); /* "/home/zefiris/pyode/src/geomobject.pyx":76 */ if (PyObject_SetItem(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->attribs, __pyx_v_name, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 76; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomObject.__setattr__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_name); Py_DECREF(__pyx_v_val); return __pyx_r; } static PyObject *__pyx_k87p; static char (__pyx_k87[]) = "Bug: The _id() method is not implemented."; static PyObject *__pyx_f_3ode_10GeomObject__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject__id[] = "_id() -> int\n\n Return the internal id of the geom (dGeomID) as returned by\n the dCreateXyz() functions.\n\n This method has to be overwritten in derived methods. \n "; static PyObject *__pyx_f_3ode_10GeomObject__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":86 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k87p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; goto __pyx_L1;} __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_placeable[] = "placeable() -> bool\n\n Returns True if the geom object is a placeable geom.\n\n This method has to be overwritten in derived methods.\n "; static PyObject *__pyx_f_3ode_10GeomObject_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":95 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_placeable; static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k88p; static char (__pyx_k88[]) = "Non-placeable geoms cannot have a body associated to them."; static PyObject *__pyx_f_3ode_10GeomObject_setBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setBody[] = "setBody(body)\n\n Set the body associated with a placeable geom.\n\n @param body: The Body object or None.\n @type body: Body\n "; static PyObject *__pyx_f_3ode_10GeomObject_setBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; static char *__pyx_argnames[] = {"body",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_body)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_body); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body), __pyx_ptype_3ode_Body, 1, "body")) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 97; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geomobject.pyx":106 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":107 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 107; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k88p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 107; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":109 */ if (PyObject_Cmp(((PyObject *)__pyx_v_body), Py_None, &__pyx_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; goto __pyx_L1;} __pyx_3 = __pyx_3 == 0; if (__pyx_3) { /* "/home/zefiris/pyode/src/geomobject.pyx":110 */ dGeomSetBody(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,NULL); goto __pyx_L3; } /*else*/ { /* "/home/zefiris/pyode/src/geomobject.pyx":112 */ dGeomSetBody(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_body->bid); } __pyx_L3:; /* "/home/zefiris/pyode/src/geomobject.pyx":113 */ Py_INCREF(((PyObject *)__pyx_v_body)); Py_DECREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body = ((PyObject *)__pyx_v_body); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_body); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getBody[] = "getBody() -> Body\n\n Get the body associated with this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getBody(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":120 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":121 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":123 */ Py_INCREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body); __pyx_r = ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->body; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.getBody"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k89p; static char (__pyx_k89[]) = "Cannot set a position on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setPosition[] = "setPosition(pos)\n\n Set the position of the geom. If the geom is attached to a body,\n the body\'s position will also be changed.\n\n @param pos: Position\n @type pos: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pos = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; static char *__pyx_argnames[] = {"pos",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pos)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pos); /* "/home/zefiris/pyode/src/geomobject.pyx":134 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":135 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 135; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k89p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 135; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":136 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_pos, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; dGeomSetPosition(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_5,__pyx_6,__pyx_7); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_pos); return __pyx_r; } static PyObject *__pyx_k90p; static char (__pyx_k90[]) = "Non-placeable geoms do not have a position."; static PyObject *__pyx_f_3ode_10GeomObject_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getPosition[] = "getPosition() -> 3-tuple\n\n Get the current position of the geom. If the geom is attached to\n a body the returned value is the body\'s position.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_p); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":144 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":145 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k90p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 145; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":148 */ __pyx_v_p = ((dReal (*))dGeomGetPosition(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); /* "/home/zefiris/pyode/src/geomobject.pyx":149 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_p[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_p[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_p[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_1); PyTuple_SET_ITEM(__pyx_6, 2, __pyx_5); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_r = __pyx_6; __pyx_6 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("ode.GeomObject.getPosition"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k91p; static char (__pyx_k91[]) = "Cannot set a rotation on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setRotation[] = "setRotation(R)\n\n Set the orientation of the geom. If the geom is attached to a body,\n the body\'s orientation will also be changed.\n\n @param R: Rotation matrix\n @type R: 9-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_R = 0; dMatrix3 __pyx_v_m; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"R",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_R)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_R); /* "/home/zefiris/pyode/src/geomobject.pyx":160 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":161 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 161; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k91p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 161; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":164 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[0]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":165 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[1]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":166 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 166; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[2]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":167 */ (__pyx_v_m[3]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":168 */ __pyx_2 = PyInt_FromLong(3); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[4]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":169 */ __pyx_2 = PyInt_FromLong(4); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[5]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":170 */ __pyx_2 = PyInt_FromLong(5); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[6]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":171 */ (__pyx_v_m[7]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":172 */ __pyx_2 = PyInt_FromLong(6); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[8]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":173 */ __pyx_2 = PyInt_FromLong(7); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[9]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":174 */ __pyx_2 = PyInt_FromLong(8); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_R, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_m[10]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":175 */ (__pyx_v_m[11]) = 0; /* "/home/zefiris/pyode/src/geomobject.pyx":176 */ dGeomSetRotation(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_m); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_R); return __pyx_r; } static PyObject *__pyx_k92p; static char (__pyx_k92[]) = "Non-placeable geoms do not have a rotation."; static PyObject *__pyx_f_3ode_10GeomObject_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getRotation[] = "getRotation() -> 9-tuple\n\n Get the current orientation of the geom. If the geom is attached to\n a body the returned value is the body\'s orientation.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getRotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (*__pyx_v_m); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; PyObject *__pyx_11 = 0; PyObject *__pyx_12 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":184 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":185 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k92p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":188 */ __pyx_v_m = ((dReal (*))dGeomGetRotation(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); /* "/home/zefiris/pyode/src/geomobject.pyx":189 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_m[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_m[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_m[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_m[4])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble((__pyx_v_m[5])); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_8 = PyFloat_FromDouble((__pyx_v_m[6])); if (!__pyx_8) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_9 = PyFloat_FromDouble((__pyx_v_m[8])); if (!__pyx_9) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_10 = PyFloat_FromDouble((__pyx_v_m[9])); if (!__pyx_10) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_11 = PyFloat_FromDouble((__pyx_v_m[10])); if (!__pyx_11) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} __pyx_12 = PyList_New(9); if (!__pyx_12) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 189; goto __pyx_L1;} PyList_SET_ITEM(__pyx_12, 0, __pyx_2); PyList_SET_ITEM(__pyx_12, 1, __pyx_1); PyList_SET_ITEM(__pyx_12, 2, __pyx_5); PyList_SET_ITEM(__pyx_12, 3, __pyx_6); PyList_SET_ITEM(__pyx_12, 4, __pyx_7); PyList_SET_ITEM(__pyx_12, 5, __pyx_8); PyList_SET_ITEM(__pyx_12, 6, __pyx_9); PyList_SET_ITEM(__pyx_12, 7, __pyx_10); PyList_SET_ITEM(__pyx_12, 8, __pyx_11); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_8 = 0; __pyx_9 = 0; __pyx_10 = 0; __pyx_11 = 0; __pyx_r = __pyx_12; __pyx_12 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); Py_XDECREF(__pyx_11); Py_XDECREF(__pyx_12); __Pyx_AddTraceback("ode.GeomObject.getRotation"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k93p; static char (__pyx_k93[]) = "Non-placeable geoms do not have an orientation."; static PyObject *__pyx_f_3ode_10GeomObject_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getQuaternion[] = "getQuaternion() -> (w,x,y,z)\n\n Get the current orientation of the geom. If the geom is attached to\n a body the returned value is the body\'s orientation.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dQuaternion __pyx_v_q; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":197 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":198 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k93p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":201 */ dGeomGetQuaternion(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_q); /* "/home/zefiris/pyode/src/geomobject.pyx":202 */ __pyx_2 = PyFloat_FromDouble((__pyx_v_q[0])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_1 = PyFloat_FromDouble((__pyx_v_q[1])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_q[2])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_q[3])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_7 = PyTuple_New(4); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 202; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_5); PyTuple_SET_ITEM(__pyx_7, 3, __pyx_6); __pyx_2 = 0; __pyx_1 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.GeomObject.getQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k94p; static char (__pyx_k94[]) = "Cannot set a quaternion on non-placeable geoms."; static PyObject *__pyx_f_3ode_10GeomObject_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setQuaternion[] = "setQuaternion(q)\n\n Set the orientation of the geom. If the geom is attached to a body,\n the body\'s orientation will also be changed.\n\n @param q: Quaternion (w,x,y,z)\n @type q: 4-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomObject_setQuaternion(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_q = 0; dQuaternion __pyx_v_cq; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"q",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_q)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_q); /* "/home/zefiris/pyode/src/geomobject.pyx":213 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 213; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geomobject.pyx":214 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 214; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k94p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[5]; __pyx_lineno = 214; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geomobject.pyx":217 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[0]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":218 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[1]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":219 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[2]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":220 */ __pyx_2 = PyInt_FromLong(3); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} __pyx_1 = PyObject_GetItem(__pyx_v_q, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; (__pyx_v_cq[3]) = __pyx_5; /* "/home/zefiris/pyode/src/geomobject.pyx":221 */ dGeomSetQuaternion(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_cq); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomObject.setQuaternion"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_q); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getAABB(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getAABB[] = "getAABB() -> 6-tuple\n\n Return an axis aligned bounding box that surrounds the geom.\n The return value is a 6-tuple (minx, maxx, miny, maxy, minz, maxz).\n "; static PyObject *__pyx_f_3ode_10GeomObject_getAABB(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal (__pyx_v_aabb[6]); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":231 */ dGeomGetAABB(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_v_aabb); /* "/home/zefiris/pyode/src/geomobject.pyx":232 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_aabb[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_aabb[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_aabb[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_aabb[3])); if (!__pyx_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_5 = PyFloat_FromDouble((__pyx_v_aabb[4])); if (!__pyx_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble((__pyx_v_aabb[5])); if (!__pyx_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} __pyx_7 = PyTuple_New(6); if (!__pyx_7) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 232; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_7, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_7, 2, __pyx_3); PyTuple_SET_ITEM(__pyx_7, 3, __pyx_4); PyTuple_SET_ITEM(__pyx_7, 4, __pyx_5); PyTuple_SET_ITEM(__pyx_7, 5, __pyx_6); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_r = __pyx_7; __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); __Pyx_AddTraceback("ode.GeomObject.getAABB"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_isSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_isSpace[] = "isSpace() -> bool\n\n Return 1 if the given geom is a space, or 0 if not."; static PyObject *__pyx_f_3ode_10GeomObject_isSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":238 */ __pyx_1 = PyInt_FromLong(dGeomIsSpace(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.isSpace"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getSpace[] = "getSpace() -> Space\n\n Return the space that the given geometry is contained in,\n or return None if it is not contained in any space."; static PyObject *__pyx_f_3ode_10GeomObject_getSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":245 */ Py_INCREF(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space); __pyx_r = ((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->space; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_long; static PyObject *__pyx_f_3ode_10GeomObject_setCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setCollideBits[] = "setCollideBits(bits)\n\n Set the \"collide\" bitfields for this geom.\n\n @param bits: Collide bit field\n @type bits: int/long\n "; static PyObject *__pyx_f_3ode_10GeomObject_setCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bits = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; unsigned long __pyx_4; static char *__pyx_argnames[] = {"bits",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bits)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bits); /* "/home/zefiris/pyode/src/geomobject.pyx":255 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_INCREF(__pyx_v_bits); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bits); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 255; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dGeomSetCollideBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.setCollideBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bits); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_setCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_setCategoryBits[] = "setCategoryBits(bits)\n\n Set the \"category\" bitfields for this geom.\n\n @param bits: Category bit field\n @type bits: int/long\n "; static PyObject *__pyx_f_3ode_10GeomObject_setCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_bits = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; unsigned long __pyx_4; static char *__pyx_argnames[] = {"bits",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_bits)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_bits); /* "/home/zefiris/pyode/src/geomobject.pyx":265 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_INCREF(__pyx_v_bits); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bits); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 265; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; dGeomSetCategoryBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid,__pyx_4); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomObject.setCategoryBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_bits); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getCollideBits[] = "getCollideBits() -> long\n\n Return the \"collide\" bitfields for this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getCollideBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":272 */ __pyx_1 = PyLong_FromUnsignedLong(dGeomGetCollideBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 272; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.getCollideBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_getCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_getCategoryBits[] = "getCategoryBits() -> long\n\n Return the \"category\" bitfields for this geom.\n "; static PyObject *__pyx_f_3ode_10GeomObject_getCategoryBits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":279 */ __pyx_1 = PyLong_FromUnsignedLong(dGeomGetCategoryBits(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.getCategoryBits"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_enable[] = "enable()\n\n Enable the geom."; static PyObject *__pyx_f_3ode_10GeomObject_enable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":285 */ dGeomEnable(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_disable[] = "disable()\n\n Disable the geom."; static PyObject *__pyx_f_3ode_10GeomObject_disable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":291 */ dGeomDisable(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomObject_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomObject_isEnabled[] = "isEnabled() -> bool\n\n Return True if the geom is enabled."; static PyObject *__pyx_f_3ode_10GeomObject_isEnabled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/geomobject.pyx":297 */ __pyx_1 = PyInt_FromLong(dGeomIsEnabled(((struct __pyx_obj_3ode_GeomObject *)__pyx_v_self)->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 297; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomObject.isEnabled"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_space; static PyObject *__pyx_n_idx; static PyObject *__pyx_f_3ode_14_SpaceIterator___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator___init__ = {"__init__", (PyCFunction)__pyx_f_3ode_14_SpaceIterator___init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_space = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"self","space",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_space)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":28 */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_space, __pyx_v_space) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":29 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_v_self, __pyx_n_idx, __pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode._SpaceIterator.__init__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_14_SpaceIterator___iter__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator___iter__ = {"__iter__", (PyCFunction)__pyx_f_3ode_14_SpaceIterator___iter__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator___iter__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":32 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_getNumGeoms; static PyObject *__pyx_n_StopIteration; static PyObject *__pyx_n_getGeom; static PyObject *__pyx_f_3ode_14_SpaceIterator_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_3ode_14_SpaceIterator_next = {"next", (PyCFunction)__pyx_f_3ode_14_SpaceIterator_next, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_f_3ode_14_SpaceIterator_next(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; int __pyx_4; static char *__pyx_argnames[] = {"self",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_res = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":35 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_space); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_getNumGeoms); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; goto __pyx_L1;} __pyx_4 = __pyx_4 >= 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_4) { /* "/home/zefiris/pyode/src/space.pyx":36 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; goto __pyx_L1;} __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; goto __pyx_L1;} goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/space.pyx":38 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_space); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_getGeom); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_res); __pyx_v_res = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":39 */ __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_idx); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_3 = PyNumber_Add(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyObject_SetAttr(__pyx_v_self, __pyx_n_idx, __pyx_3) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":40 */ Py_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode._SpaceIterator.next"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_res); Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9SpaceBase___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9SpaceBase___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":70 */ __pyx_r = 0; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF((PyObject *)__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static PyObject *__pyx_k95p; static char (__pyx_k95[]) = "The SpaceBase class can't be used directly."; static int __pyx_f_3ode_9SpaceBase___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9SpaceBase___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_a = 0; PyObject *__pyx_v_kw = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_a, &__pyx_v_kw) < 0) return -1; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) { Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); return -1; } Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":73 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k95p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; goto __pyx_L1;} __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.__init__"); __pyx_r = -1; __pyx_L0:; Py_XDECREF(__pyx_v_a); Py_XDECREF(__pyx_v_kw); Py_DECREF((PyObject *)__pyx_v_self); Py_XDECREF(__pyx_args); Py_XDECREF(__pyx_kwds); return __pyx_r; } static void __pyx_f_3ode_9SpaceBase___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_9SpaceBase___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":76 */ __pyx_1 = (((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->__pyx_base.gid != NULL); if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":77 */ dSpaceDestroy(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid); /* "/home/zefiris/pyode/src/space.pyx":78 */ ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid = NULL; /* "/home/zefiris/pyode/src/space.pyx":79 */ ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->__pyx_base.gid = NULL; goto __pyx_L2; } __pyx_L2:; Py_DECREF((PyObject *)__pyx_v_self); } static PyObject *__pyx_f_3ode_9SpaceBase__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9SpaceBase__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":102 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid); /* "/home/zefiris/pyode/src/space.pyx":103 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 103; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_9SpaceBase___len__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_f_3ode_9SpaceBase___len__(PyObject *__pyx_v_self) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":106 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getNumGeoms); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.SpaceBase.__len__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase___iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_3ode_9SpaceBase___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":109 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__SpaceIterator); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.SpaceBase.__iter__"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_add[] = "add(geom)\n\n Add a geom to a space. This does nothing if the geom is\n already in the space.\n\n @param geom: Geom object to add\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":121 */ dSpaceAdd(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SpaceBase.add"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_remove[] = "remove(geom)\n\n Remove a geom from a space.\n\n @param geom: Geom object to remove\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 123; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":131 */ dSpaceRemove(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.SpaceBase.remove"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_query[] = "query(geom) -> bool\n\n Return True if the given geom is in the space.\n\n @param geom: Geom object to check\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_9SpaceBase_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 1, "geom")) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 133; goto __pyx_L1;} /* "/home/zefiris/pyode/src/space.pyx":141 */ __pyx_1 = PyInt_FromLong(dSpaceQuery(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_geom->gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.query"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_getNumGeoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_getNumGeoms[] = "getNumGeoms() -> int\n\n Return the number of geoms contained within the space.\n "; static PyObject *__pyx_f_3ode_9SpaceBase_getNumGeoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":148 */ __pyx_1 = PyInt_FromLong(dSpaceGetNumGeoms(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid)); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 148; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.getNumGeoms"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_RuntimeError; static PyObject *__pyx_k96p; static PyObject *__pyx_k97p; static char (__pyx_k96[]) = "geom index out of range"; static char (__pyx_k97[]) = "geom id cannot be translated to a Python object"; static PyObject *__pyx_f_3ode_9SpaceBase_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_getGeom[] = "getGeom(idx) -> GeomObject\n\n Return the geom with the given index contained within the space.\n\n @param idx: Geom index (0,1,...,getNumGeoms()-1)\n @type idx: int\n "; static PyObject *__pyx_f_3ode_9SpaceBase_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_idx; dGeomID __pyx_v_gid; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"idx",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_idx)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":161 */ __pyx_1 = (__pyx_v_idx < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_idx >= dSpaceGetNumGeoms(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid)); } if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":162 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k96p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":164 */ __pyx_v_gid = dSpaceGetGeom(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_idx); /* "/home/zefiris/pyode/src/space.pyx":165 */ __pyx_2 = PyInt_FromLong(((long )__pyx_v_gid)); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = PySequence_Contains(__pyx_3, __pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; goto __pyx_L1;} __pyx_1 = !__pyx_1; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":166 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 166; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k97p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 166; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/space.pyx":168 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(((long )__pyx_v_gid)); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} __pyx_4 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.SpaceBase.getGeom"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9SpaceBase_collide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9SpaceBase_collide[] = "collide(arg, callback)\n\n Call a callback function one or more times, for all\n potentially intersecting objects in the space. The callback\n function takes 3 arguments:\n\n def NearCallback(arg, geom1, geom2):\n\n The arg parameter is just passed on to the callback function.\n Its meaning is user defined. The geom1 and geom2 arguments are\n the geometry objects that may be near each other. The callback\n function can call the function collide() (not the Space\n method) on geom1 and geom2, perhaps first determining\n whether to collide them at all based on other information.\n\n @param arg: A user argument that is passed to the callback function\n @param callback: Callback function\n @type callback: callable\n "; static PyObject *__pyx_f_3ode_9SpaceBase_collide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_v_callback = 0; void (*__pyx_v_data); PyObject *__pyx_v_tup; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"arg","callback",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_arg, &__pyx_v_callback)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_arg); Py_INCREF(__pyx_v_callback); __pyx_v_tup = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":193 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 193; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_arg); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":194 */ __pyx_v_data = ((void (*))__pyx_v_tup); /* "/home/zefiris/pyode/src/space.pyx":195 */ dSpaceCollide(((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_self)->sid,__pyx_v_data,__pyx_f_3ode_collide_callback); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.SpaceBase.collide"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_callback); return __pyx_r; } static void __pyx_f_3ode_collide_callback(void (*__pyx_v_data),dGeomID __pyx_v_o1,dGeomID __pyx_v_o2) { PyObject *__pyx_v_tup; long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_v_callback; PyObject *__pyx_v_arg; PyObject *__pyx_v_g1; PyObject *__pyx_v_g2; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; __pyx_v_tup = Py_None; Py_INCREF(Py_None); __pyx_v_callback = Py_None; Py_INCREF(Py_None); __pyx_v_arg = Py_None; Py_INCREF(Py_None); __pyx_v_g1 = Py_None; Py_INCREF(Py_None); __pyx_v_g2 = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":211 */ __pyx_1 = (PyObject *)__pyx_v_data; Py_INCREF(__pyx_1); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":212 */ __pyx_1 = PyObject_GetIter(__pyx_v_tup); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_v_callback); __pyx_v_callback = __pyx_2; __pyx_2 = 0; __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_v_arg); __pyx_v_arg = __pyx_2; __pyx_2 = 0; if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 212; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/space.pyx":213 */ __pyx_v_id1 = ((long )__pyx_v_o1); /* "/home/zefiris/pyode/src/space.pyx":214 */ __pyx_v_id2 = ((long )__pyx_v_o2); /* "/home/zefiris/pyode/src/space.pyx":215 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(__pyx_v_id1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_g1); __pyx_v_g1 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":216 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} __pyx_1 = PyInt_FromLong(__pyx_v_id2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_g2); __pyx_v_g2 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":217 */ __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; goto __pyx_L1;} Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_arg); Py_INCREF(__pyx_v_g1); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_g1); Py_INCREF(__pyx_v_g2); PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_g2); __pyx_1 = PyObject_CallObject(__pyx_v_callback, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_WriteUnraisable("ode.collide_callback"); __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF(__pyx_v_callback); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_g1); Py_DECREF(__pyx_v_g2); } static int __pyx_f_3ode_11SimpleSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SimpleSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k25; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":237 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":238 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":239 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 239; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":240 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":242 */ ((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid = dSimpleSpaceCreate(__pyx_v_parentid); /* "/home/zefiris/pyode/src/space.pyx":245 */ ((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":247 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":248 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_SimpleSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 248; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.SimpleSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_11SimpleSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11SimpleSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k26; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":251 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_9HashSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9HashSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k27; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":270 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":271 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":272 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 272; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":273 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":275 */ ((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid = dHashSpaceCreate(__pyx_v_parentid); /* "/home/zefiris/pyode/src/space.pyx":278 */ ((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":280 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":281 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.HashSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_9HashSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9HashSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k28; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":284 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_k98p; static char (__pyx_k98[]) = "minlevel (%d) must be less than or equal to maxlevel (%d)"; static PyObject *__pyx_f_3ode_9HashSpace_setLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9HashSpace_setLevels[] = "setLevels(minlevel, maxlevel)\n\n Sets the size of the smallest and largest cell used in the\n hash table. The actual size will be 2^minlevel and 2^maxlevel\n respectively.\n "; static PyObject *__pyx_f_3ode_9HashSpace_setLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_minlevel; int __pyx_v_maxlevel; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"minlevel","maxlevel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii", __pyx_argnames, &__pyx_v_minlevel, &__pyx_v_maxlevel)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":294 */ __pyx_1 = (__pyx_v_minlevel > __pyx_v_maxlevel); if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":295 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_minlevel); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(__pyx_v_maxlevel); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_3 = 0; __pyx_4 = 0; __pyx_3 = PyNumber_Remainder(__pyx_k98p, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __Pyx_Raise(__pyx_2, __pyx_3, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 295; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":297 */ dHashSpaceSetLevels(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,__pyx_v_minlevel,__pyx_v_maxlevel); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.HashSpace.setLevels"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9HashSpace_getLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9HashSpace_getLevels[] = "getLevels() -> (minlevel, maxlevel)\n\n Gets the size of the smallest and largest cell used in the\n hash table. The actual size is 2^minlevel and 2^maxlevel\n respectively.\n "; static PyObject *__pyx_f_3ode_9HashSpace_getLevels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_minlevel; int __pyx_v_maxlevel; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/space.pyx":309 */ dHashSpaceGetLevels(((struct __pyx_obj_3ode_HashSpace *)__pyx_v_self)->__pyx_base.sid,(&__pyx_v_minlevel),(&__pyx_v_maxlevel)); /* "/home/zefiris/pyode/src/space.pyx":310 */ __pyx_1 = PyInt_FromLong(__pyx_v_minlevel); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_2 = PyInt_FromLong(__pyx_v_maxlevel); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 310; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.HashSpace.getLevels"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_13QuadTreeSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13QuadTreeSpace___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_center = 0; PyObject *__pyx_v_extents = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_parentid; dVector3 __pyx_v_c; dVector3 __pyx_v_e; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; static char *__pyx_argnames[] = {"center","extents","depth","space",0}; __pyx_v_space = __pyx_k29; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_center, &__pyx_v_extents, &__pyx_v_depth, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_center); Py_INCREF(__pyx_v_extents); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/space.pyx":331 */ __pyx_v_parentid = NULL; /* "/home/zefiris/pyode/src/space.pyx":332 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 332; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/space.pyx":333 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 333; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":334 */ __pyx_v_parentid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/space.pyx":336 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[0]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":337 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[1]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":338 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_center, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_c[2]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":339 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 339; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[0]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":340 */ __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[1]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":341 */ __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_extents, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; (__pyx_v_e[2]) = __pyx_4; /* "/home/zefiris/pyode/src/space.pyx":342 */ __pyx_1 = PyInt_AsLong(__pyx_v_depth); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 342; goto __pyx_L1;} ((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid = dQuadTreeSpaceCreate(__pyx_v_parentid,__pyx_v_c,__pyx_v_e,__pyx_1); /* "/home/zefiris/pyode/src/space.pyx":345 */ ((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.__pyx_base.gid = ((struct dxGeom (*))((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid); /* "/home/zefiris/pyode/src/space.pyx":347 */ dSpaceSetCleanup(((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid,0); /* "/home/zefiris/pyode/src/space.pyx":348 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_QuadTreeSpace *)__pyx_v_self)->__pyx_base.sid)); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.QuadTreeSpace.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_center); Py_DECREF(__pyx_v_extents); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_13QuadTreeSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13QuadTreeSpace___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_center = 0; PyObject *__pyx_v_extents = 0; PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"center","extents","depth","space",0}; __pyx_v_space = __pyx_k30; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_center, &__pyx_v_extents, &__pyx_v_depth, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_center); Py_INCREF(__pyx_v_extents); Py_INCREF(__pyx_v_depth); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/space.pyx":351 */ __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_center); Py_DECREF(__pyx_v_extents); Py_DECREF(__pyx_v_depth); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_k99p; static char (__pyx_k99[]) = "Unknown space type (%d)"; static PyObject *__pyx_f_3ode_Space(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_Space[] = "Space factory function.\n\n Depending on the type argument this function either returns a\n SimpleSpace (type=0) or a HashSpace (type=1).\n\n This function is provided to remain compatible with previous\n versions of PyODE where there was only one Space class.\n \n >>> space = Space(type=0) # Create a SimpleSpace\n >>> space = Space(type=1) # Create a HashSpace\n "; static PyObject *__pyx_f_3ode_Space(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_type = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"type",0}; __pyx_v_type = __pyx_k31; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_type)) return 0; Py_INCREF(__pyx_v_type); /* "/home/zefiris/pyode/src/space.pyx":366 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 366; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 366; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/space.pyx":367 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_SimpleSpace), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 367; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/space.pyx":369 */ __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_HashSpace), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 369; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } /*else*/ { /* "/home/zefiris/pyode/src/space.pyx":371 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k99p, __pyx_v_type); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_3, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[6]; __pyx_lineno = 371; goto __pyx_L1;} } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.Space"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_type); return __pyx_r; } static int __pyx_f_3ode_10GeomSphere___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomSphere___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"space","radius",0}; __pyx_v_space = __pyx_k32; __pyx_v_radius = __pyx_k33; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":37 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":38 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 38; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":39 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 39; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":40 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":41 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 41; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid = dCreateSphere(__pyx_v_sid,__pyx_2); /* "/home/zefiris/pyode/src/geoms.pyx":45 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} if (PyObject_SetItem(__pyx_3, __pyx_4, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 45; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomSphere.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); return __pyx_r; } static int __pyx_f_3ode_10GeomSphere___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_10GeomSphere___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius",0}; __pyx_v_space = __pyx_k34; __pyx_v_radius = __pyx_k35; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/geoms.pyx":49 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":50 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_n_True; static PyObject *__pyx_f_3ode_10GeomSphere_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_10GeomSphere_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":53 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_10GeomSphere__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":57 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":58 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_setRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_setRadius[] = "setRadius(radius)\n\n Set the radius of the sphere.\n\n @param radius: New radius\n @type radius: float\n "; static PyObject *__pyx_f_3ode_10GeomSphere_setRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"radius",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_radius)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); /* "/home/zefiris/pyode/src/geoms.pyx":68 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; goto __pyx_L1;} dGeomSphereSetRadius(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomSphere.setRadius"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_getRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_getRadius[] = "getRadius() -> float\n\n Return the radius of the sphere.\n "; static PyObject *__pyx_f_3ode_10GeomSphere_getRadius(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":75 */ __pyx_1 = PyFloat_FromDouble(dGeomSphereGetRadius(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomSphere.getRadius"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_10GeomSphere_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_10GeomSphere_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the sphere. Points inside\n the geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_10GeomSphere_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":88 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomSpherePointDepth(((struct __pyx_obj_3ode_GeomSphere *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomSphere.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_7GeomBox___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomBox___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_lengths = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; static char *__pyx_argnames[] = {"space","lengths",0}; __pyx_v_space = __pyx_k36; __pyx_v_lengths = __pyx_k37; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_lengths)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_lengths); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":106 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":107 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 107; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":108 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 108; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":109 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":110 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_lengths, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid = dCreateBox(__pyx_v_sid,__pyx_4,__pyx_5,__pyx_6); /* "/home/zefiris/pyode/src/geoms.pyx":114 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomBox.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static int __pyx_f_3ode_7GeomBox___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomBox___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_lengths = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","lengths",0}; __pyx_v_space = __pyx_k38; __pyx_v_lengths = __pyx_k39; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_lengths)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_lengths); /* "/home/zefiris/pyode/src/geoms.pyx":117 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":118 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":121 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 121; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomBox.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":125 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":126 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 126; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomBox._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_setLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_setLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lengths = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"lengths",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_lengths)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_lengths); /* "/home/zefiris/pyode/src/geoms.pyx":129 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_lengths, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dGeomBoxSetLengths(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomBox.setLengths"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_lengths); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_getLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomBox_getLengths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":133 */ dGeomBoxGetLengths(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_v_res); /* "/home/zefiris/pyode/src/geoms.pyx":134 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 134; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_r = __pyx_4; __pyx_4 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomBox.getLengths"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomBox_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_7GeomBox_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the box. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_7GeomBox_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":147 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomBoxPointDepth(((struct __pyx_obj_3ode_GeomBox *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 147; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomBox.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_9GeomPlane___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9GeomPlane___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; static char *__pyx_argnames[] = {"space","normal","dist",0}; __pyx_v_space = __pyx_k40; __pyx_v_normal = __pyx_k41; __pyx_v_dist = __pyx_k42; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_normal, &__pyx_v_dist)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":170 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":171 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 171; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":172 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":173 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":174 */ __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} __pyx_3 = PyObject_GetItem(__pyx_v_normal, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_v_dist); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid = dCreatePlane(__pyx_v_sid,__pyx_4,__pyx_5,__pyx_6,__pyx_7); /* "/home/zefiris/pyode/src/geoms.pyx":178 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 178; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomPlane.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static int __pyx_f_3ode_9GeomPlane___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_9GeomPlane___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","normal","dist",0}; __pyx_v_space = __pyx_k43; __pyx_v_normal = __pyx_k44; __pyx_v_dist = __pyx_k45; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_normal, &__pyx_v_dist)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); /* "/home/zefiris/pyode/src/geoms.pyx":182 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":187 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":188 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 188; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomPlane._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_normal = 0; PyObject *__pyx_v_dist = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; static char *__pyx_argnames[] = {"normal","dist",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_normal, &__pyx_v_dist)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_normal); Py_INCREF(__pyx_v_dist); /* "/home/zefiris/pyode/src/geoms.pyx":191 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_normal, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_v_dist); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; goto __pyx_L1;} dGeomPlaneSetParams(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5,__pyx_6); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomPlane.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_normal); Py_DECREF(__pyx_v_dist); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_9GeomPlane_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector4 __pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":195 */ dGeomPlaneGetParams(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_v_res); /* "/home/zefiris/pyode/src/geoms.pyx":196 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_res[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_res[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_res[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_res[3])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 196; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1); __pyx_4 = 0; __pyx_1 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomPlane.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_9GeomPlane_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_9GeomPlane_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the plane. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_9GeomPlane_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":209 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomPlanePointDepth(((struct __pyx_obj_3ode_GeomPlane *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 209; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomPlane.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_11GeomCapsule___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomCapsule___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; dReal __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k46; __pyx_v_radius = __pyx_k47; __pyx_v_length = __pyx_k48; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":230 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":231 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 231; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":232 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 232; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":233 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":234 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 234; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 234; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid = dCreateCapsule(__pyx_v_sid,__pyx_2,__pyx_3); /* "/home/zefiris/pyode/src/geoms.pyx":238 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} __pyx_5 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} if (PyObject_SetItem(__pyx_4, __pyx_5, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 238; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomCapsule.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static int __pyx_f_3ode_11GeomCapsule___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomCapsule___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k49; __pyx_v_radius = __pyx_k50; __pyx_v_length = __pyx_k51; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":241 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":242 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":245 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 245; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCapsule.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":249 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":250 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCapsule._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"radius","length",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_radius, &__pyx_v_length)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":253 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 253; goto __pyx_L1;} dGeomCapsuleSetParams(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomCapsule.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomCapsule_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal __pyx_v_radius; dReal __pyx_v_length; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":257 */ dGeomCapsuleGetParams(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,(&__pyx_v_radius),(&__pyx_v_length)); /* "/home/zefiris/pyode/src/geoms.pyx":258 */ __pyx_1 = PyFloat_FromDouble(__pyx_v_radius); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(__pyx_v_length); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 258; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomCapsule.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomCapsule_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11GeomCapsule_pointDepth[] = "pointDepth(p) -> float\n\n Return the depth of the point p in the cylinder. Points inside the\n geom will have positive depth, points outside it will have\n negative depth, and points on the surface will have zero\n depth.\n\n @param p: Point\n @type p: 3-sequence of floats\n "; static PyObject *__pyx_f_3ode_11GeomCapsule_pointDepth(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"p",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); /* "/home/zefiris/pyode/src/geoms.pyx":271 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyFloat_FromDouble(dGeomCapsulePointDepth(((struct __pyx_obj_3ode_GeomCapsule *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 271; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomCapsule.pointDepth"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); return __pyx_r; } static int __pyx_f_3ode_12GeomCylinder___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12GeomCylinder___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; dReal __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k52; __pyx_v_radius = __pyx_k53; __pyx_v_length = __pyx_k54; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":292 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":293 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 293; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":294 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 294; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":295 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":296 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 296; goto __pyx_L1;} __pyx_3 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 296; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid = dCreateCylinder(__pyx_v_sid,__pyx_2,__pyx_3); /* "/home/zefiris/pyode/src/geoms.pyx":300 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} __pyx_5 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} if (PyObject_SetItem(__pyx_4, __pyx_5, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 300; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomCylinder.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static int __pyx_f_3ode_12GeomCylinder___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_12GeomCylinder___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","radius","length",0}; __pyx_v_space = __pyx_k55; __pyx_v_radius = __pyx_k56; __pyx_v_length = __pyx_k57; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_space, &__pyx_v_radius, &__pyx_v_length)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":303 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":304 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":307 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCylinder.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":311 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":312 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 312; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomCylinder._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_setParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_radius = 0; PyObject *__pyx_v_length = 0; PyObject *__pyx_r; dReal __pyx_1; dReal __pyx_2; static char *__pyx_argnames[] = {"radius","length",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_radius, &__pyx_v_length)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_radius); Py_INCREF(__pyx_v_length); /* "/home/zefiris/pyode/src/geoms.pyx":315 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_radius); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 315; goto __pyx_L1;} __pyx_2 = PyFloat_AsDouble(__pyx_v_length); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 315; goto __pyx_L1;} dGeomCylinderSetParams(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid,__pyx_1,__pyx_2); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomCylinder.setParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_radius); Py_DECREF(__pyx_v_length); return __pyx_r; } static PyObject *__pyx_f_3ode_12GeomCylinder_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_12GeomCylinder_getParams(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dReal __pyx_v_radius; dReal __pyx_v_length; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":319 */ dGeomCylinderGetParams(((struct __pyx_obj_3ode_GeomCylinder *)__pyx_v_self)->__pyx_base.gid,(&__pyx_v_radius),(&__pyx_v_length)); /* "/home/zefiris/pyode/src/geoms.pyx":320 */ __pyx_1 = PyFloat_FromDouble(__pyx_v_radius); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble(__pyx_v_length); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 320; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomCylinder.getParams"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_7GeomRay___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomRay___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_rlen = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; dReal __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"space","rlen",0}; __pyx_v_space = __pyx_k58; __pyx_v_rlen = __pyx_k59; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_rlen)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_rlen); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":344 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":345 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":346 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 346; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":347 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":348 */ __pyx_2 = PyFloat_AsDouble(__pyx_v_rlen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 348; goto __pyx_L1;} ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid = dCreateRay(__pyx_v_sid,__pyx_2); /* "/home/zefiris/pyode/src/geoms.pyx":352 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} __pyx_4 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} if (PyObject_SetItem(__pyx_3, __pyx_4, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 352; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomRay.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static int __pyx_f_3ode_7GeomRay___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_7GeomRay___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; PyObject *__pyx_v_rlen = 0; int __pyx_r; static char *__pyx_argnames[] = {"space","rlen",0}; __pyx_v_space = __pyx_k60; __pyx_v_rlen = __pyx_k61; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_space, &__pyx_v_rlen)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); Py_INCREF(__pyx_v_rlen); /* "/home/zefiris/pyode/src/geoms.pyx":356 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":357 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":361 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":362 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 362; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomRay._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_setLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_setLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rlen = 0; PyObject *__pyx_r; dReal __pyx_1; static char *__pyx_argnames[] = {"rlen",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_rlen)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_rlen); /* "/home/zefiris/pyode/src/geoms.pyx":365 */ __pyx_1 = PyFloat_AsDouble(__pyx_v_rlen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 365; goto __pyx_L1;} dGeomRaySetLength(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_1); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomRay.setLength"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_rlen); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_getLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_getLength(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":368 */ __pyx_1 = PyFloat_FromDouble(dGeomRayGetLength(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 368; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomRay.getLength"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_p = 0; PyObject *__pyx_v_u = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; dReal __pyx_3; dReal __pyx_4; dReal __pyx_5; dReal __pyx_6; dReal __pyx_7; dReal __pyx_8; static char *__pyx_argnames[] = {"p","u",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_p, &__pyx_v_u)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_p); Py_INCREF(__pyx_v_u); /* "/home/zefiris/pyode/src/geoms.pyx":371 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_6 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_u, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_8 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 371; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; dGeomRaySet(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_8); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomRay.set"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_p); Py_DECREF(__pyx_v_u); return __pyx_r; } static PyObject *__pyx_f_3ode_7GeomRay_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_7GeomRay_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { dVector3 __pyx_v_start; dVector3 __pyx_v_dir; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":376 */ dGeomRayGet(((struct __pyx_obj_3ode_GeomRay *)__pyx_v_self)->__pyx_base.gid,__pyx_v_start,__pyx_v_dir); /* "/home/zefiris/pyode/src/geoms.pyx":377 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_start[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_start[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_start[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_dir[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_dir[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_dir[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 377; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_5); __pyx_4 = 0; __pyx_5 = 0; __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.GeomRay.get"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_13GeomTransform___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13GeomTransform___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k62; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/geoms.pyx":399 */ __pyx_v_sid = NULL; /* "/home/zefiris/pyode/src/geoms.pyx":400 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 400; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":401 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 401; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":402 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":403 */ ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid = dCreateGeomTransform(__pyx_v_sid); /* "/home/zefiris/pyode/src/geoms.pyx":406 */ dGeomTransformSetCleanup(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,0); /* "/home/zefiris/pyode/src/geoms.pyx":410 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 410; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomTransform.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_13GeomTransform___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_13GeomTransform___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_space = 0; int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"space",0}; __pyx_v_space = __pyx_k63; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_space); /* "/home/zefiris/pyode/src/geoms.pyx":413 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "/home/zefiris/pyode/src/geoms.pyx":414 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.body = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":415 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":417 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 417; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.attribs); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.attribs = __pyx_1; __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_13GeomTransform_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":420 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 420; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_13GeomTransform__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":424 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid); /* "/home/zefiris/pyode/src/geoms.pyx":425 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 425; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k100p; static PyObject *__pyx_k101p; static PyObject *__pyx_k102p; static char (__pyx_k100[]) = "Only placeable geoms can be encapsulated by a GeomTransform"; static char (__pyx_k101[]) = "The encapsulated geom was already inserted into a space."; static char (__pyx_k102[]) = "The encapsulated geom is already associated with a body."; static PyObject *__pyx_f_3ode_13GeomTransform_setGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_setGeom[] = "setGeom(geom)\n\n Set the geom that the geometry transform encapsulates.\n A ValueError exception is thrown if a) the geom is not placeable,\n b) the geom was already inserted into a space or c) the geom is\n already associated with a body.\n\n @param geom: Geom object to encapsulate\n @type geom: GeomObject\n "; static PyObject *__pyx_f_3ode_13GeomTransform_setGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_GeomObject *__pyx_v_geom = 0; long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; int __pyx_3; int __pyx_4; long __pyx_5; static char *__pyx_argnames[] = {"geom",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geom)) return 0; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_geom); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_3ode_GeomObject, 0, "geom")) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 427; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geoms.pyx":440 */ __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_geom), __pyx_n_placeable); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 440; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = (!__pyx_3); if (__pyx_4) { /* "/home/zefiris/pyode/src/geoms.pyx":441 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 441; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k100p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 441; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":442 */ __pyx_3 = (dGeomGetSpace(__pyx_v_geom->gid) != ((struct dxSpace (*))0)); if (__pyx_3) { /* "/home/zefiris/pyode/src/geoms.pyx":443 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; goto __pyx_L1;} __Pyx_Raise(__pyx_2, __pyx_k101p, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/geoms.pyx":444 */ __pyx_4 = (dGeomGetBody(__pyx_v_geom->gid) != ((struct dxBody (*))0)); if (__pyx_4) { /* "/home/zefiris/pyode/src/geoms.pyx":445 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 445; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k102p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 445; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; /* "/home/zefiris/pyode/src/geoms.pyx":447 */ __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_geom), __pyx_n__id); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_5 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_id = __pyx_5; /* "/home/zefiris/pyode/src/geoms.pyx":448 */ dGeomTransformSetGeom(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,((struct dxGeom (*))__pyx_v_id)); /* "/home/zefiris/pyode/src/geoms.pyx":449 */ Py_INCREF(((PyObject *)__pyx_v_geom)); Py_DECREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom = ((PyObject *)__pyx_v_geom); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.GeomTransform.setGeom"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_geom); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_getGeom[] = "getGeom() -> GeomObject\n\n Get the geom that the geometry transform encapsulates.\n "; static PyObject *__pyx_f_3ode_13GeomTransform_getGeom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":456 */ Py_INCREF(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom); __pyx_r = ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->geom; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k103p; static char (__pyx_k103[]) = "Invalid information mode (%d). Must be either 0 or 1."; static PyObject *__pyx_f_3ode_13GeomTransform_setInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_setInfo[] = "setInfo(mode)\n\n Set the \"information\" mode of the geometry transform.\n\n With mode 0, when a transform object is collided with another\n object, the geom field of the ContactGeom structure is set to the\n geom that is encapsulated by the transform object.\n\n With mode 1, the geom field of the ContactGeom structure is set\n to the transform object itself.\n\n @param mode: Information mode (0 or 1)\n @type mode: int\n "; static PyObject *__pyx_f_3ode_13GeomTransform_setInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_mode; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"mode",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_mode)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":473 */ __pyx_1 = (__pyx_v_mode < 0); if (!__pyx_1) { __pyx_1 = (__pyx_v_mode > 1); } if (__pyx_1) { /* "/home/zefiris/pyode/src/geoms.pyx":474 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} __pyx_4 = PyNumber_Remainder(__pyx_k103p, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, __pyx_4, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[7]; __pyx_lineno = 474; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/geoms.pyx":475 */ dGeomTransformSetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,__pyx_v_mode); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.GeomTransform.setInfo"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_13GeomTransform_getInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_13GeomTransform_getInfo[] = "getInfo() -> int\n\n Get the \"information\" mode of the geometry transform (0 or 1).\n\n With mode 0, when a transform object is collided with another\n object, the geom field of the ContactGeom structure is set to the\n geom that is encapsulated by the transform object.\n\n With mode 1, the geom field of the ContactGeom structure is set\n to the transform object itself.\n "; static PyObject *__pyx_f_3ode_13GeomTransform_getInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "/home/zefiris/pyode/src/geoms.pyx":489 */ __pyx_1 = PyInt_FromLong(dGeomTransformGetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 489; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTransform.getInfo"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static int __pyx_f_3ode_11TriMeshData___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11TriMeshData___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); /* "src/trimeshdata.pyx":31 */ ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->tmdid = dGeomTriMeshDataCreate(); /* "src/trimeshdata.pyx":32 */ ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer = NULL; /* "src/trimeshdata.pyx":33 */ ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer = NULL; __pyx_r = 0; Py_DECREF(__pyx_v_self); return __pyx_r; } static void __pyx_f_3ode_11TriMeshData___dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_f_3ode_11TriMeshData___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); /* "src/trimeshdata.pyx":36 */ __pyx_1 = (((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->tmdid != NULL); if (__pyx_1) { /* "src/trimeshdata.pyx":37 */ dGeomTriMeshDataDestroy(((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->tmdid); goto __pyx_L2; } __pyx_L2:; /* "src/trimeshdata.pyx":38 */ __pyx_1 = (((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer != NULL); if (__pyx_1) { /* "src/trimeshdata.pyx":39 */ free(((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer); goto __pyx_L3; } __pyx_L3:; /* "src/trimeshdata.pyx":40 */ __pyx_1 = (((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer != NULL); if (__pyx_1) { /* "src/trimeshdata.pyx":41 */ free(((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer); goto __pyx_L4; } __pyx_L4:; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_n_len; static PyObject *__pyx_k104p; static char (__pyx_k104[]) = "Vertex index out of range"; static PyObject *__pyx_f_3ode_11TriMeshData_build(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11TriMeshData_build[] = "build(verts, faces)\n\n @param verts: Vertices\n @type verts: Sequence of 3-sequences of floats\n @param faces: Face definitions (three indices per face)\n @type faces: Sequence of 3-sequences of ints\n "; static PyObject *__pyx_f_3ode_11TriMeshData_build(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_verts = 0; PyObject *__pyx_v_faces = 0; int __pyx_v_numverts; int __pyx_v_numfaces; dReal (*__pyx_v_vp); int (*__pyx_v_fp); int __pyx_v_a; int __pyx_v_b; int __pyx_v_c; PyObject *__pyx_v_v; PyObject *__pyx_v_f; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; int __pyx_4; dReal __pyx_5; static char *__pyx_argnames[] = {"verts","faces",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_verts, &__pyx_v_faces)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_verts); Py_INCREF(__pyx_v_faces); __pyx_v_v = Py_None; Py_INCREF(Py_None); __pyx_v_f = Py_None; Py_INCREF(Py_None); /* "src/trimeshdata.pyx":57 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; goto __pyx_L1;} Py_INCREF(__pyx_v_verts); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_verts); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_v_numverts = __pyx_4; /* "src/trimeshdata.pyx":58 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; goto __pyx_L1;} Py_INCREF(__pyx_v_faces); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_faces); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_v_numfaces = __pyx_4; /* "src/trimeshdata.pyx":60 */ ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer = ((dReal (*))malloc(((__pyx_v_numverts * 4) * (sizeof(dReal ))))); /* "src/trimeshdata.pyx":61 */ ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer = ((int (*))malloc(((__pyx_v_numfaces * 3) * (sizeof(int ))))); /* "src/trimeshdata.pyx":64 */ __pyx_v_vp = ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer; /* "src/trimeshdata.pyx":65 */ __pyx_1 = PyObject_GetIter(__pyx_v_verts); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 65; goto __pyx_L1;} for (;;) { __pyx_2 = PyIter_Next(__pyx_1); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 65; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_v); __pyx_v_v = __pyx_2; __pyx_2 = 0; /* "src/trimeshdata.pyx":66 */ __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 66; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 66; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 66; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_vp[0]) = __pyx_5; /* "src/trimeshdata.pyx":67 */ __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_vp[1]) = __pyx_5; /* "src/trimeshdata.pyx":68 */ __pyx_3 = PyInt_FromLong(2); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 68; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_v, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 68; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_5 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 68; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_vp[2]) = __pyx_5; /* "src/trimeshdata.pyx":69 */ (__pyx_v_vp[3]) = 0; /* "src/trimeshdata.pyx":70 */ __pyx_v_vp = (__pyx_v_vp + 4); } Py_DECREF(__pyx_1); __pyx_1 = 0; /* "src/trimeshdata.pyx":73 */ __pyx_v_fp = ((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer; /* "src/trimeshdata.pyx":74 */ __pyx_3 = PyObject_GetIter(__pyx_v_faces); if (!__pyx_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 74; goto __pyx_L1;} for (;;) { __pyx_2 = PyIter_Next(__pyx_3); if (!__pyx_2) { if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 74; goto __pyx_L1;} break; } Py_DECREF(__pyx_v_f); __pyx_v_f = __pyx_2; __pyx_2 = 0; /* "src/trimeshdata.pyx":75 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 75; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 75; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 75; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_a = __pyx_4; /* "src/trimeshdata.pyx":76 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 76; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 76; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 76; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_b = __pyx_4; /* "src/trimeshdata.pyx":77 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; goto __pyx_L1;} __pyx_2 = PyObject_GetItem(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_c = __pyx_4; /* "src/trimeshdata.pyx":78 */ __pyx_4 = (__pyx_v_a < 0); if (!__pyx_4) { __pyx_4 = (__pyx_v_b < 0); if (!__pyx_4) { __pyx_4 = (__pyx_v_c < 0); if (!__pyx_4) { __pyx_4 = (__pyx_v_a >= __pyx_v_numverts); if (!__pyx_4) { __pyx_4 = (__pyx_v_b >= __pyx_v_numverts); if (!__pyx_4) { __pyx_4 = (__pyx_v_c >= __pyx_v_numverts); } } } } } if (__pyx_4) { /* "src/trimeshdata.pyx":79 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; goto __pyx_L1;} __Pyx_Raise(__pyx_1, __pyx_k104p, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; /* "src/trimeshdata.pyx":80 */ (__pyx_v_fp[0]) = __pyx_v_a; /* "src/trimeshdata.pyx":81 */ (__pyx_v_fp[1]) = __pyx_v_b; /* "src/trimeshdata.pyx":82 */ (__pyx_v_fp[2]) = __pyx_v_c; /* "src/trimeshdata.pyx":83 */ __pyx_v_fp = (__pyx_v_fp + 3); } Py_DECREF(__pyx_3); __pyx_3 = 0; /* "src/trimeshdata.pyx":86 */ dGeomTriMeshDataBuildSimple(((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->tmdid,((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer,__pyx_v_numverts,((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer,(__pyx_v_numfaces * 3)); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.TriMeshData.build"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_v); Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_verts); Py_DECREF(__pyx_v_faces); return __pyx_r; } static int __pyx_f_3ode_11GeomTriMesh___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomTriMesh___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_TriMeshData *__pyx_v_data = 0; PyObject *__pyx_v_space = 0; struct __pyx_obj_3ode_SpaceBase *__pyx_v_sp; dSpaceID __pyx_v_sid; int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"data","space",0}; __pyx_v_space = __pyx_k64; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_data, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_data); Py_INCREF(__pyx_v_space); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)Py_None); Py_INCREF(Py_None); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_3ode_TriMeshData, 0, "data")) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 41; goto __pyx_L1;} /* "src/trimesh.pyx":45 */ Py_INCREF(((PyObject *)__pyx_v_data)); Py_DECREF(((PyObject *)((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->data)); ((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->data = __pyx_v_data; /* "src/trimesh.pyx":47 */ __pyx_v_sid = NULL; /* "src/trimesh.pyx":48 */ if (PyObject_Cmp(__pyx_v_space, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 48; goto __pyx_L1;} __pyx_1 = __pyx_1 != 0; if (__pyx_1) { /* "src/trimesh.pyx":49 */ if (!__Pyx_TypeTest(__pyx_v_space, __pyx_ptype_3ode_SpaceBase)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 49; goto __pyx_L1;} Py_INCREF(__pyx_v_space); Py_DECREF(((PyObject *)__pyx_v_sp)); __pyx_v_sp = ((struct __pyx_obj_3ode_SpaceBase *)__pyx_v_space); /* "src/trimesh.pyx":50 */ __pyx_v_sid = __pyx_v_sp->sid; goto __pyx_L2; } __pyx_L2:; /* "src/trimesh.pyx":51 */ ((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.gid = dCreateTriMesh(__pyx_v_sid,__pyx_v_data->tmdid,NULL,NULL,NULL); /* "src/trimesh.pyx":53 */ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__geom_c2py_lut); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(((long )((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; goto __pyx_L1;} if (PyObject_SetItem(__pyx_2, __pyx_3, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("ode.GeomTriMesh.__new__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_sp); Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_data); Py_DECREF(__pyx_v_space); return __pyx_r; } static int __pyx_f_3ode_11GeomTriMesh___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_3ode_11GeomTriMesh___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_TriMeshData *__pyx_v_data = 0; PyObject *__pyx_v_space = 0; int __pyx_r; static char *__pyx_argnames[] = {"data","space",0}; __pyx_v_space = __pyx_k65; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_data, &__pyx_v_space)) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_data); Py_INCREF(__pyx_v_space); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_3ode_TriMeshData, 0, "data")) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 56; goto __pyx_L1;} /* "src/trimesh.pyx":57 */ Py_INCREF(__pyx_v_space); Py_DECREF(((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.space); ((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.space = __pyx_v_space; /* "src/trimesh.pyx":58 */ Py_INCREF(Py_None); Py_DECREF(((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.body); ((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.body = Py_None; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("ode.GeomTriMesh.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); Py_DECREF(__pyx_v_data); Py_DECREF(__pyx_v_space); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomTriMesh_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomTriMesh_placeable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "src/trimesh.pyx":61 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 61; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTriMesh.placeable"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomTriMesh__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_3ode_11GeomTriMesh__id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { long __pyx_v_id; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "src/trimesh.pyx":65 */ __pyx_v_id = ((long )((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.gid); /* "src/trimesh.pyx":66 */ __pyx_1 = PyInt_FromLong(__pyx_v_id); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 66; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("ode.GeomTriMesh._id"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomTriMesh_clearTCCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11GeomTriMesh_clearTCCache[] = "clearTCCache()\n\n Clears the internal temporal coherence caches.\n "; static PyObject *__pyx_f_3ode_11GeomTriMesh_clearTCCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "src/trimesh.pyx":73 */ dGeomTriMeshClearTCCache(((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.gid); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_11GeomTriMesh_getTriangle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_11GeomTriMesh_getTriangle[] = "getTriangle(idx) -> (v0, v1, v2)\n\n @param idx: Triangle index\n @type idx: int\n "; static PyObject *__pyx_f_3ode_11GeomTriMesh_getTriangle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_idx; dVector3 __pyx_v_v0; dVector3 __pyx_v_v1; dVector3 __pyx_v_v2; dVector3 (*__pyx_v_vp0); dVector3 (*__pyx_v_vp1); dVector3 (*__pyx_v_vp2); PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {"idx",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_idx)) return 0; Py_INCREF((PyObject *)__pyx_v_self); /* "src/trimesh.pyx":87 */ __pyx_v_vp0 = ((dVector3 (*))__pyx_v_v0); /* "src/trimesh.pyx":88 */ __pyx_v_vp1 = ((dVector3 (*))__pyx_v_v1); /* "src/trimesh.pyx":89 */ __pyx_v_vp2 = ((dVector3 (*))__pyx_v_v2); /* "src/trimesh.pyx":91 */ dGeomTriMeshGetTriangle(((struct __pyx_obj_3ode_GeomTriMesh *)__pyx_v_self)->__pyx_base.gid,__pyx_v_idx,__pyx_v_vp0,__pyx_v_vp1,__pyx_v_vp2); /* "src/trimesh.pyx":92 */ __pyx_1 = PyFloat_FromDouble((__pyx_v_v0[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_v0[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_v0[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_v1[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_v1[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_v1[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyFloat_FromDouble((__pyx_v_v2[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_2 = PyFloat_FromDouble((__pyx_v_v2[1])); if (!__pyx_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble((__pyx_v_v2[2])); if (!__pyx_3) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_6, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_5); PyTuple_SET_ITEM(__pyx_1, 2, __pyx_6); __pyx_4 = 0; __pyx_5 = 0; __pyx_6 = 0; __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("ode.GeomTriMesh.getTriangle"); __pyx_r = 0; __pyx_L0:; Py_DECREF((PyObject *)__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_3ode_collide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_collide[] = "collide(geom1, geom2) -> contacts\n\n Generate contact information for two objects.\n\n Given two geometry objects that potentially touch (geom1 and geom2),\n generate contact information for them. Internally, this just calls\n the correct class-specific collision functions for geom1 and geom2.\n\n [flags specifies how contacts should be generated if the objects\n touch. Currently the lower 16 bits of flags specifies the maximum\n number of contact points to generate. If this number is zero, this\n function just pretends that it is one - in other words you can not\n ask for zero contacts. All other bits in flags must be zero. In\n the future the other bits may be used to select other contact\n generation strategies.]\n\n If the objects touch, this returns a list of Contact objects,\n otherwise it returns an empty list.\n\n @param geom1: First Geom\n @type geom1: GeomObject\n @param geom2: Second Geom\n @type geom2: GeomObject\n @returns: Returns a list of Contact objects.\n "; static PyObject *__pyx_f_3ode_collide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geom1 = 0; PyObject *__pyx_v_geom2 = 0; dContactGeom (__pyx_v_c[150]); long __pyx_v_id1; long __pyx_v_id2; int __pyx_v_i; int __pyx_v_n; struct __pyx_obj_3ode_Contact *__pyx_v_cont; PyObject *__pyx_v_res; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; long __pyx_3; int __pyx_4; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"geom1","geom2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_geom1, &__pyx_v_geom2)) return 0; Py_INCREF(__pyx_v_geom1); Py_INCREF(__pyx_v_geom2); __pyx_v_cont = ((struct __pyx_obj_3ode_Contact *)Py_None); Py_INCREF(Py_None); __pyx_v_res = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/ode.pyx":219 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 219; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id1 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":220 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 220; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 220; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id2 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":222 */ __pyx_v_n = dCollide(((struct dxGeom (*))__pyx_v_id1),((struct dxGeom (*))__pyx_v_id2),150,__pyx_v_c,(sizeof(dContactGeom ))); /* "/home/zefiris/pyode/src/ode.pyx":223 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 223; goto __pyx_L1;} Py_DECREF(__pyx_v_res); __pyx_v_res = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":224 */ __pyx_v_i = 0; /* "/home/zefiris/pyode/src/ode.pyx":225 */ while (1) { __pyx_4 = (__pyx_v_i < __pyx_v_n); if (!__pyx_4) break; /* "/home/zefiris/pyode/src/ode.pyx":226 */ __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_3ode_Contact), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 226; goto __pyx_L1;} if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_3ode_Contact)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_cont)); __pyx_v_cont = ((struct __pyx_obj_3ode_Contact *)__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/ode.pyx":227 */ __pyx_v_cont->_contact.geom = (__pyx_v_c[__pyx_v_i]); /* "/home/zefiris/pyode/src/ode.pyx":228 */ __pyx_1 = PyObject_GetAttr(__pyx_v_res, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_cont)); PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_cont)); __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/ode.pyx":229 */ __pyx_v_i = (__pyx_v_i + 1); } /* "/home/zefiris/pyode/src/ode.pyx":231 */ Py_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("ode.collide"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_cont); Py_DECREF(__pyx_v_res); Py_DECREF(__pyx_v_geom1); Py_DECREF(__pyx_v_geom2); return __pyx_r; } static PyObject *__pyx_f_3ode_collide2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_collide2[] = "collide2(geom1, geom2, arg, callback)\n \n Calls the callback for all potentially intersecting pairs that contain\n one geom from geom1 and one geom from geom2.\n\n @param geom1: First Geom\n @type geom1: GeomObject\n @param geom2: Second Geom\n @type geom2: GeomObject\n @param arg: A user argument that is passed to the callback function\n @param callback: Callback function\n @type callback: callable \n "; static PyObject *__pyx_f_3ode_collide2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geom1 = 0; PyObject *__pyx_v_geom2 = 0; PyObject *__pyx_v_arg = 0; PyObject *__pyx_v_callback = 0; void (*__pyx_v_data); PyObject *__pyx_v_tup; long __pyx_v_id1; long __pyx_v_id2; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; long __pyx_3; static char *__pyx_argnames[] = {"geom1","geom2","arg","callback",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_geom1, &__pyx_v_geom2, &__pyx_v_arg, &__pyx_v_callback)) return 0; Py_INCREF(__pyx_v_geom1); Py_INCREF(__pyx_v_geom2); Py_INCREF(__pyx_v_arg); Py_INCREF(__pyx_v_callback); __pyx_v_tup = Py_None; Py_INCREF(Py_None); /* "/home/zefiris/pyode/src/ode.pyx":252 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom1, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 252; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 252; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 252; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id1 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":253 */ __pyx_1 = PyObject_GetAttr(__pyx_v_geom2, __pyx_n__id); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 253; goto __pyx_L1;} __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_id2 = __pyx_3; /* "/home/zefiris/pyode/src/ode.pyx":255 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 255; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); Py_INCREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_arg); Py_DECREF(__pyx_v_tup); __pyx_v_tup = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":256 */ __pyx_v_data = ((void (*))__pyx_v_tup); /* "/home/zefiris/pyode/src/ode.pyx":258 */ dSpaceCollide2(((struct dxGeom (*))__pyx_v_id1),((struct dxGeom (*))__pyx_v_id2),__pyx_v_data,__pyx_f_3ode_collide_callback); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); __Pyx_AddTraceback("ode.collide2"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_tup); Py_DECREF(__pyx_v_geom1); Py_DECREF(__pyx_v_geom2); Py_DECREF(__pyx_v_arg); Py_DECREF(__pyx_v_callback); return __pyx_r; } static PyObject *__pyx_n_bool; static PyObject *__pyx_f_3ode_areConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_areConnected[] = "areConnected(body1, body2) -> bool\n\n Return True if the two bodies are connected together by a joint,\n otherwise return False.\n\n @param body1: First body\n @type body1: Body\n @param body2: Second body\n @type body2: Body\n @returns: True if the bodies are connected\n "; static PyObject *__pyx_f_3ode_areConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_3ode_Body *__pyx_v_body1 = 0; struct __pyx_obj_3ode_Body *__pyx_v_body2 = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"body1","body2",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_body1, &__pyx_v_body2)) return 0; Py_INCREF(__pyx_v_body1); Py_INCREF(__pyx_v_body2); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body1), __pyx_ptype_3ode_Body, 1, "body1")) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 261; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body2), __pyx_ptype_3ode_Body, 1, "body2")) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 261; goto __pyx_L1;} /* "/home/zefiris/pyode/src/ode.pyx":274 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 274; goto __pyx_L1;} __pyx_2 = __pyx_v_body1 == __pyx_1; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/ode.pyx":275 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 275; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; /* "/home/zefiris/pyode/src/ode.pyx":276 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_environment); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 276; goto __pyx_L1;} __pyx_2 = __pyx_v_body2 == __pyx_1; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { /* "/home/zefiris/pyode/src/ode.pyx":277 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "/home/zefiris/pyode/src/ode.pyx":279 */ __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(dAreConnected(((struct dxBody (*))__pyx_v_body1->bid),((struct dxBody (*))__pyx_v_body2->bid))); if (!__pyx_3) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 279; goto __pyx_L1;} __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 279; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 279; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("ode.areConnected"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_body1); Py_DECREF(__pyx_v_body2); return __pyx_r; } static PyObject *__pyx_f_3ode_CloseODE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_3ode_CloseODE[] = "CloseODE()\n\n Deallocate some extra memory used by ODE that can not be deallocated\n using the normal destroy functions.\n "; static PyObject *__pyx_f_3ode_CloseODE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/home/zefiris/pyode/src/ode.pyx":287 */ dCloseODE(); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static __Pyx_InternTabEntry __pyx_intern_tab[] = { {&__pyx_n_AMotorEuler, "AMotorEuler"}, {&__pyx_n_AMotorUser, "AMotorUser"}, {&__pyx_n_AttributeError, "AttributeError"}, {&__pyx_n_CloseODE, "CloseODE"}, {&__pyx_n_ContactApprox0, "ContactApprox0"}, {&__pyx_n_ContactApprox1, "ContactApprox1"}, {&__pyx_n_ContactApprox1_1, "ContactApprox1_1"}, {&__pyx_n_ContactApprox1_2, "ContactApprox1_2"}, {&__pyx_n_ContactBounce, "ContactBounce"}, {&__pyx_n_ContactFDir1, "ContactFDir1"}, {&__pyx_n_ContactMotion1, "ContactMotion1"}, {&__pyx_n_ContactMotion2, "ContactMotion2"}, {&__pyx_n_ContactMu2, "ContactMu2"}, {&__pyx_n_ContactSlip1, "ContactSlip1"}, {&__pyx_n_ContactSlip2, "ContactSlip2"}, {&__pyx_n_ContactSoftCFM, "ContactSoftCFM"}, {&__pyx_n_ContactSoftERP, "ContactSoftERP"}, {&__pyx_n_False, "False"}, {&__pyx_n_GeomCCylinder, "GeomCCylinder"}, {&__pyx_n_I, "I"}, {&__pyx_n_IndexError, "IndexError"}, {&__pyx_n_Infinity, "Infinity"}, {&__pyx_n_MemoryError, "MemoryError"}, {&__pyx_n_NotImplementedError, "NotImplementedError"}, {&__pyx_n_ParamBounce, "ParamBounce"}, {&__pyx_n_ParamBounce2, "ParamBounce2"}, {&__pyx_n_ParamBounce3, "ParamBounce3"}, {&__pyx_n_ParamCFM, "ParamCFM"}, {&__pyx_n_ParamCFM2, "ParamCFM2"}, {&__pyx_n_ParamCFM3, "ParamCFM3"}, {&__pyx_n_ParamFMax, "ParamFMax"}, {&__pyx_n_ParamFMax2, "ParamFMax2"}, {&__pyx_n_ParamFMax3, "ParamFMax3"}, {&__pyx_n_ParamFudgeFactor, "ParamFudgeFactor"}, {&__pyx_n_ParamFudgeFactor2, "ParamFudgeFactor2"}, {&__pyx_n_ParamFudgeFactor3, "ParamFudgeFactor3"}, {&__pyx_n_ParamGroup, "ParamGroup"}, {&__pyx_n_ParamHiStop, "ParamHiStop"}, {&__pyx_n_ParamHiStop2, "ParamHiStop2"}, {&__pyx_n_ParamHiStop3, "ParamHiStop3"}, {&__pyx_n_ParamLoStop, "ParamLoStop"}, {&__pyx_n_ParamLoStop2, "ParamLoStop2"}, {&__pyx_n_ParamLoStop3, "ParamLoStop3"}, {&__pyx_n_ParamStopCFM, "ParamStopCFM"}, {&__pyx_n_ParamStopCFM2, "ParamStopCFM2"}, {&__pyx_n_ParamStopCFM3, "ParamStopCFM3"}, {&__pyx_n_ParamStopERP, "ParamStopERP"}, {&__pyx_n_ParamStopERP2, "ParamStopERP2"}, {&__pyx_n_ParamStopERP3, "ParamStopERP3"}, {&__pyx_n_ParamSuspensionCFM, "ParamSuspensionCFM"}, {&__pyx_n_ParamSuspensionCFM2, "ParamSuspensionCFM2"}, {&__pyx_n_ParamSuspensionCFM3, "ParamSuspensionCFM3"}, {&__pyx_n_ParamSuspensionERP, "ParamSuspensionERP"}, {&__pyx_n_ParamSuspensionERP2, "ParamSuspensionERP2"}, {&__pyx_n_ParamSuspensionERP3, "ParamSuspensionERP3"}, {&__pyx_n_ParamVel, "ParamVel"}, {&__pyx_n_ParamVel2, "ParamVel2"}, {&__pyx_n_ParamVel3, "ParamVel3"}, {&__pyx_n_RuntimeError, "RuntimeError"}, {&__pyx_n_Space, "Space"}, {&__pyx_n_StopIteration, "StopIteration"}, {&__pyx_n_True, "True"}, {&__pyx_n_ValueError, "ValueError"}, {&__pyx_n__SpaceIterator, "_SpaceIterator"}, {&__pyx_n___doc__, "__doc__"}, {&__pyx_n___init__, "__init__"}, {&__pyx_n___iter__, "__iter__"}, {&__pyx_n__addjoint, "_addjoint"}, {&__pyx_n__destroyed, "_destroyed"}, {&__pyx_n__geom_c2py_lut, "_geom_c2py_lut"}, {&__pyx_n__id, "_id"}, {&__pyx_n_add, "add"}, {&__pyx_n_adjust, "adjust"}, {&__pyx_n_append, "append"}, {&__pyx_n_areConnected, "areConnected"}, {&__pyx_n_bool, "bool"}, {&__pyx_n_c, "c"}, {&__pyx_n_collide, "collide"}, {&__pyx_n_collide2, "collide2"}, {&__pyx_n_environment, "environment"}, {&__pyx_n_getGeom, "getGeom"}, {&__pyx_n_getNumGeoms, "getNumGeoms"}, {&__pyx_n_idx, "idx"}, {&__pyx_n_len, "len"}, {&__pyx_n_long, "long"}, {&__pyx_n_mass, "mass"}, {&__pyx_n_next, "next"}, {&__pyx_n_paramBounce, "paramBounce"}, {&__pyx_n_paramCFM, "paramCFM"}, {&__pyx_n_paramFMax, "paramFMax"}, {&__pyx_n_paramFudgeFactor, "paramFudgeFactor"}, {&__pyx_n_paramHiStop, "paramHiStop"}, {&__pyx_n_paramLoStop, "paramLoStop"}, {&__pyx_n_paramStopCFM, "paramStopCFM"}, {&__pyx_n_paramStopERP, "paramStopERP"}, {&__pyx_n_paramSuspensionCFM, "paramSuspensionCFM"}, {&__pyx_n_paramSuspensionERP, "paramSuspensionERP"}, {&__pyx_n_paramVel, "paramVel"}, {&__pyx_n_placeable, "placeable"}, {&__pyx_n_setFeedback, "setFeedback"}, {&__pyx_n_space, "space"}, {&__pyx_n_str, "str"}, {0, 0} }; static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_k1p, __pyx_k1, sizeof(__pyx_k1)}, {&__pyx_k24p, __pyx_k24, sizeof(__pyx_k24)}, {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)}, {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70)}, {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73)}, {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)}, {&__pyx_k76p, __pyx_k76, sizeof(__pyx_k76)}, {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)}, {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)}, {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)}, {&__pyx_k80p, __pyx_k80, sizeof(__pyx_k80)}, {&__pyx_k81p, __pyx_k81, sizeof(__pyx_k81)}, {&__pyx_k82p, __pyx_k82, sizeof(__pyx_k82)}, {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83)}, {&__pyx_k84p, __pyx_k84, sizeof(__pyx_k84)}, {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85)}, {&__pyx_k86p, __pyx_k86, sizeof(__pyx_k86)}, {&__pyx_k87p, __pyx_k87, sizeof(__pyx_k87)}, {&__pyx_k88p, __pyx_k88, sizeof(__pyx_k88)}, {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)}, {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)}, {&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)}, {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)}, {&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)}, {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)}, {&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)}, {&__pyx_k96p, __pyx_k96, sizeof(__pyx_k96)}, {&__pyx_k97p, __pyx_k97, sizeof(__pyx_k97)}, {&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)}, {&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)}, {&__pyx_k100p, __pyx_k100, sizeof(__pyx_k100)}, {&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101)}, {&__pyx_k102p, __pyx_k102, sizeof(__pyx_k102)}, {&__pyx_k103p, __pyx_k103, sizeof(__pyx_k103)}, {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)}, {0, 0, 0} }; static PyObject *__pyx_tp_new_3ode_Mass(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_4Mass___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Mass(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Mass(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_Mass(PyObject *o) { return 0; } static PyObject *__pyx_tp_getattro_3ode_Mass(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_4Mass___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Mass(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_4Mass___setattr__(o, n, v); } else { return PyObject_GenericSetAttr(o, n, 0); } } static struct PyMethodDef __pyx_methods_3ode_Mass[] = { {"setZero", (PyCFunction)__pyx_f_3ode_4Mass_setZero, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setZero}, {"setParameters", (PyCFunction)__pyx_f_3ode_4Mass_setParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setParameters}, {"setSphere", (PyCFunction)__pyx_f_3ode_4Mass_setSphere, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setSphere}, {"setSphereTotal", (PyCFunction)__pyx_f_3ode_4Mass_setSphereTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setSphereTotal}, {"setCappedCylinder", (PyCFunction)__pyx_f_3ode_4Mass_setCappedCylinder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCappedCylinder}, {"setCappedCylinderTotal", (PyCFunction)__pyx_f_3ode_4Mass_setCappedCylinderTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCappedCylinderTotal}, {"setCylinder", (PyCFunction)__pyx_f_3ode_4Mass_setCylinder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCylinder}, {"setCylinderTotal", (PyCFunction)__pyx_f_3ode_4Mass_setCylinderTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setCylinderTotal}, {"setBox", (PyCFunction)__pyx_f_3ode_4Mass_setBox, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setBox}, {"setBoxTotal", (PyCFunction)__pyx_f_3ode_4Mass_setBoxTotal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_setBoxTotal}, {"adjust", (PyCFunction)__pyx_f_3ode_4Mass_adjust, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_adjust}, {"translate", (PyCFunction)__pyx_f_3ode_4Mass_translate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_translate}, {"add", (PyCFunction)__pyx_f_3ode_4Mass_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Mass_add}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Mass = { __pyx_f_3ode_4Mass___add__, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Mass = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Mass = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Mass = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Mass = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Mass", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Mass), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Mass, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Mass, /*tp_as_number*/ &__pyx_tp_as_sequence_Mass, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Mass, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_f_3ode_4Mass___str__, /*tp_str*/ __pyx_tp_getattro_3ode_Mass, /*tp_getattro*/ __pyx_tp_setattro_3ode_Mass, /*tp_setattro*/ &__pyx_tp_as_buffer_Mass, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Mass parameters of a rigid body.\n\n This class stores mass parameters of a rigid body which can be\n accessed through the following attributes:\n\n - mass: The total mass of the body (float)\n - c: The center of gravity position in body frame (3-tuple of floats)\n - I: The 3x3 inertia tensor in body frame (3-tuple of 3-tuples)\n\n This class wraps the dMass structure from the C API.\n\n @ivar mass: The total mass of the body\n @ivar c: The center of gravity position in body frame (cx, cy, cz)\n @ivar I: The 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22, I23), (I13, I23, I33))\n @type mass: float\n @type c: 3-tuple of floats\n @type I: 3-tuple of 3-tuples of floats \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Mass, /*tp_traverse*/ __pyx_tp_clear_3ode_Mass, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Mass, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Mass, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Contact(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_7Contact___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Contact(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Contact(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_Contact(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_Contact[] = { {"getMode", (PyCFunction)__pyx_f_3ode_7Contact_getMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMode}, {"setMode", (PyCFunction)__pyx_f_3ode_7Contact_setMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMode}, {"getMu", (PyCFunction)__pyx_f_3ode_7Contact_getMu, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMu}, {"setMu", (PyCFunction)__pyx_f_3ode_7Contact_setMu, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMu}, {"getMu2", (PyCFunction)__pyx_f_3ode_7Contact_getMu2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMu2}, {"setMu2", (PyCFunction)__pyx_f_3ode_7Contact_setMu2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMu2}, {"getBounce", (PyCFunction)__pyx_f_3ode_7Contact_getBounce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getBounce}, {"setBounce", (PyCFunction)__pyx_f_3ode_7Contact_setBounce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setBounce}, {"getBounceVel", (PyCFunction)__pyx_f_3ode_7Contact_getBounceVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getBounceVel}, {"setBounceVel", (PyCFunction)__pyx_f_3ode_7Contact_setBounceVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setBounceVel}, {"getSoftERP", (PyCFunction)__pyx_f_3ode_7Contact_getSoftERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSoftERP}, {"setSoftERP", (PyCFunction)__pyx_f_3ode_7Contact_setSoftERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSoftERP}, {"getSoftCFM", (PyCFunction)__pyx_f_3ode_7Contact_getSoftCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSoftCFM}, {"setSoftCFM", (PyCFunction)__pyx_f_3ode_7Contact_setSoftCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSoftCFM}, {"getMotion1", (PyCFunction)__pyx_f_3ode_7Contact_getMotion1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMotion1}, {"setMotion1", (PyCFunction)__pyx_f_3ode_7Contact_setMotion1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMotion1}, {"getMotion2", (PyCFunction)__pyx_f_3ode_7Contact_getMotion2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getMotion2}, {"setMotion2", (PyCFunction)__pyx_f_3ode_7Contact_setMotion2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setMotion2}, {"getSlip1", (PyCFunction)__pyx_f_3ode_7Contact_getSlip1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSlip1}, {"setSlip1", (PyCFunction)__pyx_f_3ode_7Contact_setSlip1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSlip1}, {"getSlip2", (PyCFunction)__pyx_f_3ode_7Contact_getSlip2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getSlip2}, {"setSlip2", (PyCFunction)__pyx_f_3ode_7Contact_setSlip2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setSlip2}, {"getFDir1", (PyCFunction)__pyx_f_3ode_7Contact_getFDir1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getFDir1}, {"setFDir1", (PyCFunction)__pyx_f_3ode_7Contact_setFDir1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setFDir1}, {"getContactGeomParams", (PyCFunction)__pyx_f_3ode_7Contact_getContactGeomParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_getContactGeomParams}, {"setContactGeomParams", (PyCFunction)__pyx_f_3ode_7Contact_setContactGeomParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7Contact_setContactGeomParams}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Contact = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Contact = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Contact = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Contact = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Contact = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Contact", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Contact), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Contact, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Contact, /*tp_as_number*/ &__pyx_tp_as_sequence_Contact, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Contact, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Contact, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This class represents a contact between two bodies in one point.\n\n A Contact object stores all the input parameters for a ContactJoint.\n This class wraps the ODE dContact structure which has 3 components::\n\n struct dContact {\n dSurfaceParameters surface;\n dContactGeom geom;\n dVector3 fdir1;\n }; \n\n This wrapper class provides methods to get and set the items of those\n structures.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Contact, /*tp_traverse*/ __pyx_tp_clear_3ode_Contact, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Contact, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Contact, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_World(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_5World___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_World(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_5World___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_World(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_World(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_World[] = { {"setGravity", (PyCFunction)__pyx_f_3ode_5World_setGravity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setGravity}, {"getGravity", (PyCFunction)__pyx_f_3ode_5World_getGravity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getGravity}, {"setERP", (PyCFunction)__pyx_f_3ode_5World_setERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setERP}, {"getERP", (PyCFunction)__pyx_f_3ode_5World_getERP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getERP}, {"setCFM", (PyCFunction)__pyx_f_3ode_5World_setCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setCFM}, {"getCFM", (PyCFunction)__pyx_f_3ode_5World_getCFM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getCFM}, {"step", (PyCFunction)__pyx_f_3ode_5World_step, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_step}, {"quickStep", (PyCFunction)__pyx_f_3ode_5World_quickStep, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_quickStep}, {"setQuickStepNumIterations", (PyCFunction)__pyx_f_3ode_5World_setQuickStepNumIterations, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setQuickStepNumIterations}, {"getQuickStepNumIterations", (PyCFunction)__pyx_f_3ode_5World_getQuickStepNumIterations, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getQuickStepNumIterations}, {"setContactMaxCorrectingVel", (PyCFunction)__pyx_f_3ode_5World_setContactMaxCorrectingVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setContactMaxCorrectingVel}, {"getContactMaxCorrectingVel", (PyCFunction)__pyx_f_3ode_5World_getContactMaxCorrectingVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getContactMaxCorrectingVel}, {"setContactSurfaceLayer", (PyCFunction)__pyx_f_3ode_5World_setContactSurfaceLayer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setContactSurfaceLayer}, {"getContactSurfaceLayer", (PyCFunction)__pyx_f_3ode_5World_getContactSurfaceLayer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getContactSurfaceLayer}, {"setAutoDisableFlag", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableFlag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableFlag}, {"getAutoDisableFlag", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableFlag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableFlag}, {"setAutoDisableLinearThreshold", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableLinearThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableLinearThreshold}, {"getAutoDisableLinearThreshold", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableLinearThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableLinearThreshold}, {"setAutoDisableAngularThreshold", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableAngularThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableAngularThreshold}, {"getAutoDisableAngularThreshold", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableAngularThreshold, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableAngularThreshold}, {"setAutoDisableSteps", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableSteps, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableSteps}, {"getAutoDisableSteps", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableSteps, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableSteps}, {"setAutoDisableTime", (PyCFunction)__pyx_f_3ode_5World_setAutoDisableTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_setAutoDisableTime}, {"getAutoDisableTime", (PyCFunction)__pyx_f_3ode_5World_getAutoDisableTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_getAutoDisableTime}, {"impulseToForce", (PyCFunction)__pyx_f_3ode_5World_impulseToForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5World_impulseToForce}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_World = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_World = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_World = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_World = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_World = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.World", /*tp_name*/ sizeof(struct __pyx_obj_3ode_World), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_World, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_World, /*tp_as_number*/ &__pyx_tp_as_sequence_World, /*tp_as_sequence*/ &__pyx_tp_as_mapping_World, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_World, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Dynamics world.\n \n The world object is a container for rigid bodies and joints.\n \n \n Constructor::\n \n World()\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_World, /*tp_traverse*/ __pyx_tp_clear_3ode_World, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_World, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_World, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Body(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; p->world = Py_None; Py_INCREF(Py_None); p->userattribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_4Body___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Body(PyObject *o) { struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_4Body___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->world); Py_XDECREF(p->userattribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Body(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; if (p->world) { e = (*v)(p->world, a); if (e) return e; } if (p->userattribs) { e = (*v)(p->userattribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_Body(PyObject *o) { struct __pyx_obj_3ode_Body *p = (struct __pyx_obj_3ode_Body *)o; Py_XDECREF(p->world); p->world = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->userattribs); p->userattribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_Body(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_4Body___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Body(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_4Body___setattr__(o, n, v); } else { return __pyx_f_3ode_4Body___delattr__(o, n); } } static struct PyMethodDef __pyx_methods_3ode_Body[] = { {"setPosition", (PyCFunction)__pyx_f_3ode_4Body_setPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setPosition}, {"getPosition", (PyCFunction)__pyx_f_3ode_4Body_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPosition}, {"setRotation", (PyCFunction)__pyx_f_3ode_4Body_setRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setRotation}, {"getRotation", (PyCFunction)__pyx_f_3ode_4Body_getRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRotation}, {"getQuaternion", (PyCFunction)__pyx_f_3ode_4Body_getQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getQuaternion}, {"setQuaternion", (PyCFunction)__pyx_f_3ode_4Body_setQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setQuaternion}, {"setLinearVel", (PyCFunction)__pyx_f_3ode_4Body_setLinearVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setLinearVel}, {"getLinearVel", (PyCFunction)__pyx_f_3ode_4Body_getLinearVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getLinearVel}, {"setAngularVel", (PyCFunction)__pyx_f_3ode_4Body_setAngularVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setAngularVel}, {"getAngularVel", (PyCFunction)__pyx_f_3ode_4Body_getAngularVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getAngularVel}, {"setMass", (PyCFunction)__pyx_f_3ode_4Body_setMass, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setMass}, {"getMass", (PyCFunction)__pyx_f_3ode_4Body_getMass, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getMass}, {"addForce", (PyCFunction)__pyx_f_3ode_4Body_addForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForce}, {"addTorque", (PyCFunction)__pyx_f_3ode_4Body_addTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addTorque}, {"addRelForce", (PyCFunction)__pyx_f_3ode_4Body_addRelForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForce}, {"addRelTorque", (PyCFunction)__pyx_f_3ode_4Body_addRelTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelTorque}, {"addForceAtPos", (PyCFunction)__pyx_f_3ode_4Body_addForceAtPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForceAtPos}, {"addForceAtRelPos", (PyCFunction)__pyx_f_3ode_4Body_addForceAtRelPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addForceAtRelPos}, {"addRelForceAtPos", (PyCFunction)__pyx_f_3ode_4Body_addRelForceAtPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForceAtPos}, {"addRelForceAtRelPos", (PyCFunction)__pyx_f_3ode_4Body_addRelForceAtRelPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_addRelForceAtRelPos}, {"getForce", (PyCFunction)__pyx_f_3ode_4Body_getForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getForce}, {"getTorque", (PyCFunction)__pyx_f_3ode_4Body_getTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getTorque}, {"setForce", (PyCFunction)__pyx_f_3ode_4Body_setForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setForce}, {"setTorque", (PyCFunction)__pyx_f_3ode_4Body_setTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setTorque}, {"getRelPointPos", (PyCFunction)__pyx_f_3ode_4Body_getRelPointPos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRelPointPos}, {"getRelPointVel", (PyCFunction)__pyx_f_3ode_4Body_getRelPointVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getRelPointVel}, {"getPointVel", (PyCFunction)__pyx_f_3ode_4Body_getPointVel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPointVel}, {"getPosRelPoint", (PyCFunction)__pyx_f_3ode_4Body_getPosRelPoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getPosRelPoint}, {"vectorToWorld", (PyCFunction)__pyx_f_3ode_4Body_vectorToWorld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_vectorToWorld}, {"vectorFromWorld", (PyCFunction)__pyx_f_3ode_4Body_vectorFromWorld, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_vectorFromWorld}, {"enable", (PyCFunction)__pyx_f_3ode_4Body_enable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_enable}, {"disable", (PyCFunction)__pyx_f_3ode_4Body_disable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_disable}, {"isEnabled", (PyCFunction)__pyx_f_3ode_4Body_isEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_isEnabled}, {"setFiniteRotationMode", (PyCFunction)__pyx_f_3ode_4Body_setFiniteRotationMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setFiniteRotationMode}, {"getFiniteRotationMode", (PyCFunction)__pyx_f_3ode_4Body_getFiniteRotationMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getFiniteRotationMode}, {"setFiniteRotationAxis", (PyCFunction)__pyx_f_3ode_4Body_setFiniteRotationAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setFiniteRotationAxis}, {"getFiniteRotationAxis", (PyCFunction)__pyx_f_3ode_4Body_getFiniteRotationAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getFiniteRotationAxis}, {"getNumJoints", (PyCFunction)__pyx_f_3ode_4Body_getNumJoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getNumJoints}, {"setGravityMode", (PyCFunction)__pyx_f_3ode_4Body_setGravityMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_setGravityMode}, {"getGravityMode", (PyCFunction)__pyx_f_3ode_4Body_getGravityMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_4Body_getGravityMode}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Body = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Body = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Body = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Body = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Body = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Body", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Body), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Body, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Body, /*tp_as_number*/ &__pyx_tp_as_sequence_Body, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Body, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_Body, /*tp_getattro*/ __pyx_tp_setattro_3ode_Body, /*tp_setattro*/ &__pyx_tp_as_buffer_Body, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "The rigid body class encapsulating the ODE body.\n\n This class represents a rigid body that has a location and orientation\n in space and that stores the mass properties of an object.\n\n When creating a Body object you have to pass the world it belongs to\n as argument to the constructor::\n\n >>> import ode\n >>> w = ode.World()\n >>> b = ode.Body(w)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Body, /*tp_traverse*/ __pyx_tp_clear_3ode_Body, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Body, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_4Body___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Body, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_JointGroup(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; p->jointlist = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_10JointGroup___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_JointGroup(PyObject *o) { struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_10JointGroup___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->jointlist); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_JointGroup(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; if (p->jointlist) { e = (*v)(p->jointlist, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_JointGroup(PyObject *o) { struct __pyx_obj_3ode_JointGroup *p = (struct __pyx_obj_3ode_JointGroup *)o; Py_XDECREF(p->jointlist); p->jointlist = Py_None; Py_INCREF(Py_None); return 0; } static struct PyMethodDef __pyx_methods_3ode_JointGroup[] = { {"empty", (PyCFunction)__pyx_f_3ode_10JointGroup_empty, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10JointGroup_empty}, {"_addjoint", (PyCFunction)__pyx_f_3ode_10JointGroup__addjoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10JointGroup__addjoint}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_JointGroup = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_JointGroup = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_JointGroup = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_JointGroup = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_JointGroup = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.JointGroup", /*tp_name*/ sizeof(struct __pyx_obj_3ode_JointGroup), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_JointGroup, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_JointGroup, /*tp_as_number*/ &__pyx_tp_as_sequence_JointGroup, /*tp_as_sequence*/ &__pyx_tp_as_mapping_JointGroup, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_JointGroup, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Joint group.\n\n Constructor::\n \n JointGroup() \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_JointGroup, /*tp_traverse*/ __pyx_tp_clear_3ode_JointGroup, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_JointGroup, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10JointGroup___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_JointGroup, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Joint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; p->world = Py_None; Py_INCREF(Py_None); p->body1 = Py_None; Py_INCREF(Py_None); p->body2 = Py_None; Py_INCREF(Py_None); p->userattribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_5Joint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Joint(PyObject *o) { struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_5Joint___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->world); Py_XDECREF(p->body1); Py_XDECREF(p->body2); Py_XDECREF(p->userattribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_Joint(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; if (p->world) { e = (*v)(p->world, a); if (e) return e; } if (p->body1) { e = (*v)(p->body1, a); if (e) return e; } if (p->body2) { e = (*v)(p->body2, a); if (e) return e; } if (p->userattribs) { e = (*v)(p->userattribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_Joint(PyObject *o) { struct __pyx_obj_3ode_Joint *p = (struct __pyx_obj_3ode_Joint *)o; Py_XDECREF(p->world); p->world = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body1); p->body1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body2); p->body2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->userattribs); p->userattribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_Joint(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_5Joint___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_Joint(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_5Joint___setattr__(o, n, v); } else { return __pyx_f_3ode_5Joint___delattr__(o, n); } } static struct PyMethodDef __pyx_methods_3ode_Joint[] = { {"_destroyed", (PyCFunction)__pyx_f_3ode_5Joint__destroyed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint__destroyed}, {"attach", (PyCFunction)__pyx_f_3ode_5Joint_attach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_attach}, {"getBody", (PyCFunction)__pyx_f_3ode_5Joint_getBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_getBody}, {"setFeedback", (PyCFunction)__pyx_f_3ode_5Joint_setFeedback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_setFeedback}, {"getFeedback", (PyCFunction)__pyx_f_3ode_5Joint_getFeedback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_5Joint_getFeedback}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Joint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Joint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Joint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Joint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Joint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Joint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Joint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Joint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Joint, /*tp_as_number*/ &__pyx_tp_as_sequence_Joint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Joint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_Joint, /*tp_getattro*/ __pyx_tp_setattro_3ode_Joint, /*tp_setattro*/ &__pyx_tp_as_buffer_Joint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Base class for all joint classes.", /*tp_doc*/ __pyx_tp_traverse_3ode_Joint, /*tp_traverse*/ __pyx_tp_clear_3ode_Joint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Joint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_5Joint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Joint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_BallJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_9BallJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_BallJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_BallJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_BallJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_BallJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_9BallJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_9BallJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_9BallJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9BallJoint_getAnchor2}, {"setParam", (PyCFunction)__pyx_f_3ode_9BallJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_9BallJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_BallJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_BallJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_BallJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_BallJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_BallJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.BallJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_BallJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_BallJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_BallJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_BallJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_BallJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_BallJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Ball joint.\n\n Constructor::\n \n BallJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_BallJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_BallJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_BallJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9BallJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_BallJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_HingeJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_10HingeJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_HingeJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_HingeJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_HingeJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_HingeJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_10HingeJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAnchor2}, {"setAxis", (PyCFunction)__pyx_f_3ode_10HingeJoint_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAxis}, {"getAngle", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAngle}, {"getAngleRate", (PyCFunction)__pyx_f_3ode_10HingeJoint_getAngleRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getAngleRate}, {"addTorque", (PyCFunction)__pyx_f_3ode_10HingeJoint_addTorque, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_addTorque}, {"setParam", (PyCFunction)__pyx_f_3ode_10HingeJoint_setParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_setParam}, {"getParam", (PyCFunction)__pyx_f_3ode_10HingeJoint_getParam, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10HingeJoint_getParam}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_HingeJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_HingeJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_HingeJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_HingeJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_HingeJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.HingeJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_HingeJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_HingeJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_HingeJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_HingeJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_HingeJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_HingeJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Hinge joint.\n\n Constructor::\n \n HingeJoint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_HingeJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_HingeJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_HingeJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10HingeJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_HingeJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SliderJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_11SliderJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SliderJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SliderJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SliderJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SliderJoint[] = { {"setAxis", (PyCFunction)__pyx_f_3ode_11SliderJoint_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_11SliderJoint_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getAxis}, {"getPosition", (PyCFunction)__pyx_f_3ode_11SliderJoint_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getPosition}, {"getPositionRate", (PyCFunction)__pyx_f_3ode_11SliderJoint_getPositionRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_getPositionRate}, {"addForce", (PyCFunction)__pyx_f_3ode_11SliderJoint_addForce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11SliderJoint_addForce}, {"setParam", (PyCFunction)__pyx_f_3ode_11SliderJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_11SliderJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SliderJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SliderJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SliderJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SliderJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SliderJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SliderJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SliderJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SliderJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SliderJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_SliderJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SliderJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SliderJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Slider joint.\n \n Constructor::\n \n SlideJoint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SliderJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_SliderJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SliderJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11SliderJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SliderJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_UniversalJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_14UniversalJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_UniversalJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_UniversalJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_UniversalJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_UniversalJoint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAnchor2}, {"setAxis1", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAxis1}, {"getAxis1", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAxis1}, {"setAxis2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_setAxis2}, {"getAxis2", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_getAxis2}, {"addTorques", (PyCFunction)__pyx_f_3ode_14UniversalJoint_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_14UniversalJoint_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_14UniversalJoint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_14UniversalJoint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_UniversalJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_UniversalJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_UniversalJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_UniversalJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_UniversalJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.UniversalJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_UniversalJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_UniversalJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_UniversalJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_UniversalJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_UniversalJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_UniversalJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Universal joint.\n\n Constructor::\n \n UniversalJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_UniversalJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_UniversalJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_UniversalJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_14UniversalJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_UniversalJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Hinge2Joint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_11Hinge2Joint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Hinge2Joint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_Hinge2Joint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_Hinge2Joint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_Hinge2Joint[] = { {"setAnchor", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAnchor}, {"getAnchor", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAnchor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAnchor}, {"getAnchor2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAnchor2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAnchor2}, {"setAxis1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAxis1}, {"getAxis1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAxis1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAxis1}, {"setAxis2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_setAxis2}, {"getAxis2", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAxis2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAxis2}, {"getAngle1", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle1}, {"getAngle1Rate", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle1Rate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle1Rate}, {"getAngle2Rate", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getAngle2Rate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_getAngle2Rate}, {"addTorques", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11Hinge2Joint_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_11Hinge2Joint_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Hinge2Joint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Hinge2Joint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Hinge2Joint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Hinge2Joint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Hinge2Joint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Hinge2Joint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Hinge2Joint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Hinge2Joint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Hinge2Joint, /*tp_as_number*/ &__pyx_tp_as_sequence_Hinge2Joint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Hinge2Joint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Hinge2Joint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Hinge2 joint.\n\n Constructor::\n \n Hinge2Joint(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Hinge2Joint, /*tp_traverse*/ __pyx_tp_clear_3ode_Hinge2Joint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Hinge2Joint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11Hinge2Joint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Hinge2Joint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_FixedJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_10FixedJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_FixedJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_FixedJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_FixedJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_FixedJoint[] = { {"setFixed", (PyCFunction)__pyx_f_3ode_10FixedJoint_setFixed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10FixedJoint_setFixed}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_FixedJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_FixedJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_FixedJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_FixedJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_FixedJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.FixedJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_FixedJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_FixedJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_FixedJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_FixedJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_FixedJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_FixedJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Fixed joint.\n\n Constructor::\n \n FixedJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_FixedJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_FixedJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_FixedJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10FixedJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_FixedJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_ContactJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_12ContactJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_ContactJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_ContactJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_ContactJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_ContactJoint[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_ContactJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_ContactJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_ContactJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_ContactJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_ContactJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.ContactJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_ContactJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_ContactJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_ContactJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_ContactJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_ContactJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_ContactJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Contact joint.\n\n Constructor::\n \n ContactJoint(world, jointgroup, contact)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_ContactJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_ContactJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_ContactJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12ContactJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_ContactJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_AMotor(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_6AMotor___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_AMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_AMotor(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_AMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_AMotor[] = { {"setMode", (PyCFunction)__pyx_f_3ode_6AMotor_setMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setMode}, {"getMode", (PyCFunction)__pyx_f_3ode_6AMotor_getMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getMode}, {"setNumAxes", (PyCFunction)__pyx_f_3ode_6AMotor_setNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setNumAxes}, {"getNumAxes", (PyCFunction)__pyx_f_3ode_6AMotor_getNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getNumAxes}, {"setAxis", (PyCFunction)__pyx_f_3ode_6AMotor_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_6AMotor_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAxis}, {"getAxisRel", (PyCFunction)__pyx_f_3ode_6AMotor_getAxisRel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAxisRel}, {"setAngle", (PyCFunction)__pyx_f_3ode_6AMotor_setAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_setAngle}, {"getAngle", (PyCFunction)__pyx_f_3ode_6AMotor_getAngle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAngle}, {"getAngleRate", (PyCFunction)__pyx_f_3ode_6AMotor_getAngleRate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_getAngleRate}, {"addTorques", (PyCFunction)__pyx_f_3ode_6AMotor_addTorques, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6AMotor_addTorques}, {"setParam", (PyCFunction)__pyx_f_3ode_6AMotor_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_6AMotor_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_AMotor = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_AMotor = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_AMotor = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_AMotor = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_AMotor = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.AMotor", /*tp_name*/ sizeof(struct __pyx_obj_3ode_AMotor), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_AMotor, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_AMotor, /*tp_as_number*/ &__pyx_tp_as_sequence_AMotor, /*tp_as_sequence*/ &__pyx_tp_as_mapping_AMotor, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_AMotor, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "AMotor joint.\n \n Constructor::\n \n AMotor(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_AMotor, /*tp_traverse*/ __pyx_tp_clear_3ode_AMotor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_AMotor, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_6AMotor___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_AMotor, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_LMotor(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_6LMotor___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_LMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_LMotor(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_LMotor(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_LMotor[] = { {"setNumAxes", (PyCFunction)__pyx_f_3ode_6LMotor_setNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_setNumAxes}, {"getNumAxes", (PyCFunction)__pyx_f_3ode_6LMotor_getNumAxes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_getNumAxes}, {"setAxis", (PyCFunction)__pyx_f_3ode_6LMotor_setAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_setAxis}, {"getAxis", (PyCFunction)__pyx_f_3ode_6LMotor_getAxis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_6LMotor_getAxis}, {"setParam", (PyCFunction)__pyx_f_3ode_6LMotor_setParam, METH_VARARGS|METH_KEYWORDS, 0}, {"getParam", (PyCFunction)__pyx_f_3ode_6LMotor_getParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_LMotor = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_LMotor = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_LMotor = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_LMotor = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_LMotor = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.LMotor", /*tp_name*/ sizeof(struct __pyx_obj_3ode_LMotor), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_LMotor, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_LMotor, /*tp_as_number*/ &__pyx_tp_as_sequence_LMotor, /*tp_as_sequence*/ &__pyx_tp_as_mapping_LMotor, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_LMotor, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "LMotor joint.\n \n Constructor::\n \n LMotor(world, jointgroup=None)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_LMotor, /*tp_traverse*/ __pyx_tp_clear_3ode_LMotor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_LMotor, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_6LMotor___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_LMotor, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_Plane2DJoint(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_Joint->tp_new(t, a, k); if (__pyx_f_3ode_12Plane2DJoint___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_Plane2DJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_Plane2DJoint(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_Joint->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_Plane2DJoint(PyObject *o) { __pyx_ptype_3ode_Joint->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_Plane2DJoint[] = { {"setXParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setXParam, METH_VARARGS|METH_KEYWORDS, 0}, {"setYParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setYParam, METH_VARARGS|METH_KEYWORDS, 0}, {"setAngleParam", (PyCFunction)__pyx_f_3ode_12Plane2DJoint_setAngleParam, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Plane2DJoint = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_Plane2DJoint = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Plane2DJoint = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Plane2DJoint = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_Plane2DJoint = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.Plane2DJoint", /*tp_name*/ sizeof(struct __pyx_obj_3ode_Plane2DJoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_Plane2DJoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Plane2DJoint, /*tp_as_number*/ &__pyx_tp_as_sequence_Plane2DJoint, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Plane2DJoint, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Plane2DJoint, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plane-2D Joint.\n\n Constructor::\n \n Plane2DJoint(world, jointgroup=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_Plane2DJoint, /*tp_traverse*/ __pyx_tp_clear_3ode_Plane2DJoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_Plane2DJoint, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12Plane2DJoint___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_Plane2DJoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomObject(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; p->space = Py_None; Py_INCREF(Py_None); p->body = Py_None; Py_INCREF(Py_None); p->attribs = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_10GeomObject___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomObject(PyObject *o) { struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_10GeomObject___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } Py_XDECREF(p->space); Py_XDECREF(p->body); Py_XDECREF(p->attribs); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_GeomObject(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; if (p->space) { e = (*v)(p->space, a); if (e) return e; } if (p->body) { e = (*v)(p->body, a); if (e) return e; } if (p->attribs) { e = (*v)(p->attribs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_GeomObject(PyObject *o) { struct __pyx_obj_3ode_GeomObject *p = (struct __pyx_obj_3ode_GeomObject *)o; Py_XDECREF(p->space); p->space = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->body); p->body = Py_None; Py_INCREF(Py_None); Py_XDECREF(p->attribs); p->attribs = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_tp_getattro_3ode_GeomObject(PyObject *o, PyObject *n) { PyObject *v = PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_f_3ode_10GeomObject___getattr__(o, n); } return v; } static int __pyx_tp_setattro_3ode_GeomObject(PyObject *o, PyObject *n, PyObject *v) { if (v) { return __pyx_f_3ode_10GeomObject___setattr__(o, n, v); } else { return PyObject_GenericSetAttr(o, n, 0); } } static struct PyMethodDef __pyx_methods_3ode_GeomObject[] = { {"_id", (PyCFunction)__pyx_f_3ode_10GeomObject__id, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject__id}, {"placeable", (PyCFunction)__pyx_f_3ode_10GeomObject_placeable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_placeable}, {"setBody", (PyCFunction)__pyx_f_3ode_10GeomObject_setBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setBody}, {"getBody", (PyCFunction)__pyx_f_3ode_10GeomObject_getBody, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getBody}, {"setPosition", (PyCFunction)__pyx_f_3ode_10GeomObject_setPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setPosition}, {"getPosition", (PyCFunction)__pyx_f_3ode_10GeomObject_getPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getPosition}, {"setRotation", (PyCFunction)__pyx_f_3ode_10GeomObject_setRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setRotation}, {"getRotation", (PyCFunction)__pyx_f_3ode_10GeomObject_getRotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getRotation}, {"getQuaternion", (PyCFunction)__pyx_f_3ode_10GeomObject_getQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getQuaternion}, {"setQuaternion", (PyCFunction)__pyx_f_3ode_10GeomObject_setQuaternion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setQuaternion}, {"getAABB", (PyCFunction)__pyx_f_3ode_10GeomObject_getAABB, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getAABB}, {"isSpace", (PyCFunction)__pyx_f_3ode_10GeomObject_isSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_isSpace}, {"getSpace", (PyCFunction)__pyx_f_3ode_10GeomObject_getSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getSpace}, {"setCollideBits", (PyCFunction)__pyx_f_3ode_10GeomObject_setCollideBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setCollideBits}, {"setCategoryBits", (PyCFunction)__pyx_f_3ode_10GeomObject_setCategoryBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_setCategoryBits}, {"getCollideBits", (PyCFunction)__pyx_f_3ode_10GeomObject_getCollideBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getCollideBits}, {"getCategoryBits", (PyCFunction)__pyx_f_3ode_10GeomObject_getCategoryBits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_getCategoryBits}, {"enable", (PyCFunction)__pyx_f_3ode_10GeomObject_enable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_enable}, {"disable", (PyCFunction)__pyx_f_3ode_10GeomObject_disable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_disable}, {"isEnabled", (PyCFunction)__pyx_f_3ode_10GeomObject_isEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomObject_isEnabled}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomObject = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomObject = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomObject = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomObject = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomObject = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomObject", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomObject, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomObject, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomObject, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomObject, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_3ode_GeomObject, /*tp_getattro*/ __pyx_tp_setattro_3ode_GeomObject, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomObject, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This is the abstract base class for all geom objects.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomObject, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomObject, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomObject, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10GeomObject___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomObject, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SpaceBase(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_9SpaceBase___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SpaceBase(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_9SpaceBase___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SpaceBase(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SpaceBase(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SpaceBase[] = { {"_id", (PyCFunction)__pyx_f_3ode_9SpaceBase__id, METH_VARARGS|METH_KEYWORDS, 0}, {"add", (PyCFunction)__pyx_f_3ode_9SpaceBase_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_add}, {"remove", (PyCFunction)__pyx_f_3ode_9SpaceBase_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_remove}, {"query", (PyCFunction)__pyx_f_3ode_9SpaceBase_query, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_query}, {"getNumGeoms", (PyCFunction)__pyx_f_3ode_9SpaceBase_getNumGeoms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_getNumGeoms}, {"getGeom", (PyCFunction)__pyx_f_3ode_9SpaceBase_getGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_getGeom}, {"collide", (PyCFunction)__pyx_f_3ode_9SpaceBase_collide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9SpaceBase_collide}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SpaceBase = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SpaceBase = { __pyx_f_3ode_9SpaceBase___len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SpaceBase = { __pyx_f_3ode_9SpaceBase___len__, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SpaceBase = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SpaceBase = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SpaceBase", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SpaceBase), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SpaceBase, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SpaceBase, /*tp_as_number*/ &__pyx_tp_as_sequence_SpaceBase, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SpaceBase, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SpaceBase, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Space class (container for geometry objects).\n\n A Space object is a container for geometry objects which are used\n to do collision detection.\n The space does high level collision culling, which means that it\n can identify which pairs of geometry objects are potentially\n touching.\n\n This Space class can be used for both, a SimpleSpace and a HashSpace\n (see ODE documentation).\n\n >>> space = Space(type=0) # Create a SimpleSpace\n >>> space = Space(type=1) # Create a HashSpace\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SpaceBase, /*tp_traverse*/ __pyx_tp_clear_3ode_SpaceBase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_3ode_9SpaceBase___iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SpaceBase, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9SpaceBase___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SpaceBase, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_SimpleSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_11SimpleSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_SimpleSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_SimpleSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_SimpleSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_SimpleSpace[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_SimpleSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_SimpleSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_SimpleSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_SimpleSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_SimpleSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.SimpleSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_SimpleSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_SimpleSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_SimpleSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_SimpleSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_SimpleSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_SimpleSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Simple space.\n\n This does not do any collision culling - it simply checks every\n possible pair of geoms for intersection, and reports the pairs\n whose AABBs overlap. The time required to do intersection testing\n for n objects is O(n**2). This should not be used for large numbers\n of objects, but it can be the preferred algorithm for a small\n number of objects. This is also useful for debugging potential\n problems with the collision system.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_SimpleSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_SimpleSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_SimpleSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11SimpleSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_SimpleSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_HashSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_9HashSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_HashSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_HashSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_HashSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_HashSpace[] = { {"setLevels", (PyCFunction)__pyx_f_3ode_9HashSpace_setLevels, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9HashSpace_setLevels}, {"getLevels", (PyCFunction)__pyx_f_3ode_9HashSpace_getLevels, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9HashSpace_getLevels}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_HashSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_HashSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_HashSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_HashSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_HashSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.HashSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_HashSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_HashSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_HashSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_HashSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_HashSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_HashSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Multi-resolution hash table space.\n\n This uses an internal data structure that records how each geom\n overlaps cells in one of several three dimensional grids. Each\n grid has cubical cells of side lengths 2**i, where i is an integer\n that ranges from a minimum to a maximum value. The time required\n to do intersection testing for n objects is O(n) (as long as those\n objects are not clustered together too closely), as each object\n can be quickly paired with the objects around it.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_HashSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_HashSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_HashSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9HashSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_HashSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_QuadTreeSpace(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_SpaceBase->tp_new(t, a, k); if (__pyx_f_3ode_13QuadTreeSpace___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_QuadTreeSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_QuadTreeSpace(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_SpaceBase->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_QuadTreeSpace(PyObject *o) { __pyx_ptype_3ode_SpaceBase->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_QuadTreeSpace[] = { {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_QuadTreeSpace = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_QuadTreeSpace = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_QuadTreeSpace = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_QuadTreeSpace = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_QuadTreeSpace = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.QuadTreeSpace", /*tp_name*/ sizeof(struct __pyx_obj_3ode_QuadTreeSpace), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_QuadTreeSpace, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_QuadTreeSpace, /*tp_as_number*/ &__pyx_tp_as_sequence_QuadTreeSpace, /*tp_as_sequence*/ &__pyx_tp_as_mapping_QuadTreeSpace, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_QuadTreeSpace, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Quadtree space.\n\n This uses a pre-allocated hierarchical grid-based AABB tree to\n quickly cull collision checks. It\'s exceptionally quick for large\n amounts of objects in landscape-shaped worlds. The amount of\n memory used is 4**depth * 32 bytes.\n\n Currently getGeom() is not implemented for the quadtree space.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_QuadTreeSpace, /*tp_traverse*/ __pyx_tp_clear_3ode_QuadTreeSpace, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_QuadTreeSpace, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_13QuadTreeSpace___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_QuadTreeSpace, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomSphere(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_10GeomSphere___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomSphere(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomSphere(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomSphere(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomSphere[] = { {"placeable", (PyCFunction)__pyx_f_3ode_10GeomSphere_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_10GeomSphere__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setRadius", (PyCFunction)__pyx_f_3ode_10GeomSphere_setRadius, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_setRadius}, {"getRadius", (PyCFunction)__pyx_f_3ode_10GeomSphere_getRadius, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_getRadius}, {"pointDepth", (PyCFunction)__pyx_f_3ode_10GeomSphere_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_10GeomSphere_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomSphere = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomSphere = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomSphere = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomSphere = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomSphere = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomSphere", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomSphere), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomSphere, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomSphere, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomSphere, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomSphere, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomSphere, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Sphere geometry.\n\n This class represents a sphere centered at the origin.\n\n Constructor::\n \n GeomSphere(space=None, radius=1.0)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomSphere, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomSphere, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomSphere, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_10GeomSphere___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomSphere, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomBox(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_7GeomBox___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomBox(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomBox(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomBox(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomBox[] = { {"placeable", (PyCFunction)__pyx_f_3ode_7GeomBox_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_7GeomBox__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setLengths", (PyCFunction)__pyx_f_3ode_7GeomBox_setLengths, METH_VARARGS|METH_KEYWORDS, 0}, {"getLengths", (PyCFunction)__pyx_f_3ode_7GeomBox_getLengths, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_7GeomBox_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_7GeomBox_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomBox = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomBox = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomBox = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomBox = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomBox = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomBox", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomBox), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomBox, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomBox, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomBox, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomBox, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomBox, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Box geometry.\n\n This class represents a box centered at the origin.\n\n Constructor::\n \n GeomBox(space=None, lengths=(1.0, 1.0, 1.0))\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomBox, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomBox, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomBox, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_7GeomBox___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomBox, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomPlane(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_9GeomPlane___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomPlane(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomPlane(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomPlane(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomPlane[] = { {"_id", (PyCFunction)__pyx_f_3ode_9GeomPlane__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_9GeomPlane_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_9GeomPlane_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_9GeomPlane_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_9GeomPlane_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomPlane = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomPlane = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomPlane = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomPlane = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomPlane = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomPlane", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomPlane), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomPlane, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomPlane, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomPlane, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomPlane, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomPlane, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plane geometry.\n\n This class represents an infinite plane. The plane equation is:\n n.x*x + n.y*y + n.z*z = dist\n\n This object can\'t be attached to a body.\n If you call getBody() on this object it always returns ode.environment.\n\n Constructor::\n \n GeomPlane(space=None, normal=(0,0,1), dist=0)\n\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomPlane, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomPlane, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomPlane, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_9GeomPlane___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomPlane, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomCapsule(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_11GeomCapsule___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomCapsule(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomCapsule(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomCapsule(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomCapsule[] = { {"placeable", (PyCFunction)__pyx_f_3ode_11GeomCapsule_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_11GeomCapsule__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_11GeomCapsule_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_11GeomCapsule_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {"pointDepth", (PyCFunction)__pyx_f_3ode_11GeomCapsule_pointDepth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11GeomCapsule_pointDepth}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomCapsule = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomCapsule = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomCapsule = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomCapsule = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomCapsule = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomCapsule", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomCapsule), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomCapsule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomCapsule, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomCapsule, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomCapsule, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomCapsule, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Capped cylinder geometry.\n\n This class represents a capped cylinder aligned along the local Z axis\n and centered at the origin.\n\n Constructor::\n \n GeomCapsule(space=None, radius=0.5, length=1.0)\n\n The length parameter does not include the caps.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomCapsule, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomCapsule, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomCapsule, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11GeomCapsule___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomCapsule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomCylinder(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_12GeomCylinder___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomCylinder(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomCylinder(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomCylinder(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomCylinder[] = { {"placeable", (PyCFunction)__pyx_f_3ode_12GeomCylinder_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_12GeomCylinder__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setParams", (PyCFunction)__pyx_f_3ode_12GeomCylinder_setParams, METH_VARARGS|METH_KEYWORDS, 0}, {"getParams", (PyCFunction)__pyx_f_3ode_12GeomCylinder_getParams, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomCylinder = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomCylinder = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomCylinder = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomCylinder = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomCylinder = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomCylinder", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomCylinder), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomCylinder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomCylinder, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomCylinder, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomCylinder, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomCylinder, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Plain cylinder geometry.\n\n This class represents an uncapped cylinder aligned along the local Z axis\n and centered at the origin.\n\n Constructor::\n \n GeomCylinder(space=None, radius=0.5, length=1.0)\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomCylinder, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomCylinder, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomCylinder, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_12GeomCylinder___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomCylinder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomRay(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); if (__pyx_f_3ode_7GeomRay___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomRay(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomRay(PyObject *o, visitproc v, void *a) { int e; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; return 0; } static int __pyx_tp_clear_3ode_GeomRay(PyObject *o) { __pyx_ptype_3ode_GeomObject->tp_clear(o); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomRay[] = { {"_id", (PyCFunction)__pyx_f_3ode_7GeomRay__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setLength", (PyCFunction)__pyx_f_3ode_7GeomRay_setLength, METH_VARARGS|METH_KEYWORDS, 0}, {"getLength", (PyCFunction)__pyx_f_3ode_7GeomRay_getLength, METH_VARARGS|METH_KEYWORDS, 0}, {"set", (PyCFunction)__pyx_f_3ode_7GeomRay_set, METH_VARARGS|METH_KEYWORDS, 0}, {"get", (PyCFunction)__pyx_f_3ode_7GeomRay_get, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomRay = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomRay = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomRay = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomRay = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomRay = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomRay", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomRay), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomRay, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomRay, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomRay, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomRay, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomRay, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Ray object.\n\n A ray is different from all the other geom classes in that it does\n not represent a solid object. It is an infinitely thin line that\n starts from the geom\'s position and extends in the direction of\n the geom\'s local Z-axis.\n\n Constructor::\n \n GeomRay(space=None, rlen=1.0)\n \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomRay, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomRay, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomRay, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_7GeomRay___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomRay, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomTransform(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; p->geom = Py_None; Py_INCREF(Py_None); if (__pyx_f_3ode_13GeomTransform___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomTransform(PyObject *o) { struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; Py_XDECREF(p->geom); __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomTransform(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; if (p->geom) { e = (*v)(p->geom, a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_GeomTransform(PyObject *o) { struct __pyx_obj_3ode_GeomTransform *p = (struct __pyx_obj_3ode_GeomTransform *)o; __pyx_ptype_3ode_GeomObject->tp_clear(o); Py_XDECREF(p->geom); p->geom = Py_None; Py_INCREF(Py_None); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomTransform[] = { {"placeable", (PyCFunction)__pyx_f_3ode_13GeomTransform_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_13GeomTransform__id, METH_VARARGS|METH_KEYWORDS, 0}, {"setGeom", (PyCFunction)__pyx_f_3ode_13GeomTransform_setGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_setGeom}, {"getGeom", (PyCFunction)__pyx_f_3ode_13GeomTransform_getGeom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_getGeom}, {"setInfo", (PyCFunction)__pyx_f_3ode_13GeomTransform_setInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_setInfo}, {"getInfo", (PyCFunction)__pyx_f_3ode_13GeomTransform_getInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_13GeomTransform_getInfo}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomTransform = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomTransform = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomTransform = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomTransform = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomTransform = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomTransform", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomTransform), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomTransform, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomTransform, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomTransform, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomTransform, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomTransform, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "GeomTransform.\n\n A geometry transform \"T\" is a geom that encapsulates another geom\n \"E\", allowing E to be positioned and rotated arbitrarily with\n respect to its point of reference.\n\n Constructor::\n \n GeomTransform(space=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomTransform, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomTransform, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomTransform, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_13GeomTransform___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomTransform, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_TriMeshData(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (__pyx_f_3ode_11TriMeshData___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_TriMeshData(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++o->ob_refcnt; __pyx_f_3ode_11TriMeshData___dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --o->ob_refcnt; PyErr_Restore(etype, eval, etb); } (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_3ode_TriMeshData(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_3ode_TriMeshData(PyObject *o) { return 0; } static struct PyMethodDef __pyx_methods_3ode_TriMeshData[] = { {"build", (PyCFunction)__pyx_f_3ode_11TriMeshData_build, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11TriMeshData_build}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_TriMeshData = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_TriMeshData = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_TriMeshData = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_TriMeshData = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_TriMeshData = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.TriMeshData", /*tp_name*/ sizeof(struct __pyx_obj_3ode_TriMeshData), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_TriMeshData, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_TriMeshData, /*tp_as_number*/ &__pyx_tp_as_sequence_TriMeshData, /*tp_as_sequence*/ &__pyx_tp_as_mapping_TriMeshData, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_TriMeshData, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "This class stores the mesh data.\n ", /*tp_doc*/ __pyx_tp_traverse_3ode_TriMeshData, /*tp_traverse*/ __pyx_tp_clear_3ode_TriMeshData, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_TriMeshData, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_TriMeshData, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_3ode_GeomTriMesh(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_ptype_3ode_GeomObject->tp_new(t, a, k); struct __pyx_obj_3ode_GeomTriMesh *p = (struct __pyx_obj_3ode_GeomTriMesh *)o; p->data = ((struct __pyx_obj_3ode_TriMeshData *)Py_None); Py_INCREF(Py_None); if (__pyx_f_3ode_11GeomTriMesh___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_3ode_GeomTriMesh(PyObject *o) { struct __pyx_obj_3ode_GeomTriMesh *p = (struct __pyx_obj_3ode_GeomTriMesh *)o; Py_XDECREF(((PyObject *)p->data)); __pyx_ptype_3ode_GeomObject->tp_dealloc(o); } static int __pyx_tp_traverse_3ode_GeomTriMesh(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_3ode_GeomTriMesh *p = (struct __pyx_obj_3ode_GeomTriMesh *)o; e = __pyx_ptype_3ode_GeomObject->tp_traverse(o, v, a); if (e) return e; if (p->data) { e = (*v)(((PyObject*)p->data), a); if (e) return e; } return 0; } static int __pyx_tp_clear_3ode_GeomTriMesh(PyObject *o) { struct __pyx_obj_3ode_GeomTriMesh *p = (struct __pyx_obj_3ode_GeomTriMesh *)o; __pyx_ptype_3ode_GeomObject->tp_clear(o); Py_XDECREF(((PyObject *)p->data)); p->data = ((struct __pyx_obj_3ode_TriMeshData *)Py_None); Py_INCREF(Py_None); return 0; } static struct PyMethodDef __pyx_methods_3ode_GeomTriMesh[] = { {"placeable", (PyCFunction)__pyx_f_3ode_11GeomTriMesh_placeable, METH_VARARGS|METH_KEYWORDS, 0}, {"_id", (PyCFunction)__pyx_f_3ode_11GeomTriMesh__id, METH_VARARGS|METH_KEYWORDS, 0}, {"clearTCCache", (PyCFunction)__pyx_f_3ode_11GeomTriMesh_clearTCCache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11GeomTriMesh_clearTCCache}, {"getTriangle", (PyCFunction)__pyx_f_3ode_11GeomTriMesh_getTriangle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_11GeomTriMesh_getTriangle}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_GeomTriMesh = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ }; static PySequenceMethods __pyx_tp_as_sequence_GeomTriMesh = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_GeomTriMesh = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_GeomTriMesh = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_3ode_GeomTriMesh = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "ode.GeomTriMesh", /*tp_name*/ sizeof(struct __pyx_obj_3ode_GeomTriMesh), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_3ode_GeomTriMesh, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_GeomTriMesh, /*tp_as_number*/ &__pyx_tp_as_sequence_GeomTriMesh, /*tp_as_sequence*/ &__pyx_tp_as_mapping_GeomTriMesh, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_GeomTriMesh, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "TriMesh object.\n\n To construct the trimesh geom you need a TriMeshData object that\n stores the actual mesh. This object has to be passed as first\n argument to the constructor.\n\n Constructor::\n \n GeomTriMesh(data, space=None) \n ", /*tp_doc*/ __pyx_tp_traverse_3ode_GeomTriMesh, /*tp_traverse*/ __pyx_tp_clear_3ode_GeomTriMesh, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_3ode_GeomTriMesh, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_3ode_11GeomTriMesh___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_3ode_GeomTriMesh, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static struct PyMethodDef __pyx_methods[] = { {"Space", (PyCFunction)__pyx_f_3ode_Space, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_Space}, {"collide", (PyCFunction)__pyx_f_3ode_collide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_collide}, {"collide2", (PyCFunction)__pyx_f_3ode_collide2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_collide2}, {"areConnected", (PyCFunction)__pyx_f_3ode_areConnected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_areConnected}, {"CloseODE", (PyCFunction)__pyx_f_3ode_CloseODE, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ode_CloseODE}, {0, 0, 0, 0} }; static void __pyx_init_filenames(void); /*proto*/ PyMODINIT_FUNC initode(void); /*proto*/ PyMODINIT_FUNC initode(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; PyObject *__pyx_7 = 0; PyObject *__pyx_8 = 0; PyObject *__pyx_9 = 0; PyObject *__pyx_10 = 0; PyObject *__pyx_11 = 0; PyObject *__pyx_12 = 0; PyObject *__pyx_13 = 0; PyObject *__pyx_14 = 0; PyObject *__pyx_15 = 0; PyObject *__pyx_16 = 0; PyObject *__pyx_17 = 0; PyObject *__pyx_18 = 0; PyObject *__pyx_19 = 0; PyObject *__pyx_20 = 0; __pyx_init_filenames(); __pyx_m = Py_InitModule4("ode", __pyx_methods, 0, 0, PYTHON_API_VERSION); if (!__pyx_m) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 26; goto __pyx_L1;}; __pyx_b = PyImport_AddModule("__builtin__"); if (!__pyx_b) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 26; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 26; goto __pyx_L1;}; if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 26; goto __pyx_L1;}; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 26; goto __pyx_L1;}; if (PyType_Ready(&__pyx_type_3ode_Mass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Mass", (PyObject *)&__pyx_type_3ode_Mass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} __pyx_ptype_3ode_Mass = &__pyx_type_3ode_Mass; if (PyType_Ready(&__pyx_type_3ode_Contact) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Contact", (PyObject *)&__pyx_type_3ode_Contact) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_Contact = &__pyx_type_3ode_Contact; if (PyType_Ready(&__pyx_type_3ode_World) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "World", (PyObject *)&__pyx_type_3ode_World) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_World = &__pyx_type_3ode_World; __pyx_type_3ode_Body.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_Body) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Body", (PyObject *)&__pyx_type_3ode_Body) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_Body = &__pyx_type_3ode_Body; __pyx_type_3ode_JointGroup.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_JointGroup) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "JointGroup", (PyObject *)&__pyx_type_3ode_JointGroup) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; goto __pyx_L1;} __pyx_ptype_3ode_JointGroup = &__pyx_type_3ode_JointGroup; __pyx_type_3ode_Joint.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Joint", (PyObject *)&__pyx_type_3ode_Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; goto __pyx_L1;} __pyx_ptype_3ode_Joint = &__pyx_type_3ode_Joint; __pyx_type_3ode_BallJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_BallJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 258; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "BallJoint", (PyObject *)&__pyx_type_3ode_BallJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 258; goto __pyx_L1;} __pyx_ptype_3ode_BallJoint = &__pyx_type_3ode_BallJoint; __pyx_type_3ode_HingeJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_HingeJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 330; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "HingeJoint", (PyObject *)&__pyx_type_3ode_HingeJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 330; goto __pyx_L1;} __pyx_ptype_3ode_HingeJoint = &__pyx_type_3ode_HingeJoint; __pyx_type_3ode_SliderJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_SliderJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 484; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SliderJoint", (PyObject *)&__pyx_type_3ode_SliderJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 484; goto __pyx_L1;} __pyx_ptype_3ode_SliderJoint = &__pyx_type_3ode_SliderJoint; __pyx_type_3ode_UniversalJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_UniversalJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 570; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "UniversalJoint", (PyObject *)&__pyx_type_3ode_UniversalJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 570; goto __pyx_L1;} __pyx_ptype_3ode_UniversalJoint = &__pyx_type_3ode_UniversalJoint; __pyx_type_3ode_Hinge2Joint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_Hinge2Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 697; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Hinge2Joint", (PyObject *)&__pyx_type_3ode_Hinge2Joint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 697; goto __pyx_L1;} __pyx_ptype_3ode_Hinge2Joint = &__pyx_type_3ode_Hinge2Joint; __pyx_type_3ode_FixedJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_FixedJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 853; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "FixedJoint", (PyObject *)&__pyx_type_3ode_FixedJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 853; goto __pyx_L1;} __pyx_ptype_3ode_FixedJoint = &__pyx_type_3ode_FixedJoint; __pyx_type_3ode_ContactJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_ContactJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 888; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "ContactJoint", (PyObject *)&__pyx_type_3ode_ContactJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 888; goto __pyx_L1;} __pyx_ptype_3ode_ContactJoint = &__pyx_type_3ode_ContactJoint; __pyx_type_3ode_AMotor.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_AMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 911; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "AMotor", (PyObject *)&__pyx_type_3ode_AMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 911; goto __pyx_L1;} __pyx_ptype_3ode_AMotor = &__pyx_type_3ode_AMotor; __pyx_type_3ode_LMotor.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_LMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1084; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "LMotor", (PyObject *)&__pyx_type_3ode_LMotor) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1084; goto __pyx_L1;} __pyx_ptype_3ode_LMotor = &__pyx_type_3ode_LMotor; __pyx_type_3ode_Plane2DJoint.tp_base = __pyx_ptype_3ode_Joint; if (PyType_Ready(&__pyx_type_3ode_Plane2DJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1173; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Plane2DJoint", (PyObject *)&__pyx_type_3ode_Plane2DJoint) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1173; goto __pyx_L1;} __pyx_ptype_3ode_Plane2DJoint = &__pyx_type_3ode_Plane2DJoint; __pyx_type_3ode_GeomObject.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_GeomObject) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomObject", (PyObject *)&__pyx_type_3ode_GeomObject) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; goto __pyx_L1;} __pyx_ptype_3ode_GeomObject = &__pyx_type_3ode_GeomObject; __pyx_type_3ode_SpaceBase.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_SpaceBase) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SpaceBase", (PyObject *)&__pyx_type_3ode_SpaceBase) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; goto __pyx_L1;} __pyx_ptype_3ode_SpaceBase = &__pyx_type_3ode_SpaceBase; __pyx_type_3ode_SimpleSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_SimpleSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "SimpleSpace", (PyObject *)&__pyx_type_3ode_SimpleSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 221; goto __pyx_L1;} __pyx_ptype_3ode_SimpleSpace = &__pyx_type_3ode_SimpleSpace; __pyx_type_3ode_HashSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_HashSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 254; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "HashSpace", (PyObject *)&__pyx_type_3ode_HashSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 254; goto __pyx_L1;} __pyx_ptype_3ode_HashSpace = &__pyx_type_3ode_HashSpace; __pyx_type_3ode_QuadTreeSpace.tp_base = __pyx_ptype_3ode_SpaceBase; if (PyType_Ready(&__pyx_type_3ode_QuadTreeSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 314; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "QuadTreeSpace", (PyObject *)&__pyx_type_3ode_QuadTreeSpace) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 314; goto __pyx_L1;} __pyx_ptype_3ode_QuadTreeSpace = &__pyx_type_3ode_QuadTreeSpace; __pyx_type_3ode_GeomSphere.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomSphere) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 23; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomSphere", (PyObject *)&__pyx_type_3ode_GeomSphere) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_ptype_3ode_GeomSphere = &__pyx_type_3ode_GeomSphere; __pyx_type_3ode_GeomBox.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomBox) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 92; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomBox", (PyObject *)&__pyx_type_3ode_GeomBox) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 92; goto __pyx_L1;} __pyx_ptype_3ode_GeomBox = &__pyx_type_3ode_GeomBox; __pyx_type_3ode_GeomPlane.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomPlane) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomPlane", (PyObject *)&__pyx_type_3ode_GeomPlane) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_ptype_3ode_GeomPlane = &__pyx_type_3ode_GeomPlane; __pyx_type_3ode_GeomCapsule.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomCapsule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 213; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomCapsule", (PyObject *)&__pyx_type_3ode_GeomCapsule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 213; goto __pyx_L1;} __pyx_ptype_3ode_GeomCapsule = &__pyx_type_3ode_GeomCapsule; __pyx_type_3ode_GeomCylinder.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomCylinder) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 277; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomCylinder", (PyObject *)&__pyx_type_3ode_GeomCylinder) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_ptype_3ode_GeomCylinder = &__pyx_type_3ode_GeomCylinder; __pyx_type_3ode_GeomRay.tp_base = __pyx_ptype_3ode_GeomObject; if (PyType_Ready(&__pyx_type_3ode_GeomRay) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 326; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomRay", (PyObject *)&__pyx_type_3ode_GeomRay) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 326; goto __pyx_L1;} __pyx_ptype_3ode_GeomRay = &__pyx_type_3ode_GeomRay; __pyx_type_3ode_GeomTransform.tp_base = __pyx_ptype_3ode_GeomObject; __pyx_type_3ode_GeomTransform.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_GeomTransform) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomTransform", (PyObject *)&__pyx_type_3ode_GeomTransform) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; goto __pyx_L1;} __pyx_ptype_3ode_GeomTransform = &__pyx_type_3ode_GeomTransform; if (PyType_Ready(&__pyx_type_3ode_TriMeshData) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 22; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "TriMeshData", (PyObject *)&__pyx_type_3ode_TriMeshData) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 22; goto __pyx_L1;} __pyx_ptype_3ode_TriMeshData = &__pyx_type_3ode_TriMeshData; __pyx_type_3ode_GeomTriMesh.tp_base = __pyx_ptype_3ode_GeomObject; __pyx_type_3ode_GeomTriMesh.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_3ode_GeomTriMesh) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "GeomTriMesh", (PyObject *)&__pyx_type_3ode_GeomTriMesh) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; goto __pyx_L1;} __pyx_ptype_3ode_GeomTriMesh = &__pyx_type_3ode_GeomTriMesh; /* "/home/zefiris/pyode/src/ode.pyx":33 */ if (PyObject_SetAttr(__pyx_m, __pyx_n___doc__, __pyx_k1p) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 33; goto __pyx_L1;} /* "/home/zefiris/pyode/src/ode.pyx":81 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 81; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramLoStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":82 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 82; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramHiStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 82; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":83 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 83; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramVel, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 83; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":84 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 84; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramFMax, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 84; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":85 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 85; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramFudgeFactor, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 85; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":86 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 86; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 86; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":87 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":88 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 88; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramStopERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":89 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 89; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramStopCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 89; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":90 */ __pyx_1 = PyInt_FromLong(9); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 90; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramSuspensionERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 90; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":91 */ __pyx_1 = PyInt_FromLong(10); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 91; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_paramSuspensionCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 91; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":93 */ __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 93; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 93; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":94 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 94; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 94; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":95 */ __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 95; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 95; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":96 */ __pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 96; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":97 */ __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 97; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":98 */ __pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 98; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":99 */ __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":100 */ __pyx_1 = PyInt_FromLong(7); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 100; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 100; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":101 */ __pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":102 */ __pyx_1 = PyInt_FromLong(9); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 102; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 102; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":103 */ __pyx_1 = PyInt_FromLong(10); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 103; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 103; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":105 */ __pyx_1 = PyInt_FromLong((256 + 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":106 */ __pyx_1 = PyInt_FromLong((256 + 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":107 */ __pyx_1 = PyInt_FromLong((256 + 2)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":108 */ __pyx_1 = PyInt_FromLong((256 + 3)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 108; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 108; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":109 */ __pyx_1 = PyInt_FromLong((256 + 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 109; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":110 */ __pyx_1 = PyInt_FromLong((256 + 5)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":111 */ __pyx_1 = PyInt_FromLong((256 + 6)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":112 */ __pyx_1 = PyInt_FromLong((256 + 7)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":113 */ __pyx_1 = PyInt_FromLong((256 + 8)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 113; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":114 */ __pyx_1 = PyInt_FromLong((256 + 9)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":115 */ __pyx_1 = PyInt_FromLong((256 + 10)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":117 */ __pyx_1 = PyInt_FromLong((512 + 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 117; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamLoStop3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":118 */ __pyx_1 = PyInt_FromLong((512 + 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamHiStop3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":119 */ __pyx_1 = PyInt_FromLong((512 + 2)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamVel3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":120 */ __pyx_1 = PyInt_FromLong((512 + 3)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 120; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFMax3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":121 */ __pyx_1 = PyInt_FromLong((512 + 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamFudgeFactor3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":122 */ __pyx_1 = PyInt_FromLong((512 + 5)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamBounce3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":123 */ __pyx_1 = PyInt_FromLong((512 + 6)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 123; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 123; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":124 */ __pyx_1 = PyInt_FromLong((512 + 7)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopERP3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":125 */ __pyx_1 = PyInt_FromLong((512 + 8)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamStopCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":126 */ __pyx_1 = PyInt_FromLong((512 + 9)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 126; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionERP3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 126; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":127 */ __pyx_1 = PyInt_FromLong((512 + 10)); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 127; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamSuspensionCFM3, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 127; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":129 */ __pyx_1 = PyInt_FromLong(256); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 129; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ParamGroup, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 129; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":131 */ __pyx_1 = PyInt_FromLong(0x001); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 131; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMu2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 131; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":132 */ __pyx_1 = PyInt_FromLong(0x002); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 132; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactFDir1, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 132; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":133 */ __pyx_1 = PyInt_FromLong(0x004); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 133; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactBounce, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 133; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":134 */ __pyx_1 = PyInt_FromLong(0x008); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 134; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSoftERP, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 134; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":135 */ __pyx_1 = PyInt_FromLong(0x010); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 135; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSoftCFM, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 135; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":136 */ __pyx_1 = PyInt_FromLong(0x020); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 136; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMotion1, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 136; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":137 */ __pyx_1 = PyInt_FromLong(0x040); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 137; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactMotion2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 137; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":138 */ __pyx_1 = PyInt_FromLong(0x080); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 138; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSlip1, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 138; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":139 */ __pyx_1 = PyInt_FromLong(0x100); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 139; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactSlip2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 139; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":141 */ __pyx_1 = PyInt_FromLong(0x0000); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 141; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox0, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 141; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":142 */ __pyx_1 = PyInt_FromLong(0x1000); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 142; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1_1, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 142; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":143 */ __pyx_1 = PyInt_FromLong(0x2000); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":144 */ __pyx_1 = PyInt_FromLong(0x3000); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 144; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_ContactApprox1, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 144; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":146 */ __pyx_1 = PyInt_FromLong(dAMotorUser); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 146; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_AMotorUser, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 146; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":147 */ __pyx_1 = PyInt_FromLong(dAMotorEuler); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_AMotorEuler, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":149 */ __pyx_1 = PyFloat_FromDouble(dInfinity); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 149; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_Infinity, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 149; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/ode.pyx":154 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 154; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n__geom_c2py_lut, __pyx_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 154; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; /* "/home/zefiris/pyode/src/contact.pyx":309 */ Py_INCREF(Py_None); __pyx_k2 = Py_None; Py_INCREF(Py_None); __pyx_k3 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":202 */ __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 202; goto __pyx_L1;} __pyx_k4 = __pyx_1; __pyx_1 = 0; /* "/home/zefiris/pyode/src/joints.pyx":266 */ Py_INCREF(Py_None); __pyx_k5 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":276 */ Py_INCREF(Py_None); __pyx_k6 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":338 */ Py_INCREF(Py_None); __pyx_k7 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":348 */ Py_INCREF(Py_None); __pyx_k8 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":492 */ Py_INCREF(Py_None); __pyx_k9 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":502 */ Py_INCREF(Py_None); __pyx_k10 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":578 */ Py_INCREF(Py_None); __pyx_k11 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":588 */ Py_INCREF(Py_None); __pyx_k12 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":705 */ Py_INCREF(Py_None); __pyx_k13 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":715 */ Py_INCREF(Py_None); __pyx_k14 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":861 */ Py_INCREF(Py_None); __pyx_k15 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":871 */ Py_INCREF(Py_None); __pyx_k16 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":919 */ Py_INCREF(Py_None); __pyx_k17 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":929 */ Py_INCREF(Py_None); __pyx_k18 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1092 */ Py_INCREF(Py_None); __pyx_k19 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1102 */ Py_INCREF(Py_None); __pyx_k20 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1181 */ Py_INCREF(Py_None); __pyx_k21 = Py_None; /* "/home/zefiris/pyode/src/joints.pyx":1191 */ Py_INCREF(Py_None); __pyx_k22 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":23 */ __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} if (PyDict_SetItemString(__pyx_2, "__doc__", __pyx_k24p) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} __pyx_4 = __Pyx_CreateClass(__pyx_3, __pyx_2, __pyx_n__SpaceIterator, "ode"); if (!__pyx_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; /* "/home/zefiris/pyode/src/space.pyx":27 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator___init__, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n___init__, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 27; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/space.pyx":31 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator___iter__, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n___iter__, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; /* "/home/zefiris/pyode/src/space.pyx":34 */ __pyx_3 = PyCFunction_New(&__pyx_mdef_3ode_14_SpaceIterator_next, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} __pyx_5 = PyMethod_New(__pyx_3, 0, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetAttr(__pyx_4, __pyx_n_next, __pyx_5) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; if (PyObject_SetAttr(__pyx_m, __pyx_n__SpaceIterator, __pyx_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; /* "/home/zefiris/pyode/src/space.pyx":233 */ Py_INCREF(Py_None); __pyx_k25 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":250 */ Py_INCREF(Py_None); __pyx_k26 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":266 */ Py_INCREF(Py_None); __pyx_k27 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":283 */ Py_INCREF(Py_None); __pyx_k28 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":325 */ Py_INCREF(Py_None); __pyx_k29 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":350 */ Py_INCREF(Py_None); __pyx_k30 = Py_None; /* "/home/zefiris/pyode/src/space.pyx":354 */ __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; goto __pyx_L1;} __pyx_k31 = __pyx_3; __pyx_3 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":33 */ Py_INCREF(Py_None); __pyx_k32 = Py_None; __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; goto __pyx_L1;} __pyx_k33 = __pyx_5; __pyx_5 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":48 */ Py_INCREF(Py_None); __pyx_k34 = Py_None; __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 48; goto __pyx_L1;} __pyx_k35 = __pyx_4; __pyx_4 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":102 */ Py_INCREF(Py_None); __pyx_k36 = Py_None; __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble(1.0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} __pyx_8 = PyTuple_New(3); if (!__pyx_8) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_8, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_8, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k37 = __pyx_8; __pyx_8 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":116 */ Py_INCREF(Py_None); __pyx_k38 = Py_None; __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_7 = PyFloat_FromDouble(1.0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} __pyx_9 = PyTuple_New(3); if (!__pyx_9) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_9, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_9, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_9, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k39 = __pyx_9; __pyx_9 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":166 */ Py_INCREF(Py_None); __pyx_k40 = Py_None; __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_10 = PyTuple_New(3); if (!__pyx_10) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_10, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_10, 1, __pyx_6); PyTuple_SET_ITEM(__pyx_10, 2, __pyx_7); __pyx_2 = 0; __pyx_6 = 0; __pyx_7 = 0; __pyx_k41 = __pyx_10; __pyx_10 = 0; __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; goto __pyx_L1;} __pyx_k42 = __pyx_2; __pyx_2 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":181 */ Py_INCREF(Py_None); __pyx_k43 = Py_None; __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_11 = PyInt_FromLong(1); if (!__pyx_11) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_12 = PyTuple_New(3); if (!__pyx_12) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_12, 0, __pyx_6); PyTuple_SET_ITEM(__pyx_12, 1, __pyx_7); PyTuple_SET_ITEM(__pyx_12, 2, __pyx_11); __pyx_6 = 0; __pyx_7 = 0; __pyx_11 = 0; __pyx_k44 = __pyx_12; __pyx_12 = 0; __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; goto __pyx_L1;} __pyx_k45 = __pyx_6; __pyx_6 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":226 */ Py_INCREF(Py_None); __pyx_k46 = Py_None; __pyx_7 = PyFloat_FromDouble(0.5); if (!__pyx_7) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 226; goto __pyx_L1;} __pyx_k47 = __pyx_7; __pyx_7 = 0; __pyx_11 = PyFloat_FromDouble(1.0); if (!__pyx_11) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 226; goto __pyx_L1;} __pyx_k48 = __pyx_11; __pyx_11 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":240 */ Py_INCREF(Py_None); __pyx_k49 = Py_None; __pyx_13 = PyFloat_FromDouble(0.5); if (!__pyx_13) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; goto __pyx_L1;} __pyx_k50 = __pyx_13; __pyx_13 = 0; __pyx_14 = PyFloat_FromDouble(1.0); if (!__pyx_14) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; goto __pyx_L1;} __pyx_k51 = __pyx_14; __pyx_14 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":273 */ if (PyObject_SetAttr(__pyx_m, __pyx_n_GeomCCylinder, ((PyObject*)__pyx_ptype_3ode_GeomCapsule)) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 273; goto __pyx_L1;} /* "/home/zefiris/pyode/src/geoms.pyx":288 */ Py_INCREF(Py_None); __pyx_k52 = Py_None; __pyx_15 = PyFloat_FromDouble(0.5); if (!__pyx_15) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_k53 = __pyx_15; __pyx_15 = 0; __pyx_16 = PyFloat_FromDouble(1.0); if (!__pyx_16) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 288; goto __pyx_L1;} __pyx_k54 = __pyx_16; __pyx_16 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":302 */ Py_INCREF(Py_None); __pyx_k55 = Py_None; __pyx_17 = PyFloat_FromDouble(0.5); if (!__pyx_17) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_k56 = __pyx_17; __pyx_17 = 0; __pyx_18 = PyFloat_FromDouble(1.0); if (!__pyx_18) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 302; goto __pyx_L1;} __pyx_k57 = __pyx_18; __pyx_18 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":340 */ Py_INCREF(Py_None); __pyx_k58 = Py_None; __pyx_19 = PyFloat_FromDouble(1.0); if (!__pyx_19) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_k59 = __pyx_19; __pyx_19 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":355 */ Py_INCREF(Py_None); __pyx_k60 = Py_None; __pyx_20 = PyFloat_FromDouble(1.0); if (!__pyx_20) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 355; goto __pyx_L1;} __pyx_k61 = __pyx_20; __pyx_20 = 0; /* "/home/zefiris/pyode/src/geoms.pyx":395 */ Py_INCREF(Py_None); __pyx_k62 = Py_None; /* "/home/zefiris/pyode/src/geoms.pyx":412 */ Py_INCREF(Py_None); __pyx_k63 = Py_None; /* "src/trimesh.pyx":41 */ Py_INCREF(Py_None); __pyx_k64 = Py_None; /* "src/trimesh.pyx":56 */ Py_INCREF(Py_None); __pyx_k65 = Py_None; /* "/home/zefiris/pyode/src/ode.pyx":292 */ if (PyObject_SetAttr(__pyx_m, __pyx_n_environment, Py_None) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 292; goto __pyx_L1;} return; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); Py_XDECREF(__pyx_7); Py_XDECREF(__pyx_8); Py_XDECREF(__pyx_9); Py_XDECREF(__pyx_10); Py_XDECREF(__pyx_11); Py_XDECREF(__pyx_12); Py_XDECREF(__pyx_13); Py_XDECREF(__pyx_14); Py_XDECREF(__pyx_15); Py_XDECREF(__pyx_16); Py_XDECREF(__pyx_17); Py_XDECREF(__pyx_18); Py_XDECREF(__pyx_19); Py_XDECREF(__pyx_20); __Pyx_AddTraceback("ode"); } static char *__pyx_filenames[] = { "mass.pyx", "contact.pyx", "world.pyx", "body.pyx", "joints.pyx", "geomobject.pyx", "space.pyx", "geoms.pyx", "trimeshdata.pyx", "trimesh.pyx", "ode.pyx", }; /* Runtime support code */ static void __pyx_init_filenames(void) { __pyx_f = __pyx_filenames; } static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)", name, type->tp_name, obj->ob_type->tp_name); return 0; } static int __Pyx_GetStarArgs( PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2) { PyObject *x = 0, *args1 = 0, *kwds1 = 0; if (args2) *args2 = 0; if (kwds2) *kwds2 = 0; if (args2) { args1 = PyTuple_GetSlice(*args, 0, nargs); if (!args1) goto bad; *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args)); if (!*args2) goto bad; } else { args1 = *args; Py_INCREF(args1); } if (kwds2) { if (*kwds) { char **p; kwds1 = PyDict_New(); if (!kwds) goto bad; *kwds2 = PyDict_Copy(*kwds); if (!*kwds2) goto bad; for (p = kwd_list; *p; p++) { x = PyDict_GetItemString(*kwds, *p); if (x) { if (PyDict_SetItemString(kwds1, *p, x) < 0) goto bad; if (PyDict_DelItemString(*kwds2, *p) < 0) goto bad; } } } else { *kwds2 = PyDict_New(); if (!*kwds2) goto bad; } } else { kwds1 = *kwds; Py_XINCREF(kwds1); } *args = args1; *kwds = kwds1; return 0; bad: Py_XDECREF(args1); Py_XDECREF(kwds1); if (*args2) { Py_XDECREF(*args2); } if (*kwds2) { Py_XDECREF(*kwds2); } return -1; } static PyObject *__Pyx_CreateClass( PyObject *bases, PyObject *dict, PyObject *name, char *modname) { PyObject *py_modname; PyObject *result = 0; py_modname = PyString_FromString(modname); if (!py_modname) goto bad; if (PyDict_SetItemString(dict, "__module__", py_modname) < 0) goto bad; result = PyClass_New(bases, dict, name); bad: Py_XDECREF(py_modname); return result; } static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) PyErr_SetObject(PyExc_NameError, name); return result; } static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); /* First, check the traceback argument, replacing None with NULL. */ if (tb == Py_None) { Py_DECREF(tb); tb = 0; } else if (tb != NULL && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } /* Next, replace a missing value with None */ if (value == NULL) { value = Py_None; Py_INCREF(value); } /* Next, repeatedly, replace a tuple exception with its first item */ while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { PyObject *tmp = type; type = PyTuple_GET_ITEM(type, 0); Py_INCREF(type); Py_DECREF(tmp); } if (PyString_Check(type)) { if (PyErr_Warn(PyExc_DeprecationWarning, "raising a string exception is deprecated")) goto raise_error; } else if (PyType_Check(type) || PyClass_Check(type)) ; /*PyErr_NormalizeException(&type, &value, &tb);*/ else { /* Raising an instance. The value should be a dummy. */ if (value != Py_None) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } /* Normalize to raise , */ Py_DECREF(value); value = type; if (PyInstance_Check(type)) type = (PyObject*) ((PyInstanceObject*)type)->in_class; else type = (PyObject*) type->ob_type; Py_INCREF(type); } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } static PyObject *__Pyx_GetExcValue(void) { PyObject *type = 0, *value = 0, *tb = 0; PyObject *result = 0; PyThreadState *tstate = PyThreadState_Get(); PyErr_Fetch(&type, &value, &tb); PyErr_NormalizeException(&type, &value, &tb); if (PyErr_Occurred()) goto bad; if (!value) { value = Py_None; Py_INCREF(value); } Py_XDECREF(tstate->exc_type); Py_XDECREF(tstate->exc_value); Py_XDECREF(tstate->exc_traceback); tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; result = value; Py_XINCREF(result); type = 0; value = 0; tb = 0; bad: Py_XDECREF(type); Py_XDECREF(value); Py_XDECREF(tb); return result; } static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (obj == Py_None || PyObject_TypeCheck(obj, type)) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", obj->ob_type->tp_name, type->tp_name); return 0; } static void __Pyx_UnpackError(void) { PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size"); } static PyObject *__Pyx_UnpackItem(PyObject *iter) { PyObject *item; if (!(item = PyIter_Next(iter))) { if (!PyErr_Occurred()) __Pyx_UnpackError(); } return item; } static int __Pyx_EndUnpack(PyObject *iter) { PyObject *item; if ((item = PyIter_Next(iter))) { Py_DECREF(item); __Pyx_UnpackError(); return -1; } else if (!PyErr_Occurred()) return 0; else return -1; } static void __Pyx_WriteUnraisable(char *name) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; PyErr_Fetch(&old_exc, &old_val, &old_tb); ctx = PyString_FromString(name); PyErr_Restore(old_exc, old_val, old_tb); if (!ctx) ctx = Py_None; PyErr_WriteUnraisable(ctx); } static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { while (t->p) { *t->p = PyString_InternFromString(t->s); if (!*t->p) return -1; ++t; } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; ++t; } return 0; } #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(__pyx_filename); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = __pyx_lineno; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); }