EgtGraphics :
- Scene::ZoomObject ora gestisce anche un insieme di oggetti selezionati.
This commit is contained in:
+16
-3
@@ -305,11 +305,24 @@ Scene::ZoomAll( void)
|
||||
bool
|
||||
Scene::ZoomObject( int nId)
|
||||
{
|
||||
// determino l'ingombro dell'oggetto in globale
|
||||
BBox3d b3Obj ;
|
||||
if ( m_pGeomDB == nullptr || ! m_pGeomDB->GetGlobalBBox( nId, b3Obj))
|
||||
// Verifico puntatore a DB geometrico
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
|
||||
// determino l'ingombro dell'oggetto/i in globale
|
||||
BBox3d b3Obj ;
|
||||
if ( nId == GDB_ID_SEL) {
|
||||
int nMyId = m_pGeomDB->GetFirstSelectedObj() ;
|
||||
while ( nMyId != GDB_ID_NULL) {
|
||||
BBox3d b3Curr ;
|
||||
if ( m_pGeomDB->GetGlobalBBox( nMyId, b3Curr))
|
||||
b3Obj.Add( b3Curr) ;
|
||||
nMyId = m_pGeomDB->GetNextSelectedObj() ;
|
||||
}
|
||||
}
|
||||
else
|
||||
m_pGeomDB->GetGlobalBBox( nId, b3Obj) ;
|
||||
|
||||
// recupero centro e diametro vista
|
||||
Point3d ptCent ;
|
||||
double dDiam ;
|
||||
|
||||
Reference in New Issue
Block a user