57 float fNewLatitude =
Clamp( vSphereZBasis.
z + fDeltaLatitude,
61 Vector vSphereNewZBasis( 1, vSphereZBasis.
y + fDeltaLongitude, fNewLatitude );
62 Vector vSphereNewYBasis( 1, vSphereNewZBasis.
y, vSphereNewZBasis.
z +
kfHalfPi );
73 static const float kfZScale = -0.15f;
87 static const float kfMouseOrbitAngleScale = 1/1024.0f;
void OnMouseDown(const Leap::Vector &vMousePos)
Vector cross(const Vector &other) const
bool IsNearZero(float fVal)
Leap::Vector m_vLastMousePos
T Clamp(T inVal, T minVal, T maxVal)
float m_fMaxOrbitLatitude
void OnMouseWheel(float fDeltaZ)
convenience methods for mapping mouse movements to orbit camera movements.
static const float kfHalfPi
TFSIMD_FORCE_INLINE Vector3 normalized() const
void RotateOrbit(float fDeltaMagnitude, float fDeltaLongitude, float fDeltaLatitude)
void OnMouseMoveOrbit(const Leap::Vector &vMousePos)
void Move(const Leap::Vector &vDeltaPos)
translate the position of the camera (move it from its current position) by the specified offset ...
Leap::Vector SphericalToCartesian(const Leap::Vector &vSpherical)
float dot(const Vector &other) const
void updateOrbitDistance()
Leap::Vector CartesianToSpherical(const Leap::Vector &vCartesian)
static const Vector & zero()
Leap::Vector NormalizeSpherical(const Leap::Vector &vSpherical)
set magnitude to 1 and bring heading to (-Pi,Pi], elevation into [-Pi/2, Pi/2]
void SetPOVLookAt(const Leap::Vector &vCameraPosition, const Leap::Vector &vTarget, Leap::Vector vUp=Leap::Vector::yAxis())
places the camera a the given position with it pointing towards the specified target position ...