Added 2 finger camera pan, zoom, and rotate
This commit is contained in:
parent
ac911f3f87
commit
8b46c31bd7
10 changed files with 295 additions and 18 deletions
|
|
@ -34,6 +34,8 @@ class DrawCamera {
|
|||
void input_mouse_button_on_canvas_callback(World& w, const InputManager::MouseButtonCallbackArgs& button);
|
||||
void input_mouse_motion_callback(World& w, const InputManager::MouseMotionCallbackArgs& motion);
|
||||
void input_mouse_wheel_callback(World& w, const InputManager::MouseWheelCallbackArgs& wheel);
|
||||
void input_multi_finger_touch_callback(World& w, const InputManager::MultiFingerTouchArgs& touch);
|
||||
void input_multi_finger_motion_callback(World& w, const InputManager::MultiFingerMotionArgs& motion);
|
||||
private:
|
||||
struct SmoothMove {
|
||||
CoordSpaceHelper start;
|
||||
|
|
@ -49,6 +51,9 @@ class DrawCamera {
|
|||
WorldScalar startZoomVal;
|
||||
WorldVec startZoomMousePos;
|
||||
WorldVec startZoomCameraPos;
|
||||
|
||||
bool isAccurateZooming = false;
|
||||
|
||||
CoordSpaceHelper touchInitialC;
|
||||
std::vector<Vector2f> touchInitialPositions;
|
||||
bool isTouchTransforming = false;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue