Beispiel #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)
Beispiel #2
0
 def testMinMaxInitialization(self):
     gm.Vec3iRange(
         gm.Vec3i(),
         gm.Vec3i(),
     )
Beispiel #3
0
 def testDefaultInitialization(self):
     vector = gm.Vec3i()
     self.assertEqual(vector, gm.Vec3i(0, 0, 0))
Beispiel #4
0
 def testNamedElementWriteAccessZ(self):
     vector = gm.Vec3i()
     vector.z = 2
     self.assertEqual(vector[2], 2)
Beispiel #5
0
 def testNamedElementReadAccessZ(self):
     vector = gm.Vec3i(0, 1, 2)
     self.assertEqual(vector.z, 2)
Beispiel #6
0
 def testNamedElementWriteAccessY(self):
     vector = gm.Vec3i()
     vector.y = 1
     self.assertEqual(vector[1], 1)
Beispiel #7
0
 def testNamedElementWriteAccessX(self):
     vector = gm.Vec3i()
     vector.x = 0
     self.assertEqual(vector[0], 0)
Beispiel #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)
Beispiel #9
0
 def testElementInitialization(self):
     gm.Vec3i(0, 2, 4)