Imath::Box3f SkeletonPrimitive::bound() const { Imath::Box3f bbox; for (unsigned int i=0; i<m_globalMatrices->readable().size(); i++) { bbox.extendBy( m_globalMatrices->readable()[i].translation() ); } //std::cerr << bbox.min << ", " << bbox.max << std::endl; // add a little on for joint radius bbox.extendBy( bbox.max + Imath::V3f(1,1,1) ); bbox.extendBy( bbox.min - Imath::V3f(1,1,1) ); //std::cerr << bbox.min << ", " << bbox.max << std::endl; return bbox; }
Imath::Box3f MotionPrimitive::bound() const { Imath::Box3f result; for( SnapshotMap::const_iterator it=m_snapshots.begin(); it!=m_snapshots.end(); it++ ) { result.extendBy( it->second->bound() ); } return result; }
Imath::Box3f SceneView::framingBound() const { Imath::Box3f b = m_sceneGadget->selectionBound(); if( !b.isEmpty() ) { return b; } b = View3D::framingBound(); if( m_grid->gadget()->getVisible() ) { b.extendBy( m_grid->gadget()->bound() ); } return b; }