* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@Override
public void mouseMove(Vec2 position) {
if (m_bIsDragging) {
Vec2 iDiff = Vec2.sub(position, m_prevMousePos);
switch (m_RotateMode) {
case RM_DUAL_AXIS: {
Quaternion rot = calcRotationQuat(Axis.AXIS_Y.ordinal(), iDiff.x * m_rotateScale);
rot = Glm.normalize(calcRotationQuat(Axis.AXIS_X.ordinal(), - iDiff.y * m_rotateScale).mul(rot)); // Y axis is different in LWJGL
rotateViewDegrees(rot);
break;
}
case RM_BIAXIAL: {
Vec2 iInitDiff = Vec2.sub(position, m_startDragMousePos);
Axis eAxis;
float degAngle;
if (Math.abs(iInitDiff.x) > Math.abs(iInitDiff.y)) {
eAxis = Axis.AXIS_Y;