( m, parentSpaceBound )
| 207 | del m |
| 208 | |
| 209 | def readWalk( m, parentSpaceBound ) : |
| 210 | |
| 211 | localSpaceBound = imath.Box3d() |
| 212 | for childName in m.childNames() : |
| 213 | readWalk( m.child( childName ), localSpaceBound ) |
| 214 | |
| 215 | if m.hasObject() : |
| 216 | o = m.readObject(0.0) |
| 217 | ob = o.bound() |
| 218 | ob = imath.Box3d( imath.V3d( *ob.min() ), imath.V3d( *ob.max() ) ) |
| 219 | localSpaceBound.extendBy( ob ) |
| 220 | |
| 221 | fileBound = m.readBound(0.0) |
| 222 | |
| 223 | # the two bounding boxes should be pretty tightly close! |
| 224 | self.assertTrue( SceneCacheTest.compareBBox( localSpaceBound, fileBound ) ) |
| 225 | |
| 226 | transformedBound = localSpaceBound * m.readTransformAsMatrix(0.0) |
| 227 | parentSpaceBound.extendBy( transformedBound ) |
| 228 | |
| 229 | m = IECoreScene.SceneCache( os.path.join( self.tempDir, "test.scc" ), IECore.IndexedIO.OpenMode.Read ) |
| 230 | readWalk( m, imath.Box3d() ) |
nothing calls this directly
no test coverage detected