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

#include <MatrixInteractorLogic.h>

Inheritance diagram for open3d::visualization::MatrixInteractorLogic:
open3d::visualization::IBLRotationInteractorLogic open3d::visualization::LightDirectionInteractorLogic open3d::visualization::RotationInteractorLogic open3d::visualization::CameraInteractorLogic open3d::visualization::ModelInteractorLogic

Public Types

enum  DragType { DragType::MOUSE, DragType::WHEEL, DragType::TWO_FINGER }
 

Public Member Functions

virtual ~MatrixInteractorLogic ()
 
void SetViewSize (int width, int height)
 
const geometry::AxisAlignedBoundingBoxGetBoundingBox () const
 
virtual void SetBoundingBox (const geometry::AxisAlignedBoundingBox &bounds)
 
void SetMouseDownInfo (const Camera::Transform &matrix, const Eigen::Vector3f &center_of_rotation)
 
const Camera::TransformGetMatrix () const
 
virtual void Rotate (int dx, int dy)
 
virtual void RotateWorld (int dx, int dy, const Eigen::Vector3f &x_axis, const Eigen::Vector3f &y_axis)
 
virtual void RotateZ (int dx, int dy)
 Rotates about the forward axis of the matrix. More...
 
virtual void RotateZWorld (int dx, int dy, const Eigen::Vector3f &forward)
 
virtual void Dolly (int dy, DragType drag_type)
 
virtual void Dolly (float z_dist, Camera::Transform matrix)
 

Protected Member Functions

void SetMatrix (const Camera::Transform &matrix)
 
double CalcRotateRadians (int dx, int dy)
 
double CalcRotateZRadians (int dx, int dy)
 
float CalcDollyDist (int dy, DragType drag_type)
 

Protected Attributes

int view_width_ = 1
 
int view_height_ = 1
 
double model_size_ = 20.0
 
geometry::AxisAlignedBoundingBox model_bounds_
 
Eigen::Vector3f center_of_rotation_
 
Camera::Transform matrix_at_mouse_down_
 
Eigen::Vector3f center_of_rotation_at_mouse_down_
 

Detailed Description

Base class for rotating and dollying (translating along forward axis). Could be used for a camera, or also something else, like a the direction of a directional light.

Member Enumeration Documentation

◆ DragType

Enumerator
MOUSE 
WHEEL 
TWO_FINGER 

Constructor & Destructor Documentation

◆ ~MatrixInteractorLogic()

open3d::visualization::MatrixInteractorLogic::~MatrixInteractorLogic ( )
virtual

Member Function Documentation

◆ CalcDollyDist()

float open3d::visualization::MatrixInteractorLogic::CalcDollyDist ( int  dy,
DragType  drag_type 
)
protected

◆ CalcRotateRadians()

double open3d::visualization::MatrixInteractorLogic::CalcRotateRadians ( int  dx,
int  dy 
)
protected

◆ CalcRotateZRadians()

double open3d::visualization::MatrixInteractorLogic::CalcRotateZRadians ( int  dx,
int  dy 
)
protected

◆ Dolly() [1/2]

void open3d::visualization::MatrixInteractorLogic::Dolly ( int  dy,
DragType  drag_type 
)
virtual

Moves the matrix along the forward axis. (This is one type of zoom.)

Reimplemented in open3d::visualization::ModelInteractorLogic, and open3d::visualization::CameraInteractorLogic.

◆ Dolly() [2/2]

void open3d::visualization::MatrixInteractorLogic::Dolly ( float  z_dist,
Camera::Transform  matrix 
)
virtual

◆ GetBoundingBox()

const geometry::AxisAlignedBoundingBox & open3d::visualization::MatrixInteractorLogic::GetBoundingBox ( ) const

◆ GetMatrix()

const Camera::Transform & open3d::visualization::MatrixInteractorLogic::GetMatrix ( ) const

◆ Rotate()

void open3d::visualization::MatrixInteractorLogic::Rotate ( int  dx,
int  dy 
)
virtual

Rotates about an axis defined by dx * matrixLeft, dy * matrixUp. dy is assumed to be in window-style coordinates, that is, going up produces a negative dy. The axis goes through the center of rotation.

Reimplemented in open3d::visualization::ModelInteractorLogic, open3d::visualization::LightDirectionInteractorLogic, open3d::visualization::IBLRotationInteractorLogic, and open3d::visualization::CameraInteractorLogic.

◆ RotateWorld()

void open3d::visualization::MatrixInteractorLogic::RotateWorld ( int  dx,
int  dy,
const Eigen::Vector3f &  x_axis,
const Eigen::Vector3f &  y_axis 
)
virtual

Same as Rotate() except that the dx-axis and the dy-axis are specified

◆ RotateZ()

void open3d::visualization::MatrixInteractorLogic::RotateZ ( int  dx,
int  dy 
)
virtual

◆ RotateZWorld()

void open3d::visualization::MatrixInteractorLogic::RotateZWorld ( int  dx,
int  dy,
const Eigen::Vector3f &  forward 
)
virtual

◆ SetBoundingBox()

void open3d::visualization::MatrixInteractorLogic::SetBoundingBox ( const geometry::AxisAlignedBoundingBox bounds)
virtual

◆ SetMatrix()

void open3d::visualization::MatrixInteractorLogic::SetMatrix ( const Camera::Transform matrix)
protected

◆ SetMouseDownInfo()

void open3d::visualization::MatrixInteractorLogic::SetMouseDownInfo ( const Camera::Transform matrix,
const Eigen::Vector3f &  center_of_rotation 
)

◆ SetViewSize()

void open3d::visualization::MatrixInteractorLogic::SetViewSize ( int  width,
int  height 
)

Field Documentation

◆ center_of_rotation_

Eigen::Vector3f open3d::visualization::MatrixInteractorLogic::center_of_rotation_
protected

◆ center_of_rotation_at_mouse_down_

Eigen::Vector3f open3d::visualization::MatrixInteractorLogic::center_of_rotation_at_mouse_down_
protected

◆ matrix_at_mouse_down_

Camera::Transform open3d::visualization::MatrixInteractorLogic::matrix_at_mouse_down_
protected

◆ model_bounds_

geometry::AxisAlignedBoundingBox open3d::visualization::MatrixInteractorLogic::model_bounds_
protected

◆ model_size_

double open3d::visualization::MatrixInteractorLogic::model_size_ = 20.0
protected

◆ view_height_

int open3d::visualization::MatrixInteractorLogic::view_height_ = 1
protected

◆ view_width_

int open3d::visualization::MatrixInteractorLogic::view_width_ = 1
protected

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