Author: DavidCzech Date: 2008-02-21 19:05:43 -0500 (Thu, 21 Feb 2008) New Revision: 962
Added: trunk/pysoy/src/scenes/Planar.pxi Modified: trunk/pysoy/src/scenes/soy.scenes.pxd trunk/pysoy/src/scenes/soy.scenes.pyx Log: Start on #928 Added: trunk/pysoy/src/scenes/Planar.pxi =================================================================== --- trunk/pysoy/src/scenes/Planar.pxi (rev 0) +++ trunk/pysoy/src/scenes/Planar.pxi 2008-02-22 00:05:43 UTC (rev 962) @@ -0,0 +1,28 @@ +### Planar ODE Scene +#Notes +#http://www.pysoy.org/ticket/928 +#axis for gravity +#http://www.ode.org/ode-latest-userguide.html#sec_10_7_3 +#plane and heightfield are the only geoms which collide with everything as expected EXCEPT themselves and each other +# +#Don't try to get the same effect by setting a very high mass/inertia on the ``motionless'' +#body and then resetting it's position/orientation on each time step. This can cause unexpected simulation errors. + +cdef class Planar (Scene) : + def __cinit__(self, *args, **kw) : + cdef ode.dGeomID plane + plane = ode.dCreateBox (self._spaceID,10.0,0.5,10.0) + #ode.dGeomSetData(plane, <void*> self) + stdio.printf("asdf") +# def __cinit__(self, *args, **kw) : + cdef void _coreRender(self) : + Scene._coreRender(self) + gl.glBegin(gl.GL_TRIANGLE_STRIP) + #gl.glNormal3f(0, 1, 0) + gl.glVertex3f(1,0,0) + gl.glVertex3f(-1,0,0) + gl.glVertex3f(0,0,-1) + gl.glVertex3f(0,0,1) + gl.glVertex3f(1,0,0) + gl.glEnd() + \ No newline at end of file Modified: trunk/pysoy/src/scenes/soy.scenes.pxd =================================================================== --- trunk/pysoy/src/scenes/soy.scenes.pxd 2008-02-21 11:49:34 UTC (rev 961) +++ trunk/pysoy/src/scenes/soy.scenes.pxd 2008-02-22 00:05:43 UTC (rev 962) @@ -48,3 +48,6 @@ cdef int _steps ( self ) cdef void _updateTime ( self ) cdef void _callback ( self, ode.dGeomID, ode.dGeomID ) + +cdef class Planar (Scene) : + cdef void _coreRender ( self ) Modified: trunk/pysoy/src/scenes/soy.scenes.pyx =================================================================== --- trunk/pysoy/src/scenes/soy.scenes.pyx 2008-02-21 11:49:34 UTC (rev 961) +++ trunk/pysoy/src/scenes/soy.scenes.pyx 2008-02-22 00:05:43 UTC (rev 962) @@ -41,3 +41,4 @@ include "_prerunField.pxi" include "_runField.pxi" include "Scene.pxi" +include "Planar.pxi" \ No newline at end of file _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn