def testInit(self): a = pyjet.BoundingBox3F() self.assertGreater(a.lowerCorner.x, a.upperCorner.x) self.assertGreater(a.lowerCorner.y, a.upperCorner.y) self.assertGreater(a.lowerCorner.z, a.upperCorner.z) b = pyjet.BoundingBox3F((-1, -2, -3), (4, 2, 5)) self.assertEqual(b.lowerCorner.x, -1.0) self.assertEqual(b.lowerCorner.y, -2.0) self.assertEqual(b.lowerCorner.z, -3.0) self.assertEqual(b.upperCorner.x, 4.0) self.assertEqual(b.upperCorner.y, 2.0) self.assertEqual(b.upperCorner.z, 5.0) l, c = pyjet.Vector3F(-1, -2, -3), pyjet.Vector3F(4, 2, 5) c = pyjet.BoundingBox3F(l, c) self.assertEqual(c.lowerCorner.x, -1.0) self.assertEqual(c.lowerCorner.y, -2.0) self.assertEqual(c.lowerCorner.z, -3.0) self.assertEqual(c.upperCorner.x, 4.0) self.assertEqual(c.upperCorner.y, 2.0) self.assertEqual(c.upperCorner.z, 5.0)
def test_bounding_box3f_init(): a = pyjet.BoundingBox3F() assert a.lowerCorner.x > a.upperCorner.x assert a.lowerCorner.y > a.upperCorner.y assert a.lowerCorner.z > a.upperCorner.z b = pyjet.BoundingBox3F((-1, -2, -3), (4, 2, 5)) assert b.lowerCorner.x == -1.0 assert b.lowerCorner.y == -2.0 assert b.lowerCorner.z == -3.0 assert b.upperCorner.x == 4.0 assert b.upperCorner.y == 2.0 assert b.upperCorner.z == 5.0 l, c = pyjet.Vector3F(-1, -2, -3), pyjet.Vector3F(4, 2, 5) c = pyjet.BoundingBox3F(l, c) assert c.lowerCorner.x == -1.0 assert c.lowerCorner.y == -2.0 assert c.lowerCorner.z == -3.0 assert c.upperCorner.x == 4.0 assert c.upperCorner.y == 2.0 assert c.upperCorner.z == 5.0
def testIsEmpty(self): a = pyjet.BoundingBox3F((-2.0, -2.0, 1.0), (4.0, 3.0, 5.0)) self.assertFalse(a.isEmpty())
def test_bounding_box3f_is_empty(): a = pyjet.BoundingBox3F((-2.0, -2.0, 1.0), (4.0, 3.0, 5.0)) assert not a.isEmpty()