예제 #1
0
 def test_cube( self ):
     objfile = """
     v 0.000000 2.000000 2.000000
     v 0.000000 0.000000 2.000000
     v 2.000000 0.000000 2.000000
     v 2.000000 2.000000 2.000000
     v 0.000000 2.000000 0.000000
     v 0.000000 0.000000 0.000000
     v 2.000000 0.000000 0.000000
     v 2.000000 2.000000 0.000000
     f 1 2 3 4
     f 8 7 6 5
     f 4 3 7 8
     f 5 1 4 8
     f 5 6 2 1
     f 2 6 7 3
     """
     data = objfile.split('\n')
     mesh = OBJ_Mesh( '' )
     mesh.load_data( data )
예제 #2
0
 def test_cube(self):
     objfile = """
     v 0.000000 2.000000 2.000000
     v 0.000000 0.000000 2.000000
     v 2.000000 0.000000 2.000000
     v 2.000000 2.000000 2.000000
     v 0.000000 2.000000 0.000000
     v 0.000000 0.000000 0.000000
     v 2.000000 0.000000 0.000000
     v 2.000000 2.000000 0.000000
     f 1 2 3 4
     f 8 7 6 5
     f 4 3 7 8
     f 5 1 4 8
     f 5 6 2 1
     f 2 6 7 3
     """
     data = objfile.split("\n")
     mesh = OBJ_Mesh("")
     mesh.load_data(data)
예제 #3
0
    def test_interleaved_mesh( self ):
        objfile = """
        v 0.000000 2.000000 2.000000
        v 0.000000 0.000000 2.000000
        v 2.000000 0.000000 2.000000
        v 2.000000 2.000000 2.000000
        f -4 -3 -2 -1

        v 2.000000 2.000000 0.000000
        v 2.000000 0.000000 0.000000
        v 0.000000 0.000000 0.000000
        v 0.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 2.000000 2.000000 2.000000
        v 2.000000 0.000000 2.000000
        v 2.000000 0.000000 0.000000
        v 2.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 0.000000 2.000000 0.000000
        v 0.000000 2.000000 2.000000
        v 2.000000 2.000000 2.000000
        v 2.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 0.000000 2.000000 0.000000
        v 0.000000 0.000000 0.000000
        v 0.000000 0.000000 2.000000
        v 0.000000 2.000000 2.000000
        f -4 -3 -2 -1

        v 0.000000 0.000000 2.000000
        v 0.000000 0.000000 0.000000
        v 2.000000 0.000000 0.000000
        v 2.000000 0.000000 2.000000
        f -4 -3 -2 -1
        """
        data = objfile.split('\n')
        mesh = OBJ_Mesh( '' )
        mesh.load_data( data )
예제 #4
0
    def test_interleaved_mesh(self):
        objfile = """
        v 0.000000 2.000000 2.000000
        v 0.000000 0.000000 2.000000
        v 2.000000 0.000000 2.000000
        v 2.000000 2.000000 2.000000
        f -4 -3 -2 -1

        v 2.000000 2.000000 0.000000
        v 2.000000 0.000000 0.000000
        v 0.000000 0.000000 0.000000
        v 0.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 2.000000 2.000000 2.000000
        v 2.000000 0.000000 2.000000
        v 2.000000 0.000000 0.000000
        v 2.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 0.000000 2.000000 0.000000
        v 0.000000 2.000000 2.000000
        v 2.000000 2.000000 2.000000
        v 2.000000 2.000000 0.000000
        f -4 -3 -2 -1

        v 0.000000 2.000000 0.000000
        v 0.000000 0.000000 0.000000
        v 0.000000 0.000000 2.000000
        v 0.000000 2.000000 2.000000
        f -4 -3 -2 -1

        v 0.000000 0.000000 2.000000
        v 0.000000 0.000000 0.000000
        v 2.000000 0.000000 0.000000
        v 2.000000 0.000000 2.000000
        f -4 -3 -2 -1
        """
        data = objfile.split("\n")
        mesh = OBJ_Mesh("")
        mesh.load_data(data)
예제 #5
0
 def test_quad( self ):
     objfile = """
     # comment
     v -1.00000 -1.00000 0.00000 1.00000
     v 1.00000 -1.00000 0.00000 1.00000
     v 1.00000 1.00000 0.00000 1.00000
     v -1.00000 1.00000 0.0000 1.00000
     vn 1.0 0.0 0.0 1.0
     vn 0.0 1.0 0.0 1.0
     vn 0.0 0.0 1.0 1.0
     vn 1.0 0.0 0.0 1.0
     vt 0.0 0.0
     vt 1.0 0.0
     vt 0.0 1.0
     vt 1.0 1.0
     f 1 2 3 4
     f 1/1 2/2 3/3 4/4
     f 1/1/1 2/2/2 3/3/3 4/4/4
     f 1//1 2//2 3//3 4//4
     """
     data = objfile.split('\n')
     mesh = OBJ_Mesh( '' )
     mesh.load_data( data )
예제 #6
0
 def test_quad(self):
     objfile = """
     # comment
     v -1.00000 -1.00000 0.00000 1.00000
     v 1.00000 -1.00000 0.00000 1.00000
     v 1.00000 1.00000 0.00000 1.00000
     v -1.00000 1.00000 0.0000 1.00000
     vn 1.0 0.0 0.0 1.0
     vn 0.0 1.0 0.0 1.0
     vn 0.0 0.0 1.0 1.0
     vn 1.0 0.0 0.0 1.0
     vt 0.0 0.0
     vt 1.0 0.0
     vt 0.0 1.0
     vt 1.0 1.0
     f 1 2 3 4
     f 1/1 2/2 3/3 4/4
     f 1/1/1 2/2/2 3/3/3 4/4/4
     f 1//1 2//2 3//3 4//4
     """
     data = objfile.split("\n")
     mesh = OBJ_Mesh("")
     mesh.load_data(data)