EgtGraphics 1.9b1 :
- aggiunto metodo ZoomObject.
This commit is contained in:
@@ -301,6 +301,26 @@ Scene::ZoomAll( void)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Scene::ZoomObject( int nId)
|
||||
{
|
||||
// determino l'ingombro dell'oggetto in globale
|
||||
BBox3d b3Obj ;
|
||||
if ( m_pGeomDB == nullptr || ! m_pGeomDB->GetGlobalBBox( nId, b3Obj))
|
||||
return false ;
|
||||
|
||||
// recupero centro e diametro vista
|
||||
Point3d ptCent ;
|
||||
double dDiam ;
|
||||
if ( ! b3Obj.GetCenter( ptCent) || ! b3Obj.GetDiameter( dDiam))
|
||||
return false ;
|
||||
|
||||
// imposto il centro e le dimensioni di vista
|
||||
m_ptCenter = ptCent ;
|
||||
return AdjustDimView( dDiam / 2, dDiam / 2) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Scene::ZoomRadius( double dRadius)
|
||||
|
||||
Reference in New Issue
Block a user