2 #ifndef MOUSE_POLES_UTIL_H
3 #define MOUSE_POLES_UTIL_H
10 #include <glm/glm.hpp>
11 #include <glm/gtc/quaternion.hpp>
135 const glm::ivec2 &position);
138 void MouseMove(
const glm::ivec2 &position);
147 void MouseWheel(
int direction,
int modifiers,
const glm::ivec2 &position);
177 void RotateWorldDegrees(
const glm::fquat &rot,
bool bFromInitial =
false);
178 void RotateLocalDegrees(
const glm::fquat &rot,
bool bFromInitial =
false);
179 void RotateViewDegrees(
const glm::fquat &rot,
bool bFromInitial =
false);
181 const ViewProvider *m_pView;
183 ObjectData m_initialPo;
189 RotateMode m_RotateMode;
192 glm::ivec2 m_prevMousePos;
193 glm::ivec2 m_startDragMousePos;
194 glm::fquat m_startDragOrient;
287 void MouseClick(
MouseButtons button,
bool isPressed,
int modifiers,
const glm::ivec2 &position);
288 void MouseMove(
const glm::ivec2 &position);
289 void MouseWheel(
int direction,
int modifiers,
const glm::ivec2 &position);
290 void CharPress(
char key);
307 void OffsetTargetPos(TargetOffsetDir eDir,
float worldDistance);
308 void OffsetTargetPos(
const glm::vec3 &cameraOffset);
320 ViewScale m_viewScale;
322 ViewData m_initialView;
324 bool m_bRightKeyboardCtrls;
328 RotateMode m_RotateMode;
330 float m_degStarDragSpin;
331 glm::ivec2 m_startDragMouseLoc;
332 glm::fquat m_startDragOrient;
334 void ProcessXChange(
int iXDiff,
bool bClearY =
false);
335 void ProcessYChange(
int iYDiff,
bool bClearXZ =
false);
336 void ProcessXYChange(
int iXDiff,
int iYDiff);
337 void ProcessSpinAxis(
int iXDiff,
int iYDiff);
339 void BeginDragRotate(
const glm::ivec2 &ptStart, RotateMode rotMode = RM_DUAL_AXIS_ROTATE);
340 void OnDragRotate(
const glm::ivec2 &ptCurr);
341 void EndDragRotate(
const glm::ivec2 &ptEnd,
bool bKeepResults =
true);
343 void MoveCloser(
bool bLargeStep =
true);
344 void MoveAway(
bool bLargeStep =
true);
351 #endif //MOUSE_POLES_UTIL_H