예제 #1
0
 def testElementWriteAccess(self):
     vector = gm.Vec3i()
     vector[0] = 0
     vector[1] = 2
     vector[2] = 4
     self.assertAlmostEqual(vector[0], 0)
     self.assertAlmostEqual(vector[1], 2)
     self.assertAlmostEqual(vector[2], 4)
예제 #2
0
 def testMinMaxInitialization(self):
     gm.Vec3iRange(
         gm.Vec3i(),
         gm.Vec3i(),
     )
예제 #3
0
 def testDefaultInitialization(self):
     vector = gm.Vec3i()
     self.assertEqual(vector, gm.Vec3i(0, 0, 0))
예제 #4
0
 def testNamedElementWriteAccessZ(self):
     vector = gm.Vec3i()
     vector.z = 2
     self.assertEqual(vector[2], 2)
예제 #5
0
 def testNamedElementReadAccessZ(self):
     vector = gm.Vec3i(0, 1, 2)
     self.assertEqual(vector.z, 2)
예제 #6
0
 def testNamedElementWriteAccessY(self):
     vector = gm.Vec3i()
     vector.y = 1
     self.assertEqual(vector[1], 1)
예제 #7
0
 def testNamedElementWriteAccessX(self):
     vector = gm.Vec3i()
     vector.x = 0
     self.assertEqual(vector[0], 0)
예제 #8
0
 def testElementReadAccess(self):
     vector = gm.Vec3i(0, 2, 4)
     self.assertAlmostEqual(vector[0], 0)
     self.assertAlmostEqual(vector[1], 2)
     self.assertAlmostEqual(vector[2], 4)
예제 #9
0
 def testElementInitialization(self):
     gm.Vec3i(0, 2, 4)