Author: ArcRiley Date: 2008-03-07 19:13:34 -0500 (Fri, 07 Mar 2008) New Revision: 1094
Added: trunk/pysoy/src/bodies._bodies/Light.pxi Removed: trunk/pysoy/src/bodies.lights/ Modified: trunk/pysoy/examples/broken/buoyant.py trunk/pysoy/examples/bumpmap_example.py trunk/pysoy/examples/collide_blocks.py trunk/pysoy/examples/joint_blocks.py trunk/pysoy/examples/liquid_example.py trunk/pysoy/examples/planar_blocks.py trunk/pysoy/examples/pyramid.py trunk/pysoy/examples/shapes.py trunk/pysoy/examples/steel_billboard.py trunk/pysoy/examples/stereo_blocks.py trunk/pysoy/examples/sun_example.py trunk/pysoy/examples/test_blocks.py trunk/pysoy/examples/vid_billboard.py trunk/pysoy/scripts/bodies/__init__.py trunk/pysoy/setup.py trunk/pysoy/src/_datatypes/VertexList.pxi trunk/pysoy/src/_datatypes/soy._datatypes.pyx trunk/pysoy/src/bodies._bodies/Camera.pxi trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pyx trunk/pysoy/src/scenes/Scene.pxi trunk/pysoy/src/scenes/soy.scenes.pyx trunk/pysoy/src/widgets/Projector.pxi Log: Ticket #942 : * movied soy.bodies.lights.Light to soy.bodies.Light * renamed Camera._coreProject to Camera._project * reorganized the code of Camera and Light into commented blocks Modified: trunk/pysoy/examples/broken/buoyant.py =================================================================== --- trunk/pysoy/examples/broken/buoyant.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/broken/buoyant.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -8,7 +8,7 @@ cam = soy.bodies.Camera(sce) cam.position = (0.0, 0.0, 15.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) m = soy.bodies.fields.Monopole(sce) m.position=(0,0,0) Modified: trunk/pysoy/examples/bumpmap_example.py =================================================================== --- trunk/pysoy/examples/bumpmap_example.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/bumpmap_example.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -56,7 +56,7 @@ cam = soy.bodies.Camera(sce) cam.position = (0,0,3) - lig = soy.bodies.lights.Light(sce) + lig = soy.bodies.Light(sce) lig.position = (-5, -5, -5) #decal_tex = soy.transports.File('media/decal.soy')['gimp'] Modified: trunk/pysoy/examples/collide_blocks.py =================================================================== --- trunk/pysoy/examples/collide_blocks.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/collide_blocks.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -7,7 +7,7 @@ cam = soy.bodies.Camera(sce) #cam.shape=soy.shapes.Sphere(2) cam.position = (0.0, 0.0, 15.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) #m = soy.bodies.fields.Monopole(sce) #m.shape=soy.shapes.Sphere(15) Modified: trunk/pysoy/examples/joint_blocks.py =================================================================== --- trunk/pysoy/examples/joint_blocks.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/joint_blocks.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -7,7 +7,7 @@ cam = soy.bodies.Camera(sce) cam.shape=soy.shapes.Sphere(2) cam.position = (0.0, 0.0, 10.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) bks = blocks.blocks(sce) Modified: trunk/pysoy/examples/liquid_example.py =================================================================== --- trunk/pysoy/examples/liquid_example.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/liquid_example.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -153,7 +153,7 @@ cam.rotation = (cam.rotation[0] + vec[0], cam.rotation[1]+vec[1], cam.rotation[2]+vec[2]) return rot_camera - lig = soy.bodies.lights.Light(sce) + lig = soy.bodies.Light(sce) lig.position = (-10.0,1.0,-2.0) water = soy.transports.File('media/water.soy')['gimp'] Modified: trunk/pysoy/examples/planar_blocks.py =================================================================== --- trunk/pysoy/examples/planar_blocks.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/planar_blocks.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -9,7 +9,7 @@ cam = soy.bodies.Camera(sce) #cam.shape=soy.shapes.Sphere(2) cam.position = (0.0, 1.0, 15.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) #m = soy.bodies.fields.Monopole(sce) #m.shape=soy.shapes.Sphere(15) Modified: trunk/pysoy/examples/pyramid.py =================================================================== --- trunk/pysoy/examples/pyramid.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/pyramid.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -35,7 +35,7 @@ #myjoint = soy.joints.Fixed(sce,body,body1) body1.rotation=(1,1,1) cam.position = (0.0, 0.0, 6.0) - lig = soy.bodies.lights.Light(sce) + lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) #ca1 = soy.widgets.Canvas(win, aspect=2.0, texture=lava) pro = soy.widgets.Projector(win, camera=cam) Modified: trunk/pysoy/examples/shapes.py =================================================================== --- trunk/pysoy/examples/shapes.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/shapes.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -10,7 +10,7 @@ win = soy.Window(scr, 'Mesh shape test', tex) cam = soy.bodies.Camera(sce) cam.position = (0.0, 0.0, 20.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) pro = soy.widgets.Projector(win, camera=cam) mat = soy.materials.StainlessSteel() Modified: trunk/pysoy/examples/steel_billboard.py =================================================================== --- trunk/pysoy/examples/steel_billboard.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/steel_billboard.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -21,7 +21,7 @@ - lig = soy.bodies.lights.Light(sce) + lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) lava = soy.transports.File('media/lava.soy')['gimp'] Modified: trunk/pysoy/examples/stereo_blocks.py =================================================================== --- trunk/pysoy/examples/stereo_blocks.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/stereo_blocks.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -17,7 +17,7 @@ cam2 = soy.bodies.Camera(sce) cam2.position = (-0.3, 0.0, 15.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) scr = soy.Screen() Modified: trunk/pysoy/examples/sun_example.py =================================================================== --- trunk/pysoy/examples/sun_example.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/sun_example.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -21,7 +21,7 @@ - lig = soy.bodies.lights.Light(sce) + lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) spike_mat=soy.materials.StainlessSteel() Modified: trunk/pysoy/examples/test_blocks.py =================================================================== --- trunk/pysoy/examples/test_blocks.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/test_blocks.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -7,7 +7,7 @@ cam = soy.bodies.Camera(sce) #cam.shape=soy.shapes.Sphere(2) cam.position = (0.0, 0.0, 15.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) #m = soy.bodies.fields.Monopole(sce) #m.shape=soy.shapes.Sphere(15) Modified: trunk/pysoy/examples/vid_billboard.py =================================================================== --- trunk/pysoy/examples/vid_billboard.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/examples/vid_billboard.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -6,7 +6,7 @@ sce = soy.scenes.Scene() cam = soy.bodies.Camera(sce) cam.position = (0.0, 0.0, 10.0) -lig = soy.bodies.lights.Light(sce) +lig = soy.bodies.Light(sce) lig.position = (-10.0,10.0,2.0) fps = soy.textures.Print() ogg = soy.transports.File('media/changeworld.ogg') Modified: trunk/pysoy/scripts/bodies/__init__.py =================================================================== --- trunk/pysoy/scripts/bodies/__init__.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/scripts/bodies/__init__.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -17,7 +17,6 @@ # # $Id$ -from _bodies import Body, Camera, \ +from _bodies import Body, Camera, Light, \ __author__, __credits__, __date__, __doc__, __version__ import fields -import lights Modified: trunk/pysoy/setup.py =================================================================== --- trunk/pysoy/setup.py 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/setup.py 2008-03-08 00:13:34 UTC (rev 1094) @@ -34,7 +34,6 @@ 'audio' : ['openal'], 'bodies._bodies' : ['GLEW','GL','ode'], 'bodies.fields' : ['GL','ode'], - 'bodies.lights' : ['GL','ode'], 'colors' : ['GL'], 'controllers' : [], 'joints' : ['GL','ode'], Modified: trunk/pysoy/src/_datatypes/VertexList.pxi =================================================================== --- trunk/pysoy/src/_datatypes/VertexList.pxi 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/_datatypes/VertexList.pxi 2008-03-08 00:13:34 UTC (rev 1094) @@ -207,7 +207,7 @@ # cdef soy.bodies._bodies.Body _body cdef soy.scenes.Scene _scene - cdef soy.bodies.lights.Light _light + cdef soy.bodies._bodies.Light _light cdef float _inv_mm[16] cdef float _model_light_pos[3] cdef float _vert_light_pos[3] @@ -219,7 +219,7 @@ _scene = _body._scene if _scene._lights._current > 0 : - _light = <soy.bodies.lights.Light> _scene._lights._list[0] + _light = <soy.bodies._bodies.Light> _scene._lights._list[0] _body._coreGetModelviewInv(_inv_mm) # # Vector by matrix multiplication by hand Modified: trunk/pysoy/src/_datatypes/soy._datatypes.pyx =================================================================== --- trunk/pysoy/src/_datatypes/soy._datatypes.pyx 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/_datatypes/soy._datatypes.pyx 2008-03-08 00:13:34 UTC (rev 1094) @@ -29,7 +29,6 @@ cimport stdlib cimport soy.atoms cimport soy.bodies._bodies -cimport soy.bodies.lights cimport soy.materials cimport soy.models cimport soy.scenes Modified: trunk/pysoy/src/bodies._bodies/Camera.pxi =================================================================== --- trunk/pysoy/src/bodies._bodies/Camera.pxi 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/bodies._bodies/Camera.pxi 2008-03-08 00:13:34 UTC (rev 1094) @@ -24,6 +24,8 @@ be rendered through. It must be attached to a soy.widgets.Projector or other rendering class to be activated. ''' + + def __cinit__(self, scene=None, position=None, rotation=None, velocity=None, mesh=None, shape=None, @@ -37,54 +39,11 @@ for _i from 0 <= _i < 16 : self._rtimes[_i] = 0.0 - cdef void _coreProject(self) : - cdef gl.GLfloat _mtx[16] - # - # Bail now if in the abyss - if self._bodyID == NULL : - return - # - # Check if wireframe mode is turned on - if self._wire == 1 : - gl.glEnable (gl.GL_LINE_SMOOTH) - gl.glEnable (gl.GL_BLEND) - #gl.glBlendFunc (gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) ## Anti-Aliasing maybe? - #gl.glHint (gl.GL_LINE_SMOOTH_HINT, gl.GL_DONT_CARE) - gl.glLineWidth (3) - gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE) - else : - gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL) - gl.glDisable (gl.GL_LINE_SMOOTH) - gl.glDisable (gl.GL_BLEND) - #gl.glBlendFunc (gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) - #gl.glHint (gl.GL_LINE_SMOOTH_HINT, gl.GL_DONT_CARE) - gl.glLineWidth (1) - # - # Now we apply an inverse matrix to translate to the Scene's origin - _mtx[0] = self._rotation[0] - _mtx[1] = self._rotation[1] - _mtx[2] = self._rotation[2] - _mtx[3] = 0.0 - _mtx[4] = self._rotation[4] - _mtx[5] = self._rotation[5] - _mtx[6] = self._rotation[6] - _mtx[7] = 0.0 - _mtx[8] = self._rotation[8] - _mtx[9] = self._rotation[9] - _mtx[10] = self._rotation[10] - _mtx[11] = 0.0 - _mtx[12] = 0.0 - _mtx[13] = 0.0 - _mtx[14] = 0.0 - _mtx[15] = 1.0 - gl.glLoadMatrixf(_mtx) - gl.glTranslatef(-self._position[0], -self._position[1], -self._position[2]) - (<soy.scenes.Scene> self._scene)._render() - # - # Framerate calc - self._rpt = (self._rpt + 1) % 16 - self._rtimes[self._rpt] = soy._internals._time() + ############################################################################ + # + # Properties + # property fps : def __get__(self) : @@ -103,6 +62,7 @@ def __set__(self,value) : self._wire = value + property lens : '''Camera Lens @@ -110,9 +70,11 @@ ''' def __get__(self) : return self._fovy + def __set__(self, value) : self._fovy = value + property direction : '''Camera Direction @@ -121,6 +83,7 @@ def __get__(self) : return ( self._rotation[2], self._rotation[6], self._rotation[10] ) + property right : '''Camera Right @@ -129,6 +92,7 @@ def __get__(self): return ( self._rotation[0], self._rotation[4], self._rotation[8] ) + property up : '''Camera Up @@ -136,3 +100,57 @@ ''' def __get__(self): return ( self._rotation[1], self._rotation[5], self._rotation[9] ) + + + ############################################################################ + # + # WindowLoop Functions + # + + cdef void _project(self) : + cdef gl.GLfloat _mtx[16] + # + # Bail now if in the abyss + if self._bodyID == NULL : + return + # + # Check if wireframe mode is turned on + if self._wire == 1 : + gl.glEnable (gl.GL_LINE_SMOOTH) + gl.glEnable (gl.GL_BLEND) + #gl.glBlendFunc (gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) ## Anti-Aliasing maybe? + #gl.glHint (gl.GL_LINE_SMOOTH_HINT, gl.GL_DONT_CARE) + gl.glLineWidth (3) + gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE) + else : + gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL) + gl.glDisable (gl.GL_LINE_SMOOTH) + gl.glDisable (gl.GL_BLEND) + #gl.glBlendFunc (gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) + #gl.glHint (gl.GL_LINE_SMOOTH_HINT, gl.GL_DONT_CARE) + gl.glLineWidth (1) + # + # Now we apply an inverse matrix to translate to the Scene's origin + _mtx[0] = self._rotation[0] + _mtx[1] = self._rotation[1] + _mtx[2] = self._rotation[2] + _mtx[3] = 0.0 + _mtx[4] = self._rotation[4] + _mtx[5] = self._rotation[5] + _mtx[6] = self._rotation[6] + _mtx[7] = 0.0 + _mtx[8] = self._rotation[8] + _mtx[9] = self._rotation[9] + _mtx[10] = self._rotation[10] + _mtx[11] = 0.0 + _mtx[12] = 0.0 + _mtx[13] = 0.0 + _mtx[14] = 0.0 + _mtx[15] = 1.0 + gl.glLoadMatrixf(_mtx) + gl.glTranslatef(-self._position[0], -self._position[1], -self._position[2]) + (<soy.scenes.Scene> self._scene)._render() + # + # Framerate calc + self._rpt = (self._rpt + 1) % 16 + self._rtimes[self._rpt] = soy._internals._time() Copied: trunk/pysoy/src/bodies._bodies/Light.pxi (from rev 1091, trunk/pysoy/src/bodies.lights/Light.pxi) =================================================================== --- trunk/pysoy/src/bodies._bodies/Light.pxi (rev 0) +++ trunk/pysoy/src/bodies._bodies/Light.pxi 2008-03-08 00:13:34 UTC (rev 1094) @@ -0,0 +1,122 @@ +# PySoy's bodies.Light class +# +# Copyright (C) 2006,2007,2008 PySoy Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id$ + +cdef class Light (Body) : + '''soy.bodies.Light + + Lights provide illumination in your scene. Needs more work. + ''' + + def __cinit__(self, scene=None, + ambient=None, diffuse=None, specular=None, + *args, **keywords) : + self.ambient = ambient + self.diffuse = diffuse + self.specular = specular + (<soy.scenes.Scene> self._scene)._lights._append(<void*> self) + + + ############################################################################ + # + # Properties + # + + property ambient : + def __get__(self) : + return self._ambient + + def __set__(self, value) : + if value == None : + import soy.colors + self._ambient = soy.colors.black + elif isinstance(value, soy.colors.Color) : + self._ambient = value + else : + raise TypeError('color must be an instance of soy.colors.Color') + + + property diffuse : + def __get__(self) : + return self._diffuse + + def __set__(self, value) : + if value == None : + import soy.colors + self._diffuse = soy.colors.gray + elif isinstance(value, soy.colors.Color) : + self._diffuse = value + else : + raise TypeError('color must be an instance of soy.colors.Color') + + + property specular : + def __get__(self) : + return self._specular + + def __set__(self, value) : + if value == None : + import soy.colors + self._specular = soy.colors.white + elif isinstance(value, soy.colors.Color) : + self._specular = value + else : + raise TypeError('color must be an instance of soy.colors.Color') + + + ############################################################################ + # + # General C Functions + # + + cdef void _append(self) : + (<soy.scenes.Scene> self._scene)._bodies._append(<void*> self) + (<soy.scenes.Scene> self._scene)._lights._append(<void*> self) + + + cdef void _remove(self) : + (<soy.scenes.Scene> self._scene)._bodies._remove(<void*> self) + (<soy.scenes.Scene> self._scene)._lights._remove(<void*> self) + + + ############################################################################ + # + # WindowLoop Functions + # + + cdef void _on(self, int _id) : + cdef gl.GLfloat _ambient[4] + cdef gl.GLfloat _diffuse[4] + cdef gl.GLfloat _specular[4] + cdef gl.GLfloat _position[4] + gl.glEnable(_id) + (<soy.colors.Color> self._ambient)._getRGBA(_ambient) + (<soy.colors.Color> self._diffuse)._getRGBA(_diffuse) + (<soy.colors.Color> self._specular)._getRGBA(_specular) + _position[0] = self._position[0] + _position[1] = self._position[1] + _position[2] = self._position[2] + _position[3] = 1.0 + gl.glLightfv(_id, gl.GL_AMBIENT, _ambient) + gl.glLightfv(_id, gl.GL_DIFFUSE, _diffuse) + gl.glLightfv(_id, gl.GL_SPECULAR, _specular) + gl.glLightfv(_id, gl.GL_POSITION, _position) + + + cdef void _off(self, int _id) : + gl.glDisable(_id) Modified: trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd =================================================================== --- trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pxd 2008-03-08 00:13:34 UTC (rev 1094) @@ -49,8 +49,16 @@ cdef class Camera (Body) : - cdef double _rtimes[16] - cdef int _rpt - cdef int _wire - cdef float _fovy - cdef void _coreProject(self) + cdef int _wire + cdef float _fovy + cdef int _rpt + cdef double _rtimes[16] + cdef void _project ( self ) + + +cdef class Light (Body) : + cdef object _ambient + cdef object _diffuse + cdef object _specular + cdef void _on ( self, int ) + cdef void _off ( self, int ) Modified: trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pyx =================================================================== --- trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pyx 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/bodies._bodies/soy.bodies._bodies.pyx 2008-03-08 00:13:34 UTC (rev 1094) @@ -36,9 +36,11 @@ cimport py cimport stdio cimport soy._internals +cimport soy.colors cimport soy.models cimport soy.scenes cimport soy.shapes include "Body.pxi" include "Camera.pxi" +include "Light.pxi" Modified: trunk/pysoy/src/scenes/Scene.pxi =================================================================== --- trunk/pysoy/src/scenes/Scene.pxi 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/scenes/Scene.pxi 2008-03-08 00:13:34 UTC (rev 1094) @@ -130,7 +130,7 @@ self._lights._iterStart() for _i from 0 <= _i < self._lights._current : # This is a quick hack (gl.GL_LIGHT0 + _i) - (<soy.bodies.lights.Light> self._lights._list[_i])._on(gl.GL_LIGHT0 + _i) + (<soy.bodies._bodies.Light> self._lights._list[_i])._on(gl.GL_LIGHT0 + _i) # # Iterate over bodies self._bodies._iterStart() @@ -141,7 +141,7 @@ # Turn off all lights and finish iteration loop for _i from 0 <= _i < self._lights._current : # This is a quick hack (gl.GL_LIGHT0 + _i) - (<soy.bodies.lights.Light> self._lights._list[_i])._off(gl.GL_LIGHT0 + _i) + (<soy.bodies._bodies.Light> self._lights._list[_i])._off(gl.GL_LIGHT0 + _i) self._lights._iterDone() gl.glDisable(gl.GL_LIGHTING) gl.glDisable(gl.GL_DEPTH_TEST) Modified: trunk/pysoy/src/scenes/soy.scenes.pyx =================================================================== --- trunk/pysoy/src/scenes/soy.scenes.pyx 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/scenes/soy.scenes.pyx 2008-03-08 00:13:34 UTC (rev 1094) @@ -36,9 +36,8 @@ cimport soy.joints cimport soy.bodies._bodies cimport soy.bodies.fields -cimport soy.bodies.lights include "_prerunField.pxi" include "_runField.pxi" include "Scene.pxi" -include "Planar.pxi" \ No newline at end of file +include "Planar.pxi" Modified: trunk/pysoy/src/widgets/Projector.pxi =================================================================== --- trunk/pysoy/src/widgets/Projector.pxi 2008-03-07 21:15:24 UTC (rev 1093) +++ trunk/pysoy/src/widgets/Projector.pxi 2008-03-08 00:13:34 UTC (rev 1094) @@ -54,7 +54,7 @@ gl.gluPerspective(self._camera._fovy, _aspect, self._znear, self._zfar) gl.glMatrixMode(gl.GL_MODELVIEW) gl.glLoadIdentity() - self._camera._coreProject() + self._camera._project() property camera : _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn