Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MKSCamera::roll(const float& angle)
- {
- // Rotate around local Z axis
- Vector zAxis = m_qCurrent * Vector(1,0,0);
- rotate(zAxis, angle);
- }
- //-----------------------------------------------------------------------
- void MKSCamera::yaw(const float& angle)
- {
- Vector yAxis = m_qCurrent * Vector(0,0,1);
- rotate(yAxis, angle);
- }
- //-----------------------------------------------------------------------
- void MKSCamera::pitch(const float& angle)
- {
- // Rotate around local X axis
- Vector xAxis = m_qCurrent * Vector(0,1,0);
- rotate(xAxis, angle);
- }
- //-----------------------------------------------------------------------
- void MKSCamera::rotate(const Vector& axis, const float& angle)
- {
- Quat q;
- q.AxisAngle(axis, angle);
- rotate(q);
- }
- //-----------------------------------------------------------------------
- void MKSCamera::rotate(const Quat& q)
- {
- // Note the order of the mult, i.e. q comes after
- m_qCurrent = q * m_qCurrent;
- }
Advertisement
Add Comment
Please, Sign In to add comment