Example #1
0
MBoundingBox convert( const Imath::Box3f &from )
{
	if( from.isEmpty() )
	{
		return MBoundingBox();
	}
	return MBoundingBox( convert<MPoint>( from.min ), convert<MPoint>( from.max ) );
}
Example #2
0
Imath::Box3f SceneView::framingBound() const
{
	Imath::Box3f b = m_renderableGadget->selectionBound();
	if( !b.isEmpty() )
	{
		return b;
	}
	return View3D::framingBound();
}
Example #3
0
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;
}
Example #4
0
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;
}
Example #5
0
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;
}