33 #include "../3d_math.h" 39 wxLogTrace(
m_logTrace, wxT(
"TRACK_BALL::TRACK_BALL" ) );
59 const float zoom = 1.0f;
68 float rotationMatrix[4][4];
165 wxASSERT( t >= 0.0f );
168 t = ( t > 1.0f ) ? 1.0f : t;
185 const float t0 = 1.0f - t;
192 float rotationMatrix[4][4];
void build_rotmatrix(float m[4][4], double q[4])
void Interpolate(float t) override
It will update the matrix to interpolate between T0 and T1 values.
bool m_parametersChanged
Set to true if any of the parameters in the camera was changed.
float BezierBlend(float t)
float QuadricEasingInOut(float t)
virtual void Reset()
Reset the camera to initial state.
void trackball(double q[4], double p1x, double p1y, double p2x, double p2y)
double m_quat[4]
quarternion of the trackball
A class used to derive camera objects from.
void SetT0_and_T1_current_T() override
This will set T0 and T1 with the current values.
PROJECTION_TYPE m_projectionType
wxPoint m_lastPosition
The last mouse position in the screen.
glm::mat4 m_rotationMatrix
void Reset() override
Reset the camera to initial state.
SFVEC2I m_windowSize
The window size that this camera is working.
CAMERA_INTERPOLATION m_interpolation_mode
void Pan(const wxPoint &aNewMousePosition) override
void add_quats(double q1[4], double q2[4], double dest[4])
virtual void SetT0_and_T1_current_T()
This will set T0 and T1 with the current values.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
virtual void Interpolate(float t)
It will update the matrix to interpolate between T0 and T1 values.
void Pan_T1(const SFVEC3F &aDeltaOffsetInc) override
TRACK_BALL(float aRangeScale)
void SetLookAtPos(const SFVEC3F &aLookAtPos) override
Declaration for a track ball camera.
void Drag(const wxPoint &aNewMousePosition) override
Calculate a new mouse drag position.