Ejemplo n.º 1
0
 def test_getHalfExtentsWithoutMargin(self):
     """
     L{CylinderShape.getHalfExtentsWithoutMargin} returns the cylinder's half
     extents vector.
     """
     halfExtents = Vector3(2, 5, 7)
     shape = CylinderShape(halfExtents)
     result = shape.getHalfExtentsWithoutMargin()
     self.assertEqual(result.x, 1.9600000381469727)
     self.assertEqual(result.y, 4.9600000381469727)
     self.assertEqual(result.z, 6.9600000381469727)
Ejemplo n.º 2
0
 def test_getHalfExtentsWithoutMargin(self):
     """
     L{CylinderShape.getHalfExtentsWithoutMargin} returns the cylinder's half
     extents vector.
     """
     halfExtents = Vector3(2, 5, 7)
     shape = CylinderShape(halfExtents)
     result = shape.getHalfExtentsWithoutMargin()
     self.assertEqual(result.x, 1.9600000381469727)
     self.assertEqual(result.y, 4.9600000381469727)
     self.assertEqual(result.z, 6.9600000381469727)
Ejemplo n.º 3
0
 def test_radius(self):
     """
     L{CylinderShape.getRadius} returns the radius of the cylinder.
     """
     shape = CylinderShape(Vector3(1, 2, 3))
     self.assertEqual(shape.getRadius(), 1)
Ejemplo n.º 4
0
 def test_instantiate(self):
     shape = CylinderShape(Vector3(1, 2, 3))
     self.assertTrue(isinstance(shape, CylinderShape))
Ejemplo n.º 5
0
 def test_radius(self):
     """
     L{CylinderShape.getRadius} returns the radius of the cylinder.
     """
     shape = CylinderShape(Vector3(1, 2, 3))
     self.assertEqual(shape.getRadius(), 1)