EgtGraphics :
- utilizzo di GetPixelZ anche per Pan della camera.
This commit is contained in:
+6
-3
@@ -319,12 +319,15 @@ bool
|
||||
Scene::PanCamera( const Point3d& ptWinOld, const Point3d& ptWinNew)
|
||||
{
|
||||
// porto i due punti in coordinate mondo
|
||||
double dZCenter = GetProjectedCenter().z ;
|
||||
Point3d ptViewOld( ptWinOld.x, ptWinOld.y, dZCenter) ;
|
||||
double dOldZCenter ;
|
||||
GetPixelZ( ptWinOld, dOldZCenter) ;
|
||||
Point3d ptViewOld( ptWinOld.x, ptWinOld.y, dOldZCenter) ;
|
||||
Point3d ptWorldOld ;
|
||||
if ( ! UnProject( ptViewOld, ptWorldOld))
|
||||
return false ;
|
||||
Point3d ptViewNew( ptWinNew.x, ptWinNew.y, dZCenter) ;
|
||||
double dNewZCenter ;
|
||||
GetPixelZ( ptWinNew, dNewZCenter) ;
|
||||
Point3d ptViewNew( ptWinNew.x, ptWinNew.y, dNewZCenter) ;
|
||||
Point3d ptWorldNew ;
|
||||
if ( ! UnProject( ptViewNew, ptWorldNew))
|
||||
return false ;
|
||||
|
||||
Reference in New Issue
Block a user