Author: JonNeal Date: 2008-07-18 23:33:02 -0400 (Fri, 18 Jul 2008) New Revision: 1337
Modified: trunk/pysoy/src/scenes/Landscape.pym Log: Ticket #929: * Fixed normals, they were backwards! Modified: trunk/pysoy/src/scenes/Landscape.pym =================================================================== --- trunk/pysoy/src/scenes/Landscape.pym 2008-07-19 03:23:46 UTC (rev 1336) +++ trunk/pysoy/src/scenes/Landscape.pym 2008-07-19 03:33:02 UTC (rev 1337) @@ -170,7 +170,7 @@ # While we are in this loop, calculate the delta map for LOD _deltaRows[_offset] = self._vertArray[_offset].py-self._vertArray[_offset+1].py - stdio.printf("%d : %f\n", _offset, _deltaRows[_offset]); + #stdio.printf("%d : %f\n", _offset, _deltaRows[_offset]); else : # subtract the vertices to get vectors _v1[0] = self._vertArray[_c].px @@ -220,9 +220,9 @@ _normal[1] /= _length _normal[2] /= _length #stdio.printf("vert %d {nx: %f, ny: %f, nz: %f}\n", _offset, _normal[0], _normal[1], _normal[2]); - self._vertArray[_offset].nx = _normal[0] - self._vertArray[_offset].ny = _normal[1] - self._vertArray[_offset].nz = _normal[2] + self._vertArray[_offset].nx = -(_normal[0]) + self._vertArray[_offset].ny = (_normal[1]) + self._vertArray[_offset].nz = (_normal[2]) # q = 90 degrees in the x direction # uy' = y*cos q - z*sin q # uz' = y*sin q + z*cos q _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn