From: <sv...@ww...> - 2005-04-03 16:58:52
|
Author: mkrose Date: 2005-04-03 09:58:44 -0700 (Sun, 03 Apr 2005) New Revision: 1509 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Views/View.cpp Log: Increase the left/right panning limits for the in-cockpit view. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1509 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-03 09:59:30 UTC (rev 1508) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-03 16:58:44 UTC (rev 1509) @@ -1,5 +1,7 @@ Version 0.4.0 (in progress) =========================== +2005-04-03: onsight + * Increase the left/right panning limits for the in-cockpit view. 2005-04-02: onsight * Add a DataChannel constructor that can be used for channel data types Modified: trunk/CSP/CSPSim/Source/Views/View.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Views/View.cpp 2005-04-03 09:59:30 UTC (rev 1508) +++ trunk/CSP/CSPSim/Source/Views/View.cpp 2005-04-03 16:58:44 UTC (rev 1509) @@ -81,9 +81,10 @@ } void InternalView::constrain() { - float limit = simdata::PI_2; - m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit, limit); - m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit, limit); + const float limit_phi = simdata::PI_2; + const float limit_theta = 1.5 * simdata::PI_2; + m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit_phi, limit_phi); + m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit_theta, limit_theta); } void InternalView::update(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double /*dt*/) { @@ -291,9 +292,10 @@ } void PadlockView::constrainNotPadlocked(simdata::Vector3& /*ep*/, simdata::Vector3& /*lp*/, simdata::Vector3& /*up*/, double /*dt*/) { - float limit = simdata::PI_2; - m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit, limit); - m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit, limit); + const float limit_phi = simdata::PI_2; + const float limit_theta = 1.5 * simdata::PI_2; + m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit_phi, limit_phi); + m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit_theta, limit_theta); } void PadlockView::update(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt) { |