MCPcopy Create free account
hub / github.com/ImageEngine/cortex / readWalk

Method readWalk

test/IECoreScene/SceneCacheTest.py:209–227  ·  view source on GitHub ↗
( m, parentSpaceBound )

Source from the content-addressed store, hash-verified

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() )

Callers

nothing calls this directly

Calls 10

minMethod · 0.80
maxMethod · 0.80
childNamesMethod · 0.45
childMethod · 0.45
hasObjectMethod · 0.45
readObjectMethod · 0.45
boundMethod · 0.45
readBoundMethod · 0.45
compareBBoxMethod · 0.45
readTransformAsMatrixMethod · 0.45

Tested by

no test coverage detected