#include <gesture_camera.h>
Public Types | |
enum | CameraType { kFirstPerson = 0, kThirdPersonFollow = 1, kTopDown = 2, kThirdPerson = 3 } |
enum | TouchEvent { kTouch0Down = 0, kTouch0Up = 1, kTouchMove = 2, kTouch1Down = 5, kTouch1Up = 6, kTouchNone = -1 } |
Public Member Functions | |
GestureCamera () | |
CameraType | GetCameraType () const |
float | getFOV () const |
Segment | GetSegmentFromTouch (float normalized_x, float normalized_y, float touch_range) |
void | OnTouchEvent (int touch_count, TouchEvent event, float x0, float y0, float x1, float y1) |
void | SetAnchorPosition (const glm::vec3 &pos, const glm::quat &rotation) |
void | SetCameraType (CameraType camera_index) |
~GestureCamera () | |
Private Member Functions | |
void | StartCameraToCurrentTransform () |
Private Attributes | |
glm::vec2 | cam_cur_angle_ |
float | cam_cur_dist_ |
glm::quat | cam_cur_target_rot_ |
Transform * | cam_parent_transform_ |
glm::vec2 | cam_start_angle_ |
float | cam_start_dist_ |
CameraType | camera_type_ |
float | cur_touch_dist_ |
float | start_touch_dist_ |
glm::vec2 | touch0_start_position_ |
Definition at line 26 of file gesture_camera.h.
Definition at line 28 of file gesture_camera.h.
Definition at line 35 of file gesture_camera.h.
Definition at line 46 of file gesture_camera.cpp.
Definition at line 55 of file gesture_camera.cpp.
CameraType tango_gl::GestureCamera::GetCameraType | ( | ) | const [inline] |
Definition at line 62 of file gesture_camera.h.
float tango_gl::GestureCamera::getFOV | ( | ) | const [inline] |
Definition at line 63 of file gesture_camera.h.
Segment tango_gl::GestureCamera::GetSegmentFromTouch | ( | float | normalized_x, |
float | normalized_y, | ||
float | touch_range | ||
) |
Definition at line 109 of file gesture_camera.cpp.
void tango_gl::GestureCamera::OnTouchEvent | ( | int | touch_count, |
TouchEvent | event, | ||
float | x0, | ||
float | y0, | ||
float | x1, | ||
float | y1 | ||
) |
Definition at line 57 of file gesture_camera.cpp.
void tango_gl::GestureCamera::SetAnchorPosition | ( | const glm::vec3 & | pos, |
const glm::quat & | rotation | ||
) |
Definition at line 128 of file gesture_camera.cpp.
void tango_gl::GestureCamera::SetCameraType | ( | CameraType | camera_index | ) |
Definition at line 140 of file gesture_camera.cpp.
void tango_gl::GestureCamera::StartCameraToCurrentTransform | ( | ) | [private] |
Definition at line 180 of file gesture_camera.cpp.
Definition at line 74 of file gesture_camera.h.
float tango_gl::GestureCamera::cam_cur_dist_ [private] |
Definition at line 78 of file gesture_camera.h.
Definition at line 75 of file gesture_camera.h.
Definition at line 69 of file gesture_camera.h.
Definition at line 73 of file gesture_camera.h.
float tango_gl::GestureCamera::cam_start_dist_ [private] |
Definition at line 77 of file gesture_camera.h.
Definition at line 71 of file gesture_camera.h.
float tango_gl::GestureCamera::cur_touch_dist_ [private] |
Definition at line 81 of file gesture_camera.h.
float tango_gl::GestureCamera::start_touch_dist_ [private] |
Definition at line 80 of file gesture_camera.h.
Definition at line 83 of file gesture_camera.h.