Author: ArcRiley Date: 2008-03-04 10:40:00 -0500 (Tue, 04 Mar 2008) New Revision: 1016
Modified: trunk/pysoy/src/bodies._bodies/Camera.pxi trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd trunk/pysoy/src/scenes/Scene.pxi Log: Ticket #934 : * now casting Camera._scene to soy.scenes.Scene in _coreProject * cleaned up Camera's __cinit__ * added debug print to Scene Modified: trunk/pysoy/src/bodies._bodies/Camera.pxi =================================================================== --- trunk/pysoy/src/bodies._bodies/Camera.pxi 2008-03-04 15:23:11 UTC (rev 1015) +++ trunk/pysoy/src/bodies._bodies/Camera.pxi 2008-03-04 15:40:00 UTC (rev 1016) @@ -24,7 +24,10 @@ be rendered through. It must be attached to a soy.widgets.Projector or other rendering class to be activated. ''' - def __cinit__(self, soy.scenes.Scene parent, wireframe=0, + def __cinit__(self, scene=None, + position=None, rotation=None, velocity=None, + mesh=None, shape=None, + wireframe=0, *args, **keywords) : self._fovy = 45.0 #self.mass = 0 @@ -36,6 +39,10 @@ cdef void _coreProject(self) : cdef gl.GLfloat _mtx[16] # + # Bail now if in limbo + if self._bodyID == NULL : + return + # # Check if wireframe mode is turned on if self._wire == 1 : gl.glEnable (gl.GL_LINE_SMOOTH) @@ -71,7 +78,7 @@ _mtx[15] = 1.0 gl.glLoadMatrixf(_mtx) gl.glTranslatef(-self._position[0], -self._position[1], -self._position[2]) - self._scene._coreRender() + (<soy.scenes.Scene> self._scene)._coreRender() # # What is this for? Framerate calc? self._rpt = (self._rpt + 1) % 16 Modified: trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd =================================================================== --- trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd 2008-03-04 15:23:11 UTC (rev 1015) +++ trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd 2008-03-04 15:40:00 UTC (rev 1016) @@ -54,6 +54,3 @@ cdef int _wire cdef float _fovy cdef void _coreProject(self) - - - Modified: trunk/pysoy/src/scenes/Scene.pxi =================================================================== --- trunk/pysoy/src/scenes/Scene.pxi 2008-03-04 15:23:11 UTC (rev 1015) +++ trunk/pysoy/src/scenes/Scene.pxi 2008-03-04 15:40:00 UTC (rev 1016) @@ -123,6 +123,7 @@ gl.glEnable(gl.GL_LIGHTING) (<soy.colors.Color> self._ambient)._getRGBA(_ambientLight) gl.glLightModelfv(gl.GL_LIGHT_MODEL_AMBIENT, _ambientLight) + stdio.printf('rendering scene\n') self._lights.lock() for i from 0 <= i < self._lights.current : # This is a quick hack (gl.GL_LIGHT0+i) _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn