Author: DavidCzech
Date: 2008-12-01 00:44:55 -0500 (Mon, 01 Dec 2008)
New Revision: 1383

Modified:
   trunk/pysoy/include/soy.models.pxd
   trunk/pysoy/src/models/Axis.pym
Log:
Ticket #963: Scale matrix and size definition


Modified: trunk/pysoy/include/soy.models.pxd
===================================================================
--- trunk/pysoy/include/soy.models.pxd  2008-12-01 03:04:39 UTC (rev 1382)
+++ trunk/pysoy/include/soy.models.pxd  2008-12-01 05:44:55 UTC (rev 1383)
@@ -123,5 +123,6 @@
 cdef class Axis (Model) :
   cdef gl.GLuint                    _vertBuffer
   cdef gl.GLuint                    _elmtBuffer
+  cdef float                          _size
   
 

Modified: trunk/pysoy/src/models/Axis.pym
===================================================================
--- trunk/pysoy/src/models/Axis.pym     2008-12-01 03:04:39 UTC (rev 1382)
+++ trunk/pysoy/src/models/Axis.pym     2008-12-01 05:44:55 UTC (rev 1383)
@@ -50,21 +50,21 @@
     #
     # get model's matrix
     #
-    _mtx[0]  = _body._rotation[0] 
+    _mtx[0]  = _body._rotation[0] * self._size
     _mtx[1]  = _body._rotation[4]
     _mtx[2]  = _body._rotation[8]
     _mtx[3]  = 0.0  
     _mtx[4]  = _body._rotation[1]
-    _mtx[5]  = _body._rotation[5] 
+    _mtx[5]  = _body._rotation[5] * self._size
     _mtx[6]  = _body._rotation[9]
     _mtx[7]  = 0.0  
     _mtx[8]  = _body._rotation[2]
     _mtx[9]  = _body._rotation[6]
-    _mtx[10] = _body._rotation[10]
+    _mtx[10] = _body._rotation[10] * self._size
     _mtx[11] = 0.0 
-    _mtx[12] = _body._position[0]
-    _mtx[13] = _body._position[1]
-    _mtx[14] = _body._position[2]
+    _mtx[12] = _body._position[0] 
+    _mtx[13] = _body._position[1] 
+    _mtx[14] = _body._position[2] 
     _mtx[15] = 1#-self._size + 2
     #
     ######################################
@@ -73,7 +73,7 @@
     #
     gl.glPushMatrix()
     gl.glMultMatrixf(_mtx)
-    gl.glScalef(self._size,self._size,self._size)
+    #gl.glScalef(self._size,self._size,self._size)
     #
     ######################################
     #

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to