EgtGraphics 1.9b1 :

- aggiunto metodo ZoomObject.
This commit is contained in:
Dario Sassi
2018-02-10 10:24:24 +00:00
parent 4d08ce6fa6
commit df3d7e7067
3 changed files with 21 additions and 0 deletions
+20
View File
@@ -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)