Пример #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)