camera.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef TANGO_GL_CAMERA_H_
18 #define TANGO_GL_CAMERA_H_
19 
20 #include "tango-gl/transform.h"
21 
22 namespace tango_gl {
23 class Camera : public Transform {
24  public:
25  Camera();
26  Camera(const Camera& other) = delete;
27  Camera& operator=(const Camera&) = delete;
28  ~Camera();
29 
30  void SetWindowSize(const float width, const float height);
31  void SetFieldOfView(const float fov);
32  void SetOrthoMode(bool enabled) {ortho_ = enabled;}
33  void SetOrthoScale(float scale) {orthoScale_ = scale;}
34  void SetOrthoCropFactor(float value) {orthoCropFactor_ = value;}
35  void SetNearFarClipPlanes(const float near, const float far);
36 
39  float getNearClipPlane() const {return near_clip_plane_;}
40  float getFarClipPlane() const {return far_clip_plane_;}
41 
54  static glm::mat4 ProjectionMatrixForCameraIntrinsics(float width, float height,
55  float fx, float fy,
56  float cx, float cy,
57  float near, float far);
58  protected:
61  float width_;
62  float height_;
64  bool ortho_;
65  float orthoScale_;
67 };
68 } // namespace tango_gl
69 #endif // TANGO_GL_CAMERA_H_
tango_gl::Camera::aspect_ratio_
float aspect_ratio_
Definition: camera.h:60
tango_gl::Camera::GetViewMatrix
glm::mat4 GetViewMatrix()
Definition: camera.cpp:34
tango_gl::Camera::SetOrthoMode
void SetOrthoMode(bool enabled)
Definition: camera.h:32
tango_gl::Camera::height_
float height_
Definition: camera.h:62
tango_gl::Camera::orthoScale_
float orthoScale_
Definition: camera.h:65
tango_gl::Camera::getNearClipPlane
float getNearClipPlane() const
Definition: camera.h:39
tango_gl::Camera::SetWindowSize
void SetWindowSize(const float width, const float height)
Definition: camera.cpp:46
tango_gl::Camera::SetOrthoScale
void SetOrthoScale(float scale)
Definition: camera.h:33
tango_gl::Camera::width_
float width_
Definition: camera.h:61
tango_gl::Camera::~Camera
~Camera()
Definition: camera.cpp:62
glm::detail::tmat4x4
Definition: type_mat.hpp:47
tango_gl::Camera::Camera
Camera()
Definition: camera.cpp:22
tango_gl::Camera::GetProjectionMatrix
glm::mat4 GetProjectionMatrix()
Definition: camera.cpp:38
tango_gl::Camera::SetFieldOfView
void SetFieldOfView(const float fov)
Definition: camera.cpp:52
tango_gl::Camera::field_of_view_
float field_of_view_
Definition: camera.h:59
scale
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics scale
tango_gl::Transform
Definition: transform.h:24
tango_gl::Camera::operator=
Camera & operator=(const Camera &)=delete
tango_gl::Camera
Definition: camera.h:23
tango_gl::Camera::ortho_
bool ortho_
Definition: camera.h:64
tango_gl::Camera::SetOrthoCropFactor
void SetOrthoCropFactor(float value)
Definition: camera.h:34
transform.h
tango_gl::Camera::orthoCropFactor_
float orthoCropFactor_
Definition: camera.h:66
tango_gl::Camera::far_clip_plane_
float far_clip_plane_
Definition: camera.h:63
tango_gl
Definition: axis.cpp:20
tango_gl::Camera::ProjectionMatrixForCameraIntrinsics
static glm::mat4 ProjectionMatrixForCameraIntrinsics(float width, float height, float fx, float fy, float cx, float cy, float near, float far)
Definition: camera.cpp:65
tango_gl::Camera::SetNearFarClipPlanes
void SetNearFarClipPlanes(const float near, const float far)
Definition: camera.cpp:56
tango_gl::Camera::getFarClipPlane
float getFarClipPlane() const
Definition: camera.h:40
value
value
other
other
tango_gl::Camera::near_clip_plane_
float near_clip_plane_
Definition: camera.h:63


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