//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
+ Dz * gp_Pnt (ZX, ZY, ZZ).XYZ()
);
- AutoZFit();
+ View()->AutoZFit();
ImmediateUpdate();
}
myCamera->SetEye (myCamera->Eye().XYZ() + Length * gp_Pnt (Vx, Vy, Vz).XYZ());
- AutoZFit();
+ View()->AutoZFit();
ImmediateUpdate();
}
- Dz * gp_Pnt (ZX, ZY, ZZ).XYZ()
);
- AutoZFit();
+ View()->AutoZFit();
ImmediateUpdate();
}
break ;
}
}
-void V3d_View::Place (const Standard_Integer ix, const Standard_Integer iy,
- const Quantity_Factor aZoomFactor) {
- Standard_Real xpos, ypos;
- Standard_Integer xc, yc;
- Center (xpos, ypos);
- Convert (xpos, ypos, xc, yc);
- Pan (xc - ix, iy - yc, aZoomFactor / Scale());
+
+//=======================================================================
+//function : Place
+//purpose :
+//=======================================================================
+void V3d_View::Place (const Standard_Integer theXp,
+ const Standard_Integer theYp,
+ const Quantity_Factor theZoomFactor)
+{
+ Standard_Integer aWinWidth = 0;
+ Standard_Integer aWinHeight = 0;
+ View()->Window()->Size (aWinWidth, aWinHeight);
+
+ Standard_Integer aWinCXp = aWinWidth / 2;
+ Standard_Integer aWinCYp = aWinHeight / 2;
+ Pan (aWinCXp - theXp, -(aWinCYp - theYp), theZoomFactor / Scale());
}
void V3d_View::Translate(const Standard_Real theLength, const Standard_Boolean theStart) {
gp_Pnt aNewCenter (myCamStartOpCenter.XYZ() - gp_Pnt (aVx, aVy, aVz).XYZ() * theLength);
myCamera->SetCenter (aNewCenter);
- AutoZFit();
+ View()->AutoZFit();
ImmediateUpdate();
}