diff --git a/EgtGraphics.sln b/EgtGraphics.sln index 3efddda..7c2f747 100644 --- a/EgtGraphics.sln +++ b/EgtGraphics.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EgtGraphics", "EgtGraphics.vcxproj", "{4EC970B1-B4D9-4088-8A31-B462CF72116E}" EndProject Global diff --git a/SceneCamera.cpp b/SceneCamera.cpp index bd8d545..c993051 100644 --- a/SceneCamera.cpp +++ b/SceneCamera.cpp @@ -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 ;