EgtGraphics 3.1e2 :

- piccole migliorie per rendere più stabile rotazione camera.
This commit is contained in:
Dario Sassi
2026-05-12 18:08:07 +02:00
parent 0405079553
commit 8eff351f17
3 changed files with 2 additions and 2 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -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 ;
+1 -1
View File
@@ -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) ;