MBoundingBox convert( const Imath::Box3f &from ) { if( from.isEmpty() ) { return MBoundingBox(); } return MBoundingBox( convert<MPoint>( from.min ), convert<MPoint>( from.max ) ); }
Imath::Box3f SceneView::framingBound() const { Imath::Box3f b = m_renderableGadget->selectionBound(); if( !b.isEmpty() ) { return b; } return View3D::framingBound(); }
Imath::Box3f Frame::bound() const { Imath::Box3f b = IndividualContainer::bound(); if( b.isEmpty() ) { return b; } b.max += V3f( m_border, m_border, 0 ); b.min -= V3f( m_border, m_border, 0 ); return b; }
bool View::keyPress( GadgetPtr gadget, const KeyEvent &keyEvent ) { if( keyEvent.key == "F" ) { Imath::Box3f b = framingBound(); if( !b.isEmpty() && viewportGadget()->getCameraEditable() ) { viewportGadget()->frame( b ); return true; } } return false; }
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; }