Author: ArcRiley
Date: 2008-02-07 11:38:16 -0500 (Thu, 07 Feb 2008)
New Revision: 835

Modified:
   trunk/pysoy/src/_datatypes/VertexList.pxi
Log:
fixed indentation


Modified: trunk/pysoy/src/_datatypes/VertexList.pxi
===================================================================
--- trunk/pysoy/src/_datatypes/VertexList.pxi   2008-02-07 10:46:43 UTC (rev 
834)
+++ trunk/pysoy/src/_datatypes/VertexList.pxi   2008-02-07 16:38:16 UTC (rev 
835)
@@ -186,84 +186,68 @@
             self._tslvArray, 3*sizeof(float))
 
   cdef void _uploadFogCoord(self, float y_coord):
-      cdef int i
-      #cdef float* fog_coord_array
-      #fog_coord_array = ( <float*> stdlib.malloc(4 * self._bufferAlloc) )
+    cdef int i
+    #cdef float* fog_coord_array
+    #fog_coord_array = ( <float*> stdlib.malloc(4 * self._bufferAlloc) )
 
-      for i from 0 <= i < self._fogSize:
-          self._fogArray[i] = y_coord + self._array[i].py
+    for i from 0 <= i < self._fogSize:
+      self._fogArray[i] = y_coord + self._array[i].py
       
-      if self._bufferAlloc:
-          gl.glBindBufferARB  (gl.GL_ARRAY_BUFFER_ARB, self._buffer)
-          gl.glBufferSubDataARB(gl.GL_ARRAY_BUFFER_ARB, sizeof(Vert) * 
self._bufferAlloc,
-                  4*self._bufferAlloc, self._fogArray )
+    if self._bufferAlloc:
+      gl.glBindBufferARB   (gl.GL_ARRAY_BUFFER_ARB, self._buffer)
+      gl.glBufferSubDataARB(gl.GL_ARRAY_BUFFER_ARB, 
+                            sizeof(Vert) * self._bufferAlloc,
+                            4 * self._bufferAlloc, self._fogArray)
+    #stdlib.free( fog_coord_array)
 
-      #stdlib.free( fog_coord_array)
-
   cdef void _calculateTSLV(self, void* body):
