Author: ArcRiley Date: 2008-07-18 23:23:46 -0400 (Fri, 18 Jul 2008) New Revision: 1336
Modified: trunk/pysoy/include/soy.scenes.pxd trunk/pysoy/src/scenes/Landscape.pym Log: Ticket #929 : * renamed a few Landscape cdefs Modified: trunk/pysoy/include/soy.scenes.pxd =================================================================== --- trunk/pysoy/include/soy.scenes.pxd 2008-07-19 03:21:49 UTC (rev 1335) +++ trunk/pysoy/include/soy.scenes.pxd 2008-07-19 03:23:46 UTC (rev 1336) @@ -80,16 +80,16 @@ cdef class Landscape (Scene) : - cdef ode.dHeightfieldDataID _heightmapID - cdef ode.dGeomID _heightmap - cdef double _width - cdef double _depth + cdef ode.dGeomID _geomID + cdef ode.dHeightfieldDataID _heightfieldDataID + cdef float _position[3] + cdef float _width + cdef float _height + cdef float _depth cdef soy.materials.Material _material - cdef double _height cdef soy.textures.Texture _heightmapTex cdef gl.GLuint _buffer cdef gl.GLuint _elementbuffer - cdef double _position[3] cdef Vert* _vertArray cdef Face* _elementArray cdef void _createBuffer ( self ) Modified: trunk/pysoy/src/scenes/Landscape.pym =================================================================== --- trunk/pysoy/src/scenes/Landscape.pym 2008-07-19 03:21:49 UTC (rev 1335) +++ trunk/pysoy/src/scenes/Landscape.pym 2008-07-19 03:23:46 UTC (rev 1336) @@ -44,14 +44,14 @@ self._buffer = 0 self._elementbuffer = 0 self._width = width + self._height = height self._depth = depth - self._height = height self.position = position self._material = mat - self._heightmapID = ode.dGeomHeightfieldDataCreate() + self._heightfieldDataID = ode.dGeomHeightfieldDataCreate() self._vertArray = <Vert *> py.PyMem_Malloc(heightmap._width*heightmap._height*16*4) self._elementArray = <Face *> py.PyMem_Malloc(sizeof(Face)*(heightmap._width-1)*(heightmap._height-1)*2) - ode.dGeomHeightfieldDataBuildByte(self._heightmapID, + ode.dGeomHeightfieldDataBuildByte(self._heightfieldDataID, <unsigned char*> heightmap._texels, 0, # copy? self._width, # width @@ -62,14 +62,15 @@ 0, # offset 4.0, # thick 0) # wrapped - self._heightmap = ode.dCreateHeightfield(self._spaceID, self._heightmapID, 1) #the ode heightmap - ode.dGeomSetPosition(self._heightmap, self._position[0], + self._geomID = ode.dCreateHeightfield(self._spaceID, + self._heightfieldDataID, 1) + ode.dGeomSetPosition(self._geomID, self._position[0], self._position[1], self._position[2]) self._heightmapTex = heightmap self._createArrays() def __dealloc__(self) : - ode.dGeomHeightfieldDataDestroy(self._heightmapID) + ode.dGeomHeightfieldDataDestroy(self._heightfieldDataID) gl.glDeleteBuffersARB(1, &self._buffer); _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn