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

#include <ViewControlWithCustomAnimation.h>

Inheritance diagram for open3d::visualization::ViewControlWithCustomAnimation:

Public Types

enum  AnimationMode { FreeMode = 0 , PreviewMode = 1 , PlayMode = 2 }
- Public Types inherited from open3d::visualization::ViewControl
enum  ProjectionType { Perspective = 0 , Orthogonal = 1 }

Public Member Functions

virtual ~ViewControlWithCustomAnimation ()
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 SetAnimationMode (AnimationMode mode)
void AddKeyFrame ()
void UpdateKeyFrame ()
void DeleteKeyFrame ()
void AddSpinKeyFrames (int num_of_key_frames=20)
void ClearAllKeyFrames ()
size_t NumOfKeyFrames () const
size_t NumOfFrames () const
void ToggleTrajectoryLoop ()
void ChangeTrajectoryInterval (int change)
int GetTrajectoryInterval () const
std::string GetStatusString () const
void Step (double change)
void GoToFirst ()
void GoToLast ()
bool CaptureTrajectory (const std::string &filename="")
bool LoadTrajectoryFromJsonFile (const std::string &filename)
bool LoadTrajectoryFromCameraTrajectory (const camera::PinholeCameraTrajectory &camera_trajectory)
bool IsPreviewing ()
bool IsPlaying ()
bool IsPlayingEnd (size_t num)
bool IsValidPinholeCameraTrajectory () 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, bool allow_arbitrary=false)
ProjectionType GetProjectionType () const
void SetProjectionParameters ()
virtual void ChangeWindowSize (int width, int height)
geometry::Ray3D UnprojectPoint (double x, double y) const
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 geometry::AxisAlignedBoundingBoxGetBoundingBox () const
void ResetBoundingBox ()
void FitInGeometry (const geometry::Geometry &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 Member Functions

size_t CurrentFrame () const
size_t CurrentKeyframe () const
double RegularizeFrameIndex (double current_frame, size_t num_of_frames, bool is_loop)
void SetViewControlFromTrajectory ()

Protected Attributes

AnimationMode animation_mode_ = AnimationMode::FreeMode
ViewTrajectory view_trajectory_
double current_frame_ = 0.0
double current_keyframe_ = 0.0
- 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
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 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

◆ AnimationMode


Constructor & Destructor Documentation

◆ ~ViewControlWithCustomAnimation()

virtual open3d::visualization::ViewControlWithCustomAnimation::~ViewControlWithCustomAnimation ( )

Member Function Documentation

◆ AddKeyFrame()

void open3d::visualization::ViewControlWithCustomAnimation::AddKeyFrame ( )

◆ AddSpinKeyFrames()

void open3d::visualization::ViewControlWithCustomAnimation::AddSpinKeyFrames ( int  num_of_key_frames = 20)

◆ CaptureTrajectory()

bool open3d::visualization::ViewControlWithCustomAnimation::CaptureTrajectory ( const std::string &  filename = "")

◆ ChangeFieldOfView()

void open3d::visualization::ViewControlWithCustomAnimation::ChangeFieldOfView ( double  step)

Function to change field of view.

stepThe step to change field of view.

Reimplemented from open3d::visualization::ViewControl.

◆ ChangeTrajectoryInterval()

void open3d::visualization::ViewControlWithCustomAnimation::ChangeTrajectoryInterval ( int  change)

◆ ClearAllKeyFrames()

void open3d::visualization::ViewControlWithCustomAnimation::ClearAllKeyFrames ( )

◆ CurrentFrame()

size_t open3d::visualization::ViewControlWithCustomAnimation::CurrentFrame ( ) const

◆ CurrentKeyframe()

size_t open3d::visualization::ViewControlWithCustomAnimation::CurrentKeyframe ( ) const

◆ DeleteKeyFrame()

void open3d::visualization::ViewControlWithCustomAnimation::DeleteKeyFrame ( )

◆ GetStatusString()

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

◆ GetTrajectoryInterval()

int open3d::visualization::ViewControlWithCustomAnimation::GetTrajectoryInterval ( ) const

◆ GoToFirst()

void open3d::visualization::ViewControlWithCustomAnimation::GoToFirst ( )

◆ GoToLast()

void open3d::visualization::ViewControlWithCustomAnimation::GoToLast ( )

◆ IsPlaying()

bool open3d::visualization::ViewControlWithCustomAnimation::IsPlaying ( )

◆ IsPlayingEnd()

bool open3d::visualization::ViewControlWithCustomAnimation::IsPlayingEnd ( size_t  num)

◆ IsPreviewing()

bool open3d::visualization::ViewControlWithCustomAnimation::IsPreviewing ( )

◆ IsValidPinholeCameraTrajectory()

bool open3d::visualization::ViewControlWithCustomAnimation::IsValidPinholeCameraTrajectory ( ) const

◆ LoadTrajectoryFromCameraTrajectory()

bool open3d::visualization::ViewControlWithCustomAnimation::LoadTrajectoryFromCameraTrajectory ( const camera::PinholeCameraTrajectory camera_trajectory)

◆ LoadTrajectoryFromJsonFile()

bool open3d::visualization::ViewControlWithCustomAnimation::LoadTrajectoryFromJsonFile ( const std::string &  filename)

◆ NumOfFrames()

size_t open3d::visualization::ViewControlWithCustomAnimation::NumOfFrames ( ) const

◆ NumOfKeyFrames()

size_t open3d::visualization::ViewControlWithCustomAnimation::NumOfKeyFrames ( ) const

◆ RegularizeFrameIndex()

double open3d::visualization::ViewControlWithCustomAnimation::RegularizeFrameIndex ( double  current_frame,
size_t  num_of_frames,
bool  is_loop 

◆ Reset()

void open3d::visualization::ViewControlWithCustomAnimation::Reset ( )

◆ Rotate()

void open3d::visualization::ViewControlWithCustomAnimation::Rotate ( double  x,
double  y,
double  xo,
double  yo 

Function to process rotation.

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

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::ViewControlWithCustomAnimation::Scale ( double  scale)

Function to process scaling

scaleis the scale ratio.

Reimplemented from open3d::visualization::ViewControl.

◆ SetAnimationMode()

void open3d::visualization::ViewControlWithCustomAnimation::SetAnimationMode ( AnimationMode  mode)

◆ SetViewControlFromTrajectory()

void open3d::visualization::ViewControlWithCustomAnimation::SetViewControlFromTrajectory ( )

◆ Step()

void open3d::visualization::ViewControlWithCustomAnimation::Step ( double  change)

◆ ToggleTrajectoryLoop()

void open3d::visualization::ViewControlWithCustomAnimation::ToggleTrajectoryLoop ( )

◆ Translate()

void open3d::visualization::ViewControlWithCustomAnimation::Translate ( double  x,
double  y,
double  xo,
double  yo 

Function to process translation.

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

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.

◆ UpdateKeyFrame()

void open3d::visualization::ViewControlWithCustomAnimation::UpdateKeyFrame ( )

Field Documentation

◆ animation_mode_

AnimationMode open3d::visualization::ViewControlWithCustomAnimation::animation_mode_ = AnimationMode::FreeMode

◆ current_frame_

double open3d::visualization::ViewControlWithCustomAnimation::current_frame_ = 0.0

◆ current_keyframe_

double open3d::visualization::ViewControlWithCustomAnimation::current_keyframe_ = 0.0

◆ view_trajectory_

ViewTrajectory open3d::visualization::ViewControlWithCustomAnimation::view_trajectory_

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