Author: JaroslawTworek
Date: 2008-01-17 07:20:07 +0000 (Thu, 17 Jan 2008)
New Revision: 783

Modified:
   trunk/pysoy/tests/test_mesh.py
Log:
Added test for changing face order


Modified: trunk/pysoy/tests/test_mesh.py
===================================================================
--- trunk/pysoy/tests/test_mesh.py      2008-01-16 20:59:15 UTC (rev 782)
+++ trunk/pysoy/tests/test_mesh.py      2008-01-17 07:20:07 UTC (rev 783)
@@ -138,8 +138,24 @@
 
         self.assertEqual(len(self.mesh.verts),4) #THIS ONE FAILS
         self.assertEqual(len(self.mesh.faces),4)
+    def test_changed_order(self):
+        V1 = lambda x : V(self.mesh, position=x)
+        F1 = lambda x : F(self.mesh, verts=x, material=self.material)
 
+        verts = map(V1, quad_vertices)
+        face_vert = [ map(lambda x : verts[x], x) for x in quad_faces]
+        faces = map(F1, face_vert)
 
+        faces_copy = copy_c_array(self.mesh.faces)
+
+        for i in range(len(self.mesh.faces)):
+            self.mesh.faces[i].verts = faces_copy[2-i-1].verts
+
+        for i  in range(len(self.mesh.faces)):
+            self.assertEqual(self.mesh.faces[i], faces[2-i-1]) #THIS ALSO FAILS
+
+
+
 if __name__=='__main__':
     unittest.main()
 

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

Reply via email to