Imath::Box3f SceneReader::computeBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const { ConstSceneInterfacePtr s = scene( path ); if( !s ) { return Box3f(); } Box3d b = s->readBound( context->getFrame() / g_frameRate ); if( b.isEmpty() ) { return Box3f(); } return Box3f( b.min, b.max ); }
Imath::Box3f SceneReader::computeBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const { std::string fileName = fileNamePlug()->getValue(); if( !fileName.size() ) { return Box3f(); } ConstSceneInterfacePtr s = SharedSceneInterfaces::get( fileName ); s = s->scene( path ); Box3d b = s->readBound( context->getFrame() / g_frameRate ); if( b.isEmpty() ) { return Box3f(); } return Box3f( b.min, b.max ); }
Imath::Box3f SceneReader::computeBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const { ConstSceneInterfacePtr s = scene( path ); if( !s ) { return Box3f(); } if( s->hasBound() ) { const Box3d b = s->readBound( context->getTime() ); if( b.isEmpty() ) { return Box3f(); } return Box3f( b.min, b.max ); } else { return unionOfTransformedChildBounds( path, parent ); } }