-      cdef soy.bodies._bodies.Body _body
-      cdef soy.scenes.Scene        _scene
-      cdef soy.bodies.lights.Light _light
-      cdef ode.dVector3            _light_pos
-      cdef float                   _inv_mm[16]
-      cdef float                   _model_light_pos[3]
-      cdef float                   _binormal[3]
-      cdef int                     i
-
-      _body = <soy.bodies._bodies.Body> body
-      _scene = _body._scene
-
-      if _scene._lights.current > 0:
-          _light = <soy.bodies.lights.Light> _scene._lights.list[0]
-          ode.dBodyCopyPosition(<ode.dBodyID> _light._bodyID, _light_pos)
-          _body._coreGetModelviewInv(_inv_mm)
-
-          #vector by matrix multiplication by hand
-          _model_light_pos[0] = _inv_mm[0]  * _light_pos[0] + \
-                                _inv_mm[4]  * _light_pos[1] + \
-                                _inv_mm[8]  * _light_pos[2] + \
-                                _inv_mm[12] 
-
-          _model_light_pos[1] = _inv_mm[1]  * _light_pos[0] + \
-                                _inv_mm[5]  * _light_pos[1] + \
-                                _inv_mm[9]  * _light_pos[2] + \
-                                _inv_mm[13] 
-
-          _model_light_pos[2] = _inv_mm[2]  * _light_pos[0] + \
-                                _inv_mm[6]  * _light_pos[1] + \
-                                _inv_mm[10] * _light_pos[2] + \
-                                _inv_mm[14]
-
-          for i from 0 <= i < self._arraySize:
-              _binormal[0] = self._array[i].tan_y * self._array[i].nz - \
-                             self._array[i].tan_z * self._array[i].ny
-
-              _binormal[1] = self._array[i].tan_z * self._array[i].nx - \
-                             self._array[i].tan_x * self._array[i].nz
-
-              _binormal[2] = self._array[i].tan_x * self._array[i].ny - \
-                             self._array[i].tan_y * self._array[i].nx
-              
-              self._tslvArray[3*i + 0] = _model_light_pos[0] * 
self._array[i].tan_x + \
-                                         _model_light_pos[1] * 
self._array[i].tan_y + \
-                                         _model_light_pos[2] * 
self._array[i].tan_z
-
-              self._tslvArray[3*i + 1] = _model_light_pos[0] * _binormal[0] + \
-                                         _model_light_pos[1] * _binormal[1] + \
-                                         _model_light_pos[2] * _binormal[2]
-
-              self._tslvArray[3*i + 2] = _model_light_pos[0] * 
self._array[i].nx + \
-                                         _model_light_pos[1] * 
self._array[i].ny + \
-                                         _model_light_pos[2] * 
self._array[i].nz
-              if self._bufferAlloc:
-                  gl.glBindBufferARB  (gl.GL_ARRAY_BUFFER_ARB, self._buffer)
-                  gl.glBufferSubDataARB(gl.GL_ARRAY_BUFFER_ARB, 
(sizeof(Vert)+4) * self._bufferAlloc,
-                          12*self._bufferAlloc, self._tslvArray )
-
-      else:
-          return
-
-
-
-
-
+    cdef soy.bodies._bodies.Body _body
+    cdef soy.scenes.Scene        _scene
+    cdef soy.bodies.lights.Light _light
+    cdef ode.dVector3            _light_pos
+    cdef float                   _inv_mm[16]
+    cdef float                   _model_light_pos[3]
+    cdef float                   _binormal[3]
+    cdef int                     i
+    _body = <soy.bodies._bodies.Body> body
+    _scene = _body._scene
+    if _scene._lights.current > 0:
+      _light = <soy.bodies.lights.Light> _scene._lights.list[0]
+      ode.dBodyCopyPosition(<ode.dBodyID> _light._bodyID, _light_pos)
+      _body._coreGetModelviewInv(_inv_mm)
+      #vector by matrix multiplication by hand
+      _model_light_pos[0] = _inv_mm[0]  * _light_pos[0] + \
+                            _inv_mm[4]  * _light_pos[1] + \
+                            _inv_mm[8]  * _light_pos[2] + \
+                            _inv_mm[12] 
+      _model_light_pos[1] = _inv_mm[1]  * _light_pos[0] + \
+                            _inv_mm[5]  * _light_pos[1] + \
+                            _inv_mm[9]  * _light_pos[2] + \
+                            _inv_mm[13] 
+      _model_light_pos[2] = _inv_mm[2]  * _light_pos[0] + \
+                            _inv_mm[6]  * _light_pos[1] + \
+                            _inv_mm[10] * _light_pos[2] + \
+                            _inv_mm[14]
+      for i from 0 <= i < self._arraySize:
+        _binormal[0] = self._array[i].tan_y * self._array[i].nz - \
+                       self._array[i].tan_z * self._array[i].ny
+        _binormal[1] = self._array[i].tan_z * self._array[i].nx - \
+                       self._array[i].tan_x * self._array[i].nz
+        _binormal[2] = self._array[i].tan_x * self._array[i].ny - \
+                       self._array[i].tan_y * self._array[i].nx
+        self._tslvArray[3*i + 0] = _model_light_pos[0] * self._array[i].tan_x 
+ \
+                                   _model_light_pos[1] * self._array[i].tan_y 
+ \
+                                   _model_light_pos[2] * self._array[i].tan_z
+        self._tslvArray[3*i + 1] = _model_light_pos[0] * _binormal[0] + \
+                                   _model_light_pos[1] * _binormal[1] + \
+                                   _model_light_pos[2] * _binormal[2]
+        self._tslvArray[3*i + 2] = _model_light_pos[0] * self._array[i].nx + \
+                                   _model_light_pos[1] * self._array[i].ny + \
+                                   _model_light_pos[2] * self._array[i].nz
+        if self._bufferAlloc:
+          gl.glBindBufferARB  (gl.GL_ARRAY_BUFFER_ARB, self._buffer)
+          gl.glBufferSubDataARB(gl.GL_ARRAY_BUFFER_ARB, 
+                                (sizeof(Vert)+4) * self._bufferAlloc,
+                                12*self._bufferAlloc, self._tslvArray)
+    else:
+      return

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to