| 40 | class BoxAlgoTest( unittest.TestCase ) : |
| 41 | |
| 42 | def testContains( self ) : |
| 43 | |
| 44 | b1 = imath.Box3f( imath.V3f( -1 ), imath.V3f( 1 ) ) |
| 45 | b2 = imath.Box3f( imath.V3f( 0, -0.5, 0.5 ), imath.V3f( 0.1, 0, 0.9 ) ) |
| 46 | b3 = imath.Box3f( imath.V3f( -1.2, -0.6, 0.4 ), imath.V3f( 0.2, 0.1, 1 ) ) |
| 47 | |
| 48 | self.assertTrue( IECore.BoxAlgo.contains( b1, b2 ) ) |
| 49 | self.assertFalse( IECore.BoxAlgo.contains( b2, b1 ) ) |
| 50 | |
| 51 | self.assertFalse( IECore.BoxAlgo.contains( b2, b3 ) ) |
| 52 | self.assertTrue( IECore.BoxAlgo.contains( b3, b2 ) ) |
| 53 | |
| 54 | self.assertFalse( IECore.BoxAlgo.contains( b3, b1 ) ) |
| 55 | self.assertFalse( IECore.BoxAlgo.contains( b1, b3 ) ) |
| 56 | |
| 57 | def testSplit( self ) : |
| 58 | |