Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
tango_gl::Camera Class Reference

#include <camera.h>

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

Public Member Functions

 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
TransformGetParent ()
 
const TransformGetParent () const
 
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 ()
 

Static Public Member Functions

static glm::mat4 ProjectionMatrixForCameraIntrinsics (float width, float height, float fx, float fy, float cx, float cy, float near, float far)
 

Protected Attributes

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 23 of file camera.h.

Constructor & Destructor Documentation

◆ Camera() [1/2]

Camera::Camera ( )

Definition at line 22 of file camera.cpp.

◆ Camera() [2/2]

tango_gl::Camera::Camera ( const Camera other)
delete

◆ ~Camera()

Camera::~Camera ( )

Definition at line 62 of file camera.cpp.

Member Function Documentation

◆ getFarClipPlane()

float tango_gl::Camera::getFarClipPlane ( ) const
inline

Definition at line 40 of file camera.h.

◆ getNearClipPlane()

float tango_gl::Camera::getNearClipPlane ( ) const
inline

Definition at line 39 of file camera.h.

◆ GetProjectionMatrix()

glm::mat4 Camera::GetProjectionMatrix ( )

Definition at line 38 of file camera.cpp.

◆ GetViewMatrix()

glm::mat4 Camera::GetViewMatrix ( )

Definition at line 34 of file camera.cpp.

◆ operator=()

Camera& tango_gl::Camera::operator= ( const Camera )
delete

◆ ProjectionMatrixForCameraIntrinsics()

glm::mat4 Camera::ProjectionMatrixForCameraIntrinsics ( float  width,
float  height,
float  fx,
float  fy,
float  cx,
float  cy,
float  near,
float  far 
)
static

Create an OpenGL perspective matrix from window size, camera intrinsics, and clip settings.

Parameters
width- The width of the camera image.
height- The height of the camera image.
fx- The x-axis focal length of the camera.
fy- The y-axis focal length of the camera.
cx- The x-coordinate principal point in pixels.
cy- The y-coordinate principal point in pixels.
near- The desired near z-clipping plane.
far- The desired far z-clipping plane.

Definition at line 65 of file camera.cpp.

◆ SetFieldOfView()

void Camera::SetFieldOfView ( const float  fov)

Definition at line 52 of file camera.cpp.

◆ SetNearFarClipPlanes()

void Camera::SetNearFarClipPlanes ( const float  near,
const float  far 
)

Definition at line 56 of file camera.cpp.

◆ SetOrthoCropFactor()

void tango_gl::Camera::SetOrthoCropFactor ( float  value)
inline

Definition at line 34 of file camera.h.

◆ SetOrthoMode()

void tango_gl::Camera::SetOrthoMode ( bool  enabled)
inline

Definition at line 32 of file camera.h.

◆ SetOrthoScale()

void tango_gl::Camera::SetOrthoScale ( float  scale)
inline

Definition at line 33 of file camera.h.

◆ SetWindowSize()

void Camera::SetWindowSize ( const float  width,
const float  height 
)

Definition at line 46 of file camera.cpp.

Member Data Documentation

◆ aspect_ratio_

float tango_gl::Camera::aspect_ratio_
protected

Definition at line 60 of file camera.h.

◆ far_clip_plane_

float tango_gl::Camera::far_clip_plane_
protected

Definition at line 63 of file camera.h.

◆ field_of_view_

float tango_gl::Camera::field_of_view_
protected

Definition at line 59 of file camera.h.

◆ height_

float tango_gl::Camera::height_
protected

Definition at line 62 of file camera.h.

◆ near_clip_plane_

float tango_gl::Camera::near_clip_plane_
protected

Definition at line 63 of file camera.h.

◆ ortho_

bool tango_gl::Camera::ortho_
protected

Definition at line 64 of file camera.h.

◆ orthoCropFactor_

float tango_gl::Camera::orthoCropFactor_
protected

Definition at line 66 of file camera.h.

◆ orthoScale_

float tango_gl::Camera::orthoScale_
protected

Definition at line 65 of file camera.h.

◆ width_

float tango_gl::Camera::width_
protected

Definition at line 61 of file camera.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:29