18 namespace visualization {
49 const Eigen::Matrix4d &model_matrix = Eigen::Matrix4d::Identity());
55 void SetLookat(
const Eigen::Vector3d &lookat);
56 void SetUp(
const Eigen::Vector3d &up);
57 void SetFront(
const Eigen::Vector3d &front);
58 void SetZoom(
const double zoom);
75 bool allow_arbitrary =
false);
96 virtual void Scale(
double scale);
107 virtual void Rotate(
double x,
double y,
double xo = 0.0,
double yo = 0.0);
134 virtual void Roll(
double x);
Contains both intrinsic and extrinsic pinhole camera parameters.
Definition: PinholeCameraParameters.h:21
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:159
virtual AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns the object itself.
Definition: BoundingVolume.cpp:244
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:224
The base geometry class for 3D geometries.
Definition: Geometry3D.h:28
The base geometry class.
Definition: Geometry.h:18
int Dimension() const
Returns whether the geometry is 2D or 3D.
Definition: Geometry.h:71
A ray is a semantic interpretation of Eigen::ParametrizedLine which has an origin and a direction and...
Definition: Line3D.h:240
View controller for visualizer.
Definition: ViewControl.h:23
Eigen::Vector3d start_local_rotate_right_
Definition: ViewControl.h:211
virtual void ResetCameraLocalRotate()
Definition: ViewControl.cpp:384
double local_rotate_up_accum_
Definition: ViewControl.h:215
void UnsetConstantZNear()
Definition: ViewControl.h:181
double distance_
Definition: ViewControl.h:196
gl_util::GLVector3f GetEye() const
Definition: ViewControl.h:158
bool ConvertFromViewParameters(const ViewParameters &status)
Definition: ViewControl.cpp:97
Eigen::Vector3d right_
Definition: ViewControl.h:195
double zoom_
Definition: ViewControl.h:198
double z_far_
Definition: ViewControl.h:202
double GetZNear() const
Definition: ViewControl.h:165
Eigen::Vector3d up_
Definition: ViewControl.h:193
gl_util::GLVector3f GetRight() const
Definition: ViewControl.h:162
void SetZoom(const double zoom)
Definition: ViewControl.cpp:124
void SetUp(const Eigen::Vector3d &up)
Definition: ViewControl.cpp:114
Eigen::Vector3d lookat_
Definition: ViewControl.h:192
double aspect_
Definition: ViewControl.h:200
gl_util::GLMatrix4f model_matrix_
Definition: ViewControl.h:207
Eigen::Vector3d front_
Definition: ViewControl.h:194
gl_util::GLVector3f GetUp() const
Definition: ViewControl.h:160
Eigen::Vector3d start_local_rotate_up_
Definition: ViewControl.h:210
void FitInGeometry(const geometry::Geometry &geometry)
Definition: ViewControl.h:142
Eigen::Vector3d start_local_rotate_front_
Definition: ViewControl.h:212
static const double ROTATION_RADIAN_PER_PIXEL
Definition: ViewControl.h:35
virtual void CameraLocalTranslate(double forward, double right, double up)
Definition: ViewControl.cpp:333
int window_width_
Definition: ViewControl.h:188
static const double ZOOM_MIN
Definition: ViewControl.h:31
virtual ~ViewControl()
Definition: ViewControl.h:43
double view_ratio_
Definition: ViewControl.h:199
static const double FIELD_OF_VIEW_STEP
Definition: ViewControl.h:28
Eigen::Vector3d start_local_rotate_lookat_
Definition: ViewControl.h:214
gl_util::GLMatrix4f projection_matrix_
Definition: ViewControl.h:205
static const double FIELD_OF_VIEW_DEFAULT
Definition: ViewControl.h:27
Eigen::Vector3d eye_
Definition: ViewControl.h:191
gl_util::GLMatrix4f MVP_matrix_
Definition: ViewControl.h:208
double constant_z_near_
Definition: ViewControl.h:203
geometry::Ray3D UnprojectPoint(double x, double y) const
Definition: ViewControl.cpp:275
int window_height_
Definition: ViewControl.h:189
virtual void Translate(double x, double y, double xo=0.0, double yo=0.0)
Function to process translation.
Definition: ViewControl.cpp:322
void SetViewMatrices(const Eigen::Matrix4d &model_matrix=Eigen::Matrix4d::Identity())
Definition: ViewControl.cpp:38
double constant_z_far_
Definition: ViewControl.h:204
void SetConstantZFar(double z_far)
Definition: ViewControl.h:177
static const double ZOOM_MAX
Definition: ViewControl.h:32
Eigen::Vector3d start_local_rotate_eye_
Definition: ViewControl.h:213
static const double FIELD_OF_VIEW_MAX
Definition: ViewControl.h:25
gl_util::GLMatrix4f GetViewMatrix() const
Definition: ViewControl.h:156
void SetProjectionParameters()
Definition: ViewControl.cpp:243
bool ConvertToViewParameters(ViewParameters &status) const
Function to get equivalent view parameters (support orthogonal)
Definition: ViewControl.cpp:86
virtual void Roll(double x)
Definition: ViewControl.cpp:394
double GetZFar() const
Definition: ViewControl.h:166
virtual void CameraLocalRotate(double x, double y, double xo=0.0, double yo=0.0)
Definition: ViewControl.cpp:341
void SetFront(const Eigen::Vector3d &front)
Definition: ViewControl.cpp:119
gl_util::GLVector3f GetFront() const
Definition: ViewControl.h:161
static const double FIELD_OF_VIEW_MIN
Definition: ViewControl.h:26
const geometry::AxisAlignedBoundingBox & GetBoundingBox() const
Definition: ViewControl.h:136
gl_util::GLMatrix4f view_matrix_
Definition: ViewControl.h:206
gl_util::GLMatrix4f GetModelMatrix() const
Definition: ViewControl.h:157
void UnsetConstantZFar()
Definition: ViewControl.h:185
void SetConstantZNear(double z_near)
Definition: ViewControl.h:172
ProjectionType
Definition: ViewControl.h:37
@ Orthogonal
Definition: ViewControl.h:39
@ Perspective
Definition: ViewControl.h:38
virtual void ChangeWindowSize(int width, int height)
Definition: ViewControl.cpp:268
bool ConvertToPinholeCameraParameters(camera::PinholeCameraParameters ¶meters)
Definition: ViewControl.cpp:129
virtual void Reset()
Definition: ViewControl.cpp:234
ProjectionType GetProjectionType() const
Definition: ViewControl.cpp:226
gl_util::GLMatrix4f GetProjectionMatrix() const
Definition: ViewControl.h:153
gl_util::GLVector3f GetLookat() const
Definition: ViewControl.h:159
bool ConvertFromPinholeCameraParameters(const camera::PinholeCameraParameters ¶meters, bool allow_arbitrary=false)
Definition: ViewControl.cpp:172
double field_of_view_
Definition: ViewControl.h:197
double z_near_
Definition: ViewControl.h:201
virtual void Rotate(double x, double y, double xo=0.0, double yo=0.0)
Function to process rotation.
Definition: ViewControl.cpp:308
static const double ZOOM_STEP
Definition: ViewControl.h:33
double local_rotate_right_accum_
Definition: ViewControl.h:216
int GetWindowHeight() const
Definition: ViewControl.h:164
void ResetBoundingBox()
Definition: ViewControl.h:140
void SetLookat(const Eigen::Vector3d &lookat)
Definition: ViewControl.cpp:109
geometry::AxisAlignedBoundingBox bounding_box_
Definition: ViewControl.h:190
static const double ZOOM_DEFAULT
Definition: ViewControl.h:30
virtual void ChangeFieldOfView(double step)
Definition: ViewControl.cpp:260
double GetFieldOfView() const
Function to get field of view.
Definition: ViewControl.h:151
gl_util::GLMatrix4f GetMVPMatrix() const
Definition: ViewControl.h:152
int GetWindowWidth() const
Definition: ViewControl.h:163
virtual void Scale(double scale)
Definition: ViewControl.cpp:303
Definition: ViewParameters.h:18
Eigen::Matrix< GLfloat, 4, 4, Eigen::ColMajor > GLMatrix4f
Definition: GLHelper.h:34
Eigen::Matrix< GLfloat, 3, 1, Eigen::ColMajor > GLVector3f
Definition: GLHelper.h:32
Definition: PinholeCameraIntrinsic.cpp:16