Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
tango_gl::GestureCamera Class Reference

#include <gesture_camera.h>

Inheritance diagram for tango_gl::GestureCamera:
Inheritance graph
[legend]

Public Types

enum  CameraType {
  kFirstPerson = 0, kThirdPersonFollow = 1, kTopDown = 2, kTopOrtho = 3,
  kThirdPerson = 4
}
 
enum  TouchEvent {
  kTouch0Down = 0, kTouch0Up = 1, kTouchMove = 2, kTouch1Down = 5,
  kTouch1Up = 6, kTouchNone = -1
}
 

Public Member Functions

 GestureCamera ()
 
const glm::vec3GetAnchorOffset () const
 
float GetCameraDistance () const
 
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 SetAnchorOffset (const glm::vec3 &pos)
 
void SetAnchorPosition (const glm::vec3 &pos, const glm::quat &rotation)
 
void SetCameraDistance (float cameraDistance)
 
void SetCameraType (CameraType camera_index)
 
 ~GestureCamera ()
 
- Public Member Functions inherited from tango_gl::Camera
 Camera ()
 
 Camera (const Camera &other)=delete
 
float getFarClipPlane () const
 
float getNearClipPlane () const
 
glm::mat4 GetProjectionMatrix ()
 
glm::mat4 GetViewMatrix ()
 
Cameraoperator= (const Camera &)=delete
 
void SetFieldOfView (const float fov)
 
void SetNearFarClipPlanes (const float near, const float far)
 
void SetOrthoCropFactor (float value)
 
void SetOrthoMode (bool enabled)
 
void SetOrthoScale (float scale)
 
void SetWindowSize (const float width, const float height)
 
 ~Camera ()
 
- Public Member Functions inherited from tango_gl::Transform
const TransformGetParent () const
 
TransformGetParent ()
 
glm::vec3 GetPosition () const
 
glm::quat GetRotation () const
 
glm::vec3 GetScale () const
 
glm::mat4 GetTransformationMatrix () const
 
const Transformoperator= (const Transform &rhs)=delete
 
void SetParent (Transform *transform)
 
void SetPosition (const glm::vec3 &position)
 
void SetRotation (const glm::quat &rotation)
 
void SetScale (const glm::vec3 &scale)
 
void SetTransformationMatrix (const glm::mat4 &transform_mat)
 
 Transform ()
 
 Transform (const Transform &other)=delete
 
void Translate (const glm::vec3 &translation)
 
virtual ~Transform ()
 

Private Member Functions

void StartCameraToCurrentTransform ()
 

Private Attributes

glm::vec3 anchor_offset_
 
glm::vec2 cam_cur_angle_
 
float cam_cur_dist_
 
glm::quat cam_cur_target_rot_
 
Transformcam_parent_transform_
 
glm::vec2 cam_start_angle_
 
float cam_start_dist_
 
float cam_start_fov_
 
CameraType camera_type_
 
float cur_touch_dist_
 
float start_touch_dist_
 
glm::vec2 touch0_start_position_
 

Additional Inherited Members

- Static Public Member Functions inherited from tango_gl::Camera
static glm::mat4 ProjectionMatrixForCameraIntrinsics (float width, float height, float fx, float fy, float cx, float cy, float near, float far)
 
- Protected Attributes inherited from tango_gl::Camera
float aspect_ratio_
 
float far_clip_plane_
 
float field_of_view_
 
float height_
 
float near_clip_plane_
 
bool ortho_
 
float orthoCropFactor_
 
float orthoScale_
 
float width_
 

Detailed Description

Definition at line 26 of file gesture_camera.h.

Member Enumeration Documentation

Enumerator
kFirstPerson 
kThirdPersonFollow 
kTopDown 
kTopOrtho 
kThirdPerson 

Definition at line 28 of file gesture_camera.h.

Enumerator
kTouch0Down 
kTouch0Up 
kTouchMove 
kTouch1Down 
kTouch1Up 
kTouchNone 

Definition at line 36 of file gesture_camera.h.

Constructor & Destructor Documentation

tango_gl::GestureCamera::GestureCamera ( )

Definition at line 53 of file gesture_camera.cpp.

tango_gl::GestureCamera::~GestureCamera ( )

Definition at line 62 of file gesture_camera.cpp.

Member Function Documentation

const glm::vec3& tango_gl::GestureCamera::GetAnchorOffset ( ) const
inline

Definition at line 60 of file gesture_camera.h.

float tango_gl::GestureCamera::GetCameraDistance ( ) const
inline

Definition at line 63 of file gesture_camera.h.

CameraType tango_gl::GestureCamera::GetCameraType ( ) const
inline

Definition at line 68 of file gesture_camera.h.

float tango_gl::GestureCamera::getFOV ( ) const
inline

Definition at line 69 of file gesture_camera.h.

Segment tango_gl::GestureCamera::GetSegmentFromTouch ( float  normalized_x,
float  normalized_y,
float  touch_range 
)

Definition at line 144 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 64 of file gesture_camera.cpp.

void tango_gl::GestureCamera::SetAnchorOffset ( const glm::vec3 pos)
inline

Definition at line 59 of file gesture_camera.h.

void tango_gl::GestureCamera::SetAnchorPosition ( const glm::vec3 pos,
const glm::quat rotation 
)

Definition at line 163 of file gesture_camera.cpp.

void tango_gl::GestureCamera::SetCameraDistance ( float  cameraDistance)
inline

Definition at line 62 of file gesture_camera.h.

void tango_gl::GestureCamera::SetCameraType ( CameraType  camera_index)

Definition at line 178 of file gesture_camera.cpp.

void tango_gl::GestureCamera::StartCameraToCurrentTransform ( )
private

Definition at line 237 of file gesture_camera.cpp.

Member Data Documentation

glm::vec3 tango_gl::GestureCamera::anchor_offset_
private

Definition at line 86 of file gesture_camera.h.

glm::vec2 tango_gl::GestureCamera::cam_cur_angle_
private

Definition at line 80 of file gesture_camera.h.

float tango_gl::GestureCamera::cam_cur_dist_
private

Definition at line 85 of file gesture_camera.h.

glm::quat tango_gl::GestureCamera::cam_cur_target_rot_
private

Definition at line 81 of file gesture_camera.h.

Transform* tango_gl::GestureCamera::cam_parent_transform_
private

Definition at line 75 of file gesture_camera.h.

glm::vec2 tango_gl::GestureCamera::cam_start_angle_
private

Definition at line 79 of file gesture_camera.h.

float tango_gl::GestureCamera::cam_start_dist_
private

Definition at line 83 of file gesture_camera.h.

float tango_gl::GestureCamera::cam_start_fov_
private

Definition at line 84 of file gesture_camera.h.

CameraType tango_gl::GestureCamera::camera_type_
private

Definition at line 77 of file gesture_camera.h.

float tango_gl::GestureCamera::cur_touch_dist_
private

Definition at line 89 of file gesture_camera.h.

float tango_gl::GestureCamera::start_touch_dist_
private

Definition at line 88 of file gesture_camera.h.

glm::vec2 tango_gl::GestureCamera::touch0_start_position_
private

Definition at line 91 of file gesture_camera.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:09