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

#include <VisualizerWithKeyCallback.h>

Inheritance diagram for open3d::visualization::VisualizerWithKeyCallback:
open3d::visualization::Visualizer

Public Types

typedef std::pair< int, std::function< bool(Visualizer *)> > KeyCallbackPair
 

Public Member Functions

 VisualizerWithKeyCallback ()
 
 ~VisualizerWithKeyCallback () override
 
 VisualizerWithKeyCallback (const VisualizerWithKeyCallback &)=delete
 
VisualizerWithKeyCallbackoperator= (const VisualizerWithKeyCallback &)=delete
 
void PrintVisualizerHelp () override
 
void RegisterKeyCallback (int key, std::function< bool(Visualizer *)> callback)
 
- Public Member Functions inherited from open3d::visualization::Visualizer
 Visualizer ()
 
virtual ~Visualizer ()
 
 Visualizer (Visualizer &&)=delete
 
 Visualizer (const Visualizer &)=delete
 
Visualizeroperator= (const Visualizer &)=delete
 
bool CreateVisualizerWindow (const std::string &window_name="Open3D", const int width=640, const int height=480, const int left=50, const int top=50, const bool visible=true)
 
void DestroyVisualizerWindow ()
 
void RegisterAnimationCallback (std::function< bool(Visualizer *)> callback_func)
 
void Run ()
 
void Close ()
 Function to to notify the window to be closed. More...
 
bool WaitEvents ()
 
bool PollEvents ()
 
virtual bool AddGeometry (std::shared_ptr< const geometry::Geometry > geometry_ptr)
 
virtual bool UpdateGeometry ()
 
virtual bool HasGeometry () const
 
virtual void UpdateRender ()
 Function to set the redraw flag as dirty. More...
 
virtual void UpdateWindowTitle ()
 
virtual void BuildUtilities ()
 
ViewControlGetViewControl ()
 
RenderOptionGetRenderOption ()
 
std::shared_ptr< geometry::ImageCaptureScreenFloatBuffer (bool do_render=true)
 
void CaptureScreenImage (const std::string &filename="", bool do_render=true)
 
std::shared_ptr< geometry::ImageCaptureDepthFloatBuffer (bool do_render=true)
 
void CaptureDepthImage (const std::string &filename="", bool do_render=true, double depth_scale=1000.0)
 
void CaptureDepthPointCloud (const std::string &filename="", bool do_render=true, bool convert_to_world_coordinate=false)
 
void CaptureRenderOption (const std::string &filename="")
 
void ResetViewPoint (bool reset_bounding_box=false)
 
const std::string & GetWindowName () const
 

Protected Member Functions

void KeyPressCallback (GLFWwindow *window, int key, int scancode, int action, int mods) override
 
std::string PrintKeyToString (int key)
 
- Protected Member Functions inherited from open3d::visualization::Visualizer
virtual bool InitOpenGL ()
 Function to initialize OpenGL. More...
 
virtual bool InitViewControl ()
 Function to initialize ViewControl. More...
 
virtual bool InitRenderOption ()
 Function to initialize RenderOption. More...
 
virtual void Render ()
 
void CopyViewStatusToClipboard ()
 
void CopyViewStatusFromClipboard ()
 
virtual void WindowRefreshCallback (GLFWwindow *window)
 
virtual void WindowResizeCallback (GLFWwindow *window, int w, int h)
 
virtual void MouseMoveCallback (GLFWwindow *window, double x, double y)
 
virtual void MouseScrollCallback (GLFWwindow *window, double x, double y)
 
virtual void MouseButtonCallback (GLFWwindow *window, int button, int action, int mods)
 
virtual void WindowCloseCallback (GLFWwindow *window)
 

Protected Attributes

std::map< int, std::function< bool(Visualizer *)> > key_to_callback_
 
- Protected Attributes inherited from open3d::visualization::Visualizer
GLFWwindow * window_ = NULL
 
std::string window_name_ = "Open3D"
 
std::function< bool(Visualizer *)> animation_callback_func_ = nullptr
 
std::function< bool(Visualizer *)> animation_callback_func_in_loop_
 
MouseControl mouse_control_
 
bool is_redraw_required_ = true
 
bool is_initialized_ = false
 
GLuint vao_id_
 
std::unique_ptr< ViewControlview_control_ptr_
 
std::unique_ptr< RenderOptionrender_option_ptr_
 
std::vector< std::shared_ptr< const geometry::Geometry > > geometry_ptrs_
 
std::vector< std::shared_ptr< glsl::GeometryRenderer > > geometry_renderer_ptrs_
 
std::vector< std::shared_ptr< const geometry::Geometry > > utility_ptrs_
 
std::vector< std::shared_ptr< glsl::GeometryRenderer > > utility_renderer_ptrs_
 
std::shared_ptr< geometry::TriangleMeshcoordinate_frame_mesh_ptr_
 
std::shared_ptr< glsl::CoordinateFrameRenderercoordinate_frame_mesh_renderer_ptr_
 

Member Typedef Documentation

◆ KeyCallbackPair

typedef std::pair<int, std::function<bool(Visualizer *)> > open3d::visualization::VisualizerWithKeyCallback::KeyCallbackPair

Constructor & Destructor Documentation

◆ VisualizerWithKeyCallback() [1/2]

open3d::visualization::VisualizerWithKeyCallback::VisualizerWithKeyCallback ( )

◆ ~VisualizerWithKeyCallback()

open3d::visualization::VisualizerWithKeyCallback::~VisualizerWithKeyCallback ( )
override

◆ VisualizerWithKeyCallback() [2/2]

open3d::visualization::VisualizerWithKeyCallback::VisualizerWithKeyCallback ( const VisualizerWithKeyCallback )
delete

Member Function Documentation

◆ KeyPressCallback()

void open3d::visualization::VisualizerWithKeyCallback::KeyPressCallback ( GLFWwindow *  window,
int  key,
int  scancode,
int  action,
int  mods 
)
overrideprotectedvirtual

Reimplemented from open3d::visualization::Visualizer.

◆ operator=()

VisualizerWithKeyCallback& open3d::visualization::VisualizerWithKeyCallback::operator= ( const VisualizerWithKeyCallback )
delete

◆ PrintKeyToString()

std::string open3d::visualization::VisualizerWithKeyCallback::PrintKeyToString ( int  key)
protected

◆ PrintVisualizerHelp()

void open3d::visualization::VisualizerWithKeyCallback::PrintVisualizerHelp ( )
overridevirtual

Reimplemented from open3d::visualization::Visualizer.

◆ RegisterKeyCallback()

void open3d::visualization::VisualizerWithKeyCallback::RegisterKeyCallback ( int  key,
std::function< bool(Visualizer *)>  callback 
)

Field Documentation

◆ key_to_callback_

std::map<int, std::function<bool(Visualizer *)> > open3d::visualization::VisualizerWithKeyCallback::key_to_callback_
protected

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