-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCameraManipulator.h
More file actions
45 lines (35 loc) · 1.19 KB
/
CameraManipulator.h
File metadata and controls
45 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "owl/owl.h"
#include "Camera.h"
/*Adapted from OWL Samples
* by Alper Sahistan 03/17/2023
*/
namespace deltaVis
{
class CameraManipulator
{
public:
CameraManipulator(Camera *camera);
~CameraManipulator();
bool ProcessEvents();
private:
/*! helper function: rotate camera frame by given degrees, then
make sure the frame, poidistance etc are all properly set,
the widget gets notified, etc */
void rotate(const float deg_x, const float deg_y);
/*! move forward/backward */
void move(const float step);
/*! strafe in camera plane */
void strafe(const owl::vec2f delta);
/*! mouse got dragged with left button pressedn, by 'delta'
pixels, at last position where */
void mouseDragLeft(const owl::vec2i &where, const owl::vec2i &delta);
/*! mouse got dragged with left button pressedn, by 'delta'
pixels, at last position where */
void mouseDragRight(const owl::vec2i &where, const owl::vec2i &delta);
/*! mouse got dragged with left button pressedn, by 'delta'
pixels, at last position where */
void mouseDragCenter(const owl::vec2i &where, const owl::vec2i &delta);
Camera* camera;
};
}