36 namespace visualization {
67 const Eigen::Matrix4d &model_matrix = Eigen::Matrix4d::Identity());
73 void SetLookat(
const Eigen::Vector3d &lookat);
74 void SetUp(
const Eigen::Vector3d &up);
75 void SetFront(
const Eigen::Vector3d &front);
76 void SetZoom(
const double zoom);
102 virtual void Scale(
double scale);
113 virtual void Rotate(
double x,
double y,
double xo = 0.0,
double yo = 0.0);
133 virtual void Roll(
double x);
gl_util::GLMatrix4f projection_matrix_
Definition: ViewControl.h:204
gl_util::GLMatrix4f GetMVPMatrix() const
Definition: ViewControl.h:151
static const double ROTATION_RADIAN_PER_PIXEL
Definition: ViewControl.h:53
double distance_
Definition: ViewControl.h:195
double z_near_
Definition: ViewControl.h:200
int Dimension() const
Returns whether the geometry is 2D or 3D.
Definition: Geometry.h:90
virtual void ChangeFieldOfView(double step)
Definition: ViewControl.cpp:272
The base geometry class.
Definition: Geometry.h:37
void SetProjectionParameters()
Definition: ViewControl.cpp:256
void SetZoom(const double zoom)
Definition: ViewControl.cpp:143
gl_util::GLVector3f GetUp() const
Definition: ViewControl.h:159
void SetUp(const Eigen::Vector3d &up)
Definition: ViewControl.cpp:133
Eigen::Matrix< GLfloat, 4, 4, Eigen::ColMajor > GLMatrix4f
Definition: GLHelper.h:53
int window_width_
Definition: ViewControl.h:187
Eigen::Vector3d lookat_
Definition: ViewControl.h:191
static const double ZOOM_MAX
Definition: ViewControl.h:50
ProjectionType
Definition: ViewControl.h:55
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:149
const geometry::AxisAlignedBoundingBox & GetBoundingBox() const
Definition: ViewControl.h:135
ProjectionType GetProjectionType() const
Definition: ViewControl.cpp:239
bool ConvertFromViewParameters(const ViewParameters &status)
Definition: ViewControl.cpp:116
View controller for visualizer.
Definition: ViewControl.h:41
void SetConstantZFar(double z_far)
Definition: ViewControl.h:176
int GetWindowWidth() const
Definition: ViewControl.h:162
void SetFront(const Eigen::Vector3d &front)
Definition: ViewControl.cpp:138
static const double FIELD_OF_VIEW_MAX
Definition: ViewControl.h:43
virtual void Scale(double scale)
Definition: ViewControl.cpp:287
gl_util::GLVector3f GetLookat() const
Definition: ViewControl.h:158
double z_far_
Definition: ViewControl.h:201
static const double ZOOM_DEFAULT
Definition: ViewControl.h:48
void ResetBoundingBox()
Definition: ViewControl.h:139
Definition: ViewControl.h:57
static const double FIELD_OF_VIEW_DEFAULT
Definition: ViewControl.h:45
gl_util::GLVector3f GetFront() const
Definition: ViewControl.h:160
gl_util::GLMatrix4f view_matrix_
Definition: ViewControl.h:205
double field_of_view_
Definition: ViewControl.h:196
Definition: ViewControl.h:56
Eigen::Vector3d eye_
Definition: ViewControl.h:190
void SetViewMatrices(const Eigen::Matrix4d &model_matrix=Eigen::Matrix4d::Identity())
Definition: ViewControl.cpp:57
void UnsetConstantZNear()
Definition: ViewControl.h:180
virtual ~ViewControl()
Definition: ViewControl.h:61
gl_util::GLMatrix4f GetProjectionMatrix() const
Definition: ViewControl.h:152
gl_util::GLMatrix4f MVP_matrix_
Definition: ViewControl.h:207
Eigen::Matrix< GLfloat, 3, 1, Eigen::ColMajor > GLVector3f
Definition: GLHelper.h:51
void UnsetConstantZFar()
Definition: ViewControl.h:184
The base geometry class for 3D geometries.
Definition: Geometry3D.h:46
Eigen::Vector3d right_
Definition: ViewControl.h:194
virtual void Translate(double x, double y, double xo=0.0, double yo=0.0)
Function to process translation.
Definition: ViewControl.cpp:306
virtual void ChangeWindowSize(int width, int height)
Definition: ViewControl.cpp:280
double GetZFar() const
Definition: ViewControl.h:165
static const double FIELD_OF_VIEW_STEP
Definition: ViewControl.h:46
gl_util::GLMatrix4f GetViewMatrix() const
Definition: ViewControl.h:155
geometry::AxisAlignedBoundingBox bounding_box_
Definition: ViewControl.h:189
double GetZNear() const
Definition: ViewControl.h:164
static const double FIELD_OF_VIEW_MIN
Definition: ViewControl.h:44
static const double ZOOM_MIN
Definition: ViewControl.h:49
double aspect_
Definition: ViewControl.h:199
Contains both intrinsic and extrinsic pinhole camera parameters.
Definition: PinholeCameraParameters.h:40
void FitInGeometry(const geometry::Geometry &geometry)
Definition: ViewControl.h:141
double constant_z_far_
Definition: ViewControl.h:203
int window_height_
Definition: ViewControl.h:188
int GetWindowHeight() const
Definition: ViewControl.h:163
Definition: PinholeCameraIntrinsic.cpp:35
double zoom_
Definition: ViewControl.h:197
virtual void Roll(double x)
Definition: ViewControl.cpp:317
void SetConstantZNear(double z_near)
Definition: ViewControl.h:171
double constant_z_near_
Definition: ViewControl.h:202
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:196
int height
Definition: FilePCD.cpp:72
Eigen::Vector3d up_
Definition: ViewControl.h:192
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
Definition: BoundingVolume.cpp:216
Definition: ViewParameters.h:37
gl_util::GLMatrix4f GetModelMatrix() const
Definition: ViewControl.h:156
double view_ratio_
Definition: ViewControl.h:198
void SetLookat(const Eigen::Vector3d &lookat)
Definition: ViewControl.cpp:128
bool ConvertToViewParameters(ViewParameters &status) const
Function to get equivalent view parameters (support orthogonal)
Definition: ViewControl.cpp:105
bool ConvertFromPinholeCameraParameters(const camera::PinholeCameraParameters ¶meters)
Definition: ViewControl.cpp:191
gl_util::GLVector3f GetEye() const
Definition: ViewControl.h:157
virtual void Reset()
Definition: ViewControl.cpp:247
gl_util::GLMatrix4f model_matrix_
Definition: ViewControl.h:206
Eigen::Vector3d front_
Definition: ViewControl.h:193
bool ConvertToPinholeCameraParameters(camera::PinholeCameraParameters ¶meters)
Definition: ViewControl.cpp:148
virtual void Rotate(double x, double y, double xo=0.0, double yo=0.0)
Function to process rotation.
Definition: ViewControl.cpp:292
double GetFieldOfView() const
Function to get field of view.
Definition: ViewControl.h:150
static const double ZOOM_STEP
Definition: ViewControl.h:51
gl_util::GLVector3f GetRight() const
Definition: ViewControl.h:161
int width
Definition: FilePCD.cpp:71