EgtGraphics 3.1e2 :
- piccole migliorie per rendere più stabile rotazione camera.
This commit is contained in:
Binary file not shown.
+1
-1
@@ -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
@@ -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) ;
|
||||
|
||||
Reference in New Issue
Block a user