Open3D (C++ API)
Public Types | Public Member Functions | Protected Attributes
open3d::visualization::ViewControlWithEditing Class Reference

#include <ViewControlWithEditing.h>

Inheritance diagram for open3d::visualization::ViewControlWithEditing:
open3d::visualization::ViewControl

Public Types

enum  EditingMode {
  FreeMode = 0, OrthoPositiveX = 1, OrthoNegativeX = 2, OrthoPositiveY = 3,
  OrthoNegativeY = 4, OrthoPositiveZ = 5, OrthoNegativeZ = 6
}
 
- Public Types inherited from open3d::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 open3d::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 SetLookat (const Eigen::Vector3d &lookat)
 
void SetUp (const Eigen::Vector3d &up)
 
void SetFront (const Eigen::Vector3d &front)
 
void SetZoom (const double zoom)
 
bool ConvertToPinholeCameraParameters (camera::PinholeCameraParameters &parameters)
 
bool ConvertFromPinholeCameraParameters (const camera::PinholeCameraParameters &parameters)
 
ProjectionType GetProjectionType () const
 
void SetProjectionParameters ()
 
virtual void ChangeWindowSize (int width, int height)
 
virtual void Roll (double x)
 
const geometry::AxisAlignedBoundingBoxGetBoundingBox () const
 
void ResetBoundingBox ()
 
void FitInGeometry (const geometry::Geometry &geometry)
 
double GetFieldOfView () const
 Function to get field of view. More...
 
GLHelper::GLMatrix4f GetMVPMatrix () const
 
GLHelper::GLMatrix4f GetProjectionMatrix () const
 
GLHelper::GLMatrix4f GetViewMatrix () const
 
GLHelper::GLMatrix4f GetModelMatrix () const
 
GLHelper::GLVector3f GetEye () const
 
GLHelper::GLVector3f GetLookat () const
 
GLHelper::GLVector3f GetUp () const
 
GLHelper::GLVector3f GetFront () const
 
GLHelper::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 open3d::visualization::ViewControl
int window_width_ = 0
 
int window_height_ = 0
 
geometry::AxisAlignedBoundingBox 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
 
GLHelper::GLMatrix4f projection_matrix_
 
GLHelper::GLMatrix4f view_matrix_
 
GLHelper::GLMatrix4f model_matrix_
 
GLHelper::GLMatrix4f MVP_matrix_
 

Additional Inherited Members

- Static Public Attributes inherited from open3d::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
 

Member Enumeration Documentation

◆ EditingMode

Enumerator
FreeMode 
OrthoPositiveX 
OrthoNegativeX 
OrthoPositiveY 
OrthoNegativeY 
OrthoPositiveZ 
OrthoNegativeZ 

Constructor & Destructor Documentation

◆ ~ViewControlWithEditing()

virtual open3d::visualization::ViewControlWithEditing::~ViewControlWithEditing ( )
inlinevirtual

Member Function Documentation

◆ ChangeFieldOfView()

void open3d::visualization::ViewControlWithEditing::ChangeFieldOfView ( double  step)
overridevirtual

Function to change field of view.

Parameters
stepThe step to change field of view.

Reimplemented from open3d::visualization::ViewControl.

◆ GetEditingMode()

EditingMode open3d::visualization::ViewControlWithEditing::GetEditingMode ( ) const
inline

◆ GetStatusString()

std::string open3d::visualization::ViewControlWithEditing::GetStatusString ( ) const

◆ IsLocked()

bool open3d::visualization::ViewControlWithEditing::IsLocked ( ) const
inline

◆ Reset()

void open3d::visualization::ViewControlWithEditing::Reset ( )
overridevirtual

◆ Rotate()

void open3d::visualization::ViewControlWithEditing::Rotate ( double  x,
double  y,
double  xo,
double  yo 
)
overridevirtual

Function to process rotation.

Coordinates are measured in screen coordinates relative to the top-left corner of the window client area.

Parameters
xThe distance the mouse cursor has moved in x-axis.
yThe distance the mouse cursor has moved in y-axis.
xoOriginal point coordinate of the mouse in x-axis.
yoOriginal point coordinate of the mouse in y-axis.

Reimplemented from open3d::visualization::ViewControl.

◆ Scale()

void open3d::visualization::ViewControlWithEditing::Scale ( double  scale)
overridevirtual

Function to process scaling

Parameters
scaleis the scale ratio.

Reimplemented from open3d::visualization::ViewControl.

◆ SetEditingMode()

void open3d::visualization::ViewControlWithEditing::SetEditingMode ( EditingMode  mode)

◆ ToggleEditingX()

void open3d::visualization::ViewControlWithEditing::ToggleEditingX ( )
inline

◆ ToggleEditingY()

void open3d::visualization::ViewControlWithEditing::ToggleEditingY ( )
inline

◆ ToggleEditingZ()

void open3d::visualization::ViewControlWithEditing::ToggleEditingZ ( )
inline

◆ ToggleLocking()

void open3d::visualization::ViewControlWithEditing::ToggleLocking ( )
inline

◆ Translate()

void open3d::visualization::ViewControlWithEditing::Translate ( double  x,
double  y,
double  xo,
double  yo 
)
overridevirtual

Function to process translation.

Coordinates are measured in screen coordinates relative to the top-left corner of the window client area.

Parameters
xDistance the mouse cursor has moved in x-axis.
yDistance the mouse cursor has moved in y-axis.
xoOriginal point coordinate of the mouse in x-axis.
yoOriginal point coordinate of the mouse in y-axis.

Reimplemented from open3d::visualization::ViewControl.

Field Documentation

◆ editing_mode_

EditingMode open3d::visualization::ViewControlWithEditing::editing_mode_ = FreeMode
protected

◆ is_view_locked_

bool open3d::visualization::ViewControlWithEditing::is_view_locked_ = false
protected

◆ view_status_backup_

ViewParameters open3d::visualization::ViewControlWithEditing::view_status_backup_
protected

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