![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <ViewControlWithEditing.h>


Public Types | |
| enum | EditingMode { FreeMode = 0 , OrthoPositiveX = 1 , OrthoNegativeX = 2 , OrthoPositiveY = 3 , OrthoNegativeY = 4 , OrthoPositiveZ = 5 , OrthoNegativeZ = 6 } |
Public Types inherited from cloudViewer::visualization::ViewControl | |
| enum | ProjectionType { Perspective = 0 , Orthogonal = 1 } |
Public Member Functions | |
| virtual | ~ViewControlWithEditing () |
| void | Reset () override |
| void | ChangeFieldOfView (double step) override |
| void | Scale (double scale) override |
| void | Rotate (double x, double y, double xo, double yo) override |
| Function to process rotation. More... | |
| void | Translate (double x, double y, double xo, double yo) override |
| Function to process translation. More... | |
| void | SetEditingMode (EditingMode mode) |
| std::string | GetStatusString () const |
| EditingMode | GetEditingMode () const |
| void | ToggleEditingX () |
| void | ToggleEditingY () |
| void | ToggleEditingZ () |
| void | ToggleLocking () |
| bool | IsLocked () const |
Public Member Functions inherited from cloudViewer::visualization::ViewControl | |
| virtual | ~ViewControl () |
| void | SetViewMatrices (const Eigen::Matrix4d &model_matrix=Eigen::Matrix4d::Identity()) |
| bool | ConvertToViewParameters (ViewParameters &status) const |
| Function to get equivalent view parameters (support orthogonal) More... | |
| bool | ConvertFromViewParameters (const ViewParameters &status) |
| void | SetZoom (const double zoom) |
| void | SetUp (const Eigen::Vector3d &up) |
| void | SetFront (const Eigen::Vector3d &front) |
| void | SetLookat (const Eigen::Vector3d &lookat) |
| bool | ConvertToPinholeCameraParameters (camera::PinholeCameraParameters ¶meters) |
| bool | ConvertFromPinholeCameraParameters (const camera::PinholeCameraParameters ¶meters, bool allow_arbitrary=false) |
| ProjectionType | GetProjectionType () const |
| void | SetProjectionParameters () |
| virtual void | ChangeWindowSize (int width, int height) |
| virtual void | CameraLocalTranslate (double forward, double right, double up) |
| virtual void | CameraLocalRotate (double x, double y, double xo=0.0, double yo=0.0) |
| virtual void | ResetCameraLocalRotate () |
| virtual void | Roll (double x) |
| const ccBBox & | GetBoundingBox () const |
| void | ResetBoundingBox () |
| void | FitInGeometry (const ccHObject &geometry) |
| double | GetFieldOfView () const |
| Function to get field of view. More... | |
| gl_util::GLMatrix4f | GetMVPMatrix () const |
| gl_util::GLMatrix4f | GetProjectionMatrix () const |
| gl_util::GLMatrix4f | GetViewMatrix () const |
| gl_util::GLMatrix4f | GetModelMatrix () const |
| gl_util::GLVector3f | GetEye () const |
| gl_util::GLVector3f | GetLookat () const |
| gl_util::GLVector3f | GetUp () const |
| gl_util::GLVector3f | GetFront () const |
| gl_util::GLVector3f | GetRight () const |
| int | GetWindowWidth () const |
| int | GetWindowHeight () const |
| double | GetZNear () const |
| double | GetZFar () const |
| void | SetConstantZNear (double z_near) |
| void | SetConstantZFar (double z_far) |
| void | UnsetConstantZNear () |
| void | UnsetConstantZFar () |
Protected Attributes | |
| EditingMode | editing_mode_ = FreeMode |
| ViewParameters | view_status_backup_ |
| bool | is_view_locked_ = false |
Protected Attributes inherited from cloudViewer::visualization::ViewControl | |
| int | window_width_ = 0 |
| int | window_height_ = 0 |
| ccBBox | bounding_box_ |
| Eigen::Vector3d | eye_ |
| Eigen::Vector3d | lookat_ |
| Eigen::Vector3d | up_ |
| Eigen::Vector3d | front_ |
| Eigen::Vector3d | right_ |
| double | distance_ |
| double | field_of_view_ |
| double | zoom_ |
| double | view_ratio_ |
| double | aspect_ |
| double | z_near_ |
| double | z_far_ |
| double | constant_z_near_ = -1 |
| double | constant_z_far_ = -1 |
| gl_util::GLMatrix4f | projection_matrix_ |
| gl_util::GLMatrix4f | view_matrix_ |
| gl_util::GLMatrix4f | model_matrix_ |
| gl_util::GLMatrix4f | MVP_matrix_ |
| Eigen::Vector3d | start_local_rotate_up_ |
| Eigen::Vector3d | start_local_rotate_right_ |
| Eigen::Vector3d | start_local_rotate_front_ |
| Eigen::Vector3d | start_local_rotate_eye_ |
| Eigen::Vector3d | start_local_rotate_lookat_ |
| double | local_rotate_up_accum_ |
| double | local_rotate_right_accum_ |
Additional Inherited Members | |
Static Public Attributes inherited from cloudViewer::visualization::ViewControl | |
| static const double | FIELD_OF_VIEW_MAX = 90.0 |
| static const double | FIELD_OF_VIEW_MIN = 5.0 |
| static const double | FIELD_OF_VIEW_DEFAULT = 60.0 |
| static const double | FIELD_OF_VIEW_STEP = 5.0 |
| static const double | ZOOM_DEFAULT = 0.7 |
| static const double | ZOOM_MIN = 0.02 |
| static const double | ZOOM_MAX = 2.0 |
| static const double | ZOOM_STEP = 0.02 |
| static const double | ROTATION_RADIAN_PER_PIXEL = 0.003 |
Definition at line 15 of file ViewControlWithEditing.h.
| Enumerator | |
|---|---|
| FreeMode | |
| OrthoPositiveX | |
| OrthoNegativeX | |
| OrthoPositiveY | |
| OrthoNegativeY | |
| OrthoPositiveZ | |
| OrthoNegativeZ | |
Definition at line 17 of file ViewControlWithEditing.h.
|
inlinevirtual |
Definition at line 28 of file ViewControlWithEditing.h.
|
overridevirtual |
Function to change field of view.
| step | The step to change field of view. |
Reimplemented from cloudViewer::visualization::ViewControl.
Definition at line 53 of file ViewControlWithEditing.cpp.
References cloudViewer::visualization::ViewControl::ChangeFieldOfView(), editing_mode_, and IsLocked().
|
inline |
Definition at line 39 of file ViewControlWithEditing.h.
References editing_mode_.
| std::string cloudViewer::visualization::ViewControlWithEditing::GetStatusString | ( | ) | const |
Definition at line 116 of file ViewControlWithEditing.cpp.
References editing_mode_, and IsLocked().
|
inline |
Definition at line 65 of file ViewControlWithEditing.h.
References is_view_locked_.
Referenced by ChangeFieldOfView(), GetStatusString(), Reset(), Rotate(), Scale(), SetEditingMode(), and Translate().
|
overridevirtual |
Reimplemented from cloudViewer::visualization::ViewControl.
Definition at line 13 of file ViewControlWithEditing.cpp.
References cloudViewer::visualization::ViewControl::bounding_box_, editing_mode_, cloudViewer::visualization::ViewControl::field_of_view_, cloudViewer::visualization::ViewControl::FIELD_OF_VIEW_MIN, cloudViewer::visualization::ViewControl::front_, ccBBox::GetCenter(), IsLocked(), cloudViewer::visualization::ViewControl::lookat_, cloudViewer::visualization::ViewControl::Reset(), cloudViewer::visualization::ViewControl::SetProjectionParameters(), cloudViewer::visualization::ViewControl::up_, cloudViewer::visualization::ViewControl::zoom_, and cloudViewer::visualization::ViewControl::ZOOM_DEFAULT.
Referenced by SetEditingMode().
|
overridevirtual |
Function to process rotation.
Coordinates are measured in screen coordinates relative to the top-left corner of the window client area.
| x | The distance the mouse cursor has moved in x-axis. |
| y | The distance the mouse cursor has moved in y-axis. |
| xo | Original point coordinate of the mouse in x-axis. |
| yo | Original point coordinate of the mouse in y-axis. |
Reimplemented from cloudViewer::visualization::ViewControl.
Definition at line 71 of file ViewControlWithEditing.cpp.
References abs(), editing_mode_, IsLocked(), cloudViewer::visualization::ViewControl::right_, cloudViewer::visualization::ViewControl::Rotate(), cloudViewer::visualization::ViewControl::SetProjectionParameters(), cloudViewer::visualization::ViewControl::up_, cloudViewer::visualization::ViewControl::window_height_, and cloudViewer::visualization::ViewControl::window_width_.
|
overridevirtual |
Function to process scaling
| scale | is the scale ratio. |
Reimplemented from cloudViewer::visualization::ViewControl.
Definition at line 62 of file ViewControlWithEditing.cpp.
References editing_mode_, IsLocked(), and cloudViewer::visualization::ViewControl::Scale().
| void cloudViewer::visualization::ViewControlWithEditing::SetEditingMode | ( | EditingMode | mode | ) |
Definition at line 103 of file ViewControlWithEditing.cpp.
References cloudViewer::visualization::ViewControl::ConvertFromViewParameters(), cloudViewer::visualization::ViewControl::ConvertToViewParameters(), editing_mode_, IsLocked(), Reset(), and view_status_backup_.
Referenced by ToggleEditingX(), ToggleEditingY(), and ToggleEditingZ().
|
inline |
Definition at line 40 of file ViewControlWithEditing.h.
References editing_mode_, and SetEditingMode().
|
inline |
Definition at line 48 of file ViewControlWithEditing.h.
References editing_mode_, and SetEditingMode().
|
inline |
Definition at line 56 of file ViewControlWithEditing.h.
References editing_mode_, and SetEditingMode().
|
inline |
Definition at line 64 of file ViewControlWithEditing.h.
References is_view_locked_.
|
overridevirtual |
Function to process translation.
Coordinates are measured in screen coordinates relative to the top-left corner of the window client area.
| x | Distance the mouse cursor has moved in x-axis. |
| y | Distance the mouse cursor has moved in y-axis. |
| xo | Original point coordinate of the mouse in x-axis. |
| yo | Original point coordinate of the mouse in y-axis. |
Reimplemented from cloudViewer::visualization::ViewControl.
Definition at line 91 of file ViewControlWithEditing.cpp.
References editing_mode_, IsLocked(), and cloudViewer::visualization::ViewControl::Translate().
|
protected |
Definition at line 68 of file ViewControlWithEditing.h.
Referenced by ChangeFieldOfView(), GetEditingMode(), GetStatusString(), Reset(), Rotate(), Scale(), SetEditingMode(), ToggleEditingX(), ToggleEditingY(), ToggleEditingZ(), and Translate().
|
protected |
Definition at line 70 of file ViewControlWithEditing.h.
Referenced by IsLocked(), and ToggleLocking().
|
protected |
Definition at line 69 of file ViewControlWithEditing.h.
Referenced by SetEditingMode().