diff --git a/EgtGraphics.rc b/EgtGraphics.rc index 4db74ec..2d26983 100644 Binary files a/EgtGraphics.rc and b/EgtGraphics.rc differ diff --git a/SceneBasic.cpp b/SceneBasic.cpp index 8afbae0..2d0ea6a 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -982,7 +982,7 @@ Scene::GetPixelZ( const Point3d& ptWin, double& dWinZ) float dZ ; bool bOk = true ; glReadPixels( int( ptWin.x), int( Viewport[3] - ptWin.y), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &dZ) ; - if ( glGetError() == GL_NO_ERROR && dZ > 0.001f && dZ < 0.999f) + if ( glGetError() == GL_NO_ERROR && dZ > 0.1f && dZ < 0.9f) dWinZ = dZ ; else { bOk = false ; diff --git a/SceneCamera.cpp b/SceneCamera.cpp index 21032ca..d7e4b9d 100644 --- a/SceneCamera.cpp +++ b/SceneCamera.cpp @@ -541,7 +541,7 @@ Scene::ZoomOnPoint( const Point3d& ptWin, double dCoeff) return false ; // verifico che il punto sia nelle dimensioni del mondo geometrico - if ( ! m_b3ExtWorld.Encloses( ptWorld)) { + if ( ! m_b3ExtWorld.IsEmpty() && ! m_b3ExtWorld.Encloses( ptWorld)) { ptWorld.x = Clamp( ptWorld.x, m_b3ExtWorld.GetMin().x, m_b3ExtWorld.GetMax().x) ; ptWorld.y = Clamp( ptWorld.y, m_b3ExtWorld.GetMin().y, m_b3ExtWorld.GetMax().y) ; ptWorld.z = Clamp( ptWorld.z, m_b3ExtWorld.GetMin().z, m_b3ExtWorld.GetMax().z) ;