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

#include <MatrixInteractorLogic.h>

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

Public Types

enum class  DragType { MOUSE , WHEEL , TWO_FINGER }
 

Public Member Functions

virtual ~MatrixInteractorLogic ()
 
void SetViewSize (int width, int height)
 
int GetViewWidth () const
 
int GetViewHeight () const
 
const geometry::AxisAlignedBoundingBoxGetBoundingBox () const
 
virtual void SetBoundingBox (const geometry::AxisAlignedBoundingBox &bounds)
 
Eigen::Vector3f GetCenterOfRotation () const
 
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 (float dy, DragType drag_type)
 
virtual void Dolly (float z_dist, Camera::Transform matrix)
 

Protected Member Functions

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

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::rendering::MatrixInteractorLogic::~MatrixInteractorLogic ( )
virtual

Member Function Documentation

◆ CalcDollyDist()

float open3d::visualization::rendering::MatrixInteractorLogic::CalcDollyDist ( float  dy,
DragType  drag_type,
const Camera::Transform matrix 
)
protected

◆ CalcRotateRadians()

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

◆ CalcRotateZRadians()

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

◆ Dolly() [1/2]

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

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

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

◆ Dolly() [2/2]

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

◆ GetBoundingBox()

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

◆ GetCenterOfRotation()

Eigen::Vector3f open3d::visualization::rendering::MatrixInteractorLogic::GetCenterOfRotation ( ) const

◆ GetMatrix()

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

◆ GetViewHeight()

int open3d::visualization::rendering::MatrixInteractorLogic::GetViewHeight ( ) const

◆ GetViewWidth()

int open3d::visualization::rendering::MatrixInteractorLogic::GetViewWidth ( ) const

◆ Rotate()

void open3d::visualization::rendering::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::rendering::ModelInteractorLogic, open3d::visualization::rendering::LightDirectionInteractorLogic, open3d::visualization::rendering::IBLRotationInteractorLogic, open3d::visualization::rendering::CameraSphereInteractorLogic, and open3d::visualization::rendering::CameraInteractorLogic.

◆ RotateWorld()

void open3d::visualization::rendering::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::rendering::MatrixInteractorLogic::RotateZ ( int  dx,
int  dy 
)
virtual

◆ RotateZWorld()

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

◆ SetBoundingBox()

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

◆ SetMatrix()

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

◆ SetMouseDownInfo()

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

◆ SetViewSize()

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

Field Documentation

◆ center_of_rotation_

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

◆ center_of_rotation_at_mouse_down_

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

◆ matrix_at_mouse_down_

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

◆ model_bounds_

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

◆ model_size_

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

◆ view_height_

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

◆ view_width_

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

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