Open3D (C++ API)  0.12.0
Data Structures | Public Types | Public Member Functions | Protected Member Functions
open3d::visualization::visualizer::O3DVisualizer Class Reference

#include <O3DVisualizer.h>

Inheritance diagram for open3d::visualization::visualizer::O3DVisualizer:
open3d::visualization::gui::Window

Data Structures

struct  DrawObject
 
struct  Impl
 
struct  UIState
 

Public Types

enum  Shader { Shader::STANDARD, Shader::UNLIT, Shader::NORMALS, Shader::DEPTH }
 
enum  TickResult { TickResult::NO_CHANGE, TickResult::REDRAW }
 

Public Member Functions

 O3DVisualizer (const std::string &title, int width, int height)
 
virtual ~O3DVisualizer ()
 
void AddAction (const std::string &name, std::function< void(O3DVisualizer &)> callback)
 
void SetBackground (const Eigen::Vector4f &bg_color, std::shared_ptr< geometry::Image > bg_image=nullptr)
 
void SetShader (Shader shader)
 
void AddGeometry (const std::string &name, std::shared_ptr< geometry::Geometry3D > geom, rendering::Material *material=nullptr, const std::string &group="", double time=0.0, bool is_visible=true)
 
void AddGeometry (const std::string &name, std::shared_ptr< t::geometry::Geometry > tgeom, rendering::Material *material=nullptr, const std::string &group="", double time=0.0, bool is_visible=true)
 
void RemoveGeometry (const std::string &name)
 
void ShowGeometry (const std::string &name, bool show)
 
DrawObject GetGeometry (const std::string &name) const
 
void SetupCamera (float fov, const Eigen::Vector3f &center, const Eigen::Vector3f &eye, const Eigen::Vector3f &up)
 
void ResetCameraToDefault ()
 
void ShowSettings (bool show)
 
void ShowSkybox (bool show)
 
void ShowAxes (bool show)
 
void SetPointSize (int point_size)
 
void SetLineWidth (int line_width)
 
void EnableGroup (const std::string &group, bool enable)
 
std::vector< O3DVisualizerSelections::SelectionSetGetSelectionSets () const
 
double GetAnimationFrameDelay () const
 
void SetAnimationFrameDelay (double secs)
 
double GetAnimationTimeStep () const
 
void SetAnimationTimeStep (double time_step)
 
double GetAnimationDuration () const
 
void SetAnimationDuration (double sec)
 
double GetCurrentTime () const
 
void SetCurrentTime (double t)
 
bool GetIsAnimating () const
 
void SetAnimating (bool is_animating)
 
void SetOnAnimationFrame (std::function< void(O3DVisualizer &, double)> cb)
 
void SetOnAnimationTick (std::function< TickResult(O3DVisualizer &, double, double)> cb)
 
void ExportCurrentImage (const std::string &path)
 
UIState GetUIState () const
 
rendering::Open3DSceneGetScene () const
 
void StartRPCInterface (const std::string &address, int timeout)
 Starts the RPC interface. See io/rpc/ReceiverBase for the parameters. More...
 
void StopRPCInterface ()
 
- Public Member Functions inherited from open3d::visualization::gui::Window
 Window (const std::string &title, int flags=0)
 
 Window (const std::string &title, int width, int height, int flags=0)
 
 Window (const std::string &title, int x, int y, int width, int height, int flags=0)
 
virtual ~Window ()
 
const ThemeGetTheme () const
 
visualization::rendering::RendererGetRenderer () const
 
Rect GetOSFrame () const
 
void SetOSFrame (const Rect &r)
 
const char * GetTitle () const
 
void SetTitle (const char *title)
 
void SizeToFit ()
 
void SetSize (const Size &size)
 Sets the size of the window in pixels. Includes menubar on Linux. More...
 
Size GetSize () const
 
Rect GetContentRect () const
 
float GetScaling () const
 Returns the scaling factor from OS pixels to device pixels. More...
 
Point GlobalToWindowCoord (int global_x, int global_y)
 Returns the global point (in OS pixels) in window local coordinates. More...
 
bool IsVisible () const
 
void Show (bool vis=true)
 
void Close ()
 
void SetNeedsLayout ()
 Instructs the window to relayout before the next draw. More...
 
void PostRedraw ()
 
void SetTopmost (bool topmost)
 
void RaiseToTop () const
 
bool IsActiveWindow () const
 
void SetFocusWidget (Widget *w)
 Sets. More...
 
void AddChild (std::shared_ptr< Widget > w)
 
void SetOnMenuItemActivated (Menu::ItemId item_id, std::function< void()> callback)
 
void SetOnTickEvent (std::function< bool()> callback)
 
void ShowDialog (std::shared_ptr< Dialog > dlg)
 
void CloseDialog ()
 Closes the dialog. More...
 
void ShowMessageBox (const char *title, const char *message)
 
void DestroyWindow ()
 

Protected Member Functions

void Layout (const gui::Theme &theme)
 
- Protected Member Functions inherited from open3d::visualization::gui::Window
virtual Size CalcPreferredSize ()
 
virtual void OnMenuItemSelected (Menu::ItemId item_id)
 
virtual void OnDragDropped (const char *path)
 
const std::vector< std::shared_ptr< Widget > > & GetChildren () const
 

Additional Inherited Members

- Static Public Attributes inherited from open3d::visualization::gui::Window
static const int FLAG_HIDDEN = (1 << 0)
 
static const int FLAG_TOPMOST = (1 << 1)
 

Member Enumeration Documentation

◆ Shader

Enumerator
STANDARD 
UNLIT 
NORMALS 
DEPTH 

◆ TickResult

Enumerator
NO_CHANGE 
REDRAW 

Constructor & Destructor Documentation

◆ O3DVisualizer()

open3d::visualization::visualizer::O3DVisualizer::O3DVisualizer ( const std::string &  title,
int  width,
int  height 
)

◆ ~O3DVisualizer()

open3d::visualization::visualizer::O3DVisualizer::~O3DVisualizer ( )
virtual

Member Function Documentation

◆ AddAction()

void open3d::visualization::visualizer::O3DVisualizer::AddAction ( const std::string &  name,
std::function< void(O3DVisualizer &)>  callback 
)

◆ AddGeometry() [1/2]

void open3d::visualization::visualizer::O3DVisualizer::AddGeometry ( const std::string &  name,
std::shared_ptr< geometry::Geometry3D geom,
rendering::Material material = nullptr,
const std::string &  group = "",
double  time = 0.0,
bool  is_visible = true 
)

◆ AddGeometry() [2/2]

void open3d::visualization::visualizer::O3DVisualizer::AddGeometry ( const std::string &  name,
std::shared_ptr< t::geometry::Geometry tgeom,
rendering::Material material = nullptr,
const std::string &  group = "",
double  time = 0.0,
bool  is_visible = true 
)

◆ EnableGroup()

void open3d::visualization::visualizer::O3DVisualizer::EnableGroup ( const std::string &  group,
bool  enable 
)

◆ ExportCurrentImage()

void open3d::visualization::visualizer::O3DVisualizer::ExportCurrentImage ( const std::string &  path)

◆ GetAnimationDuration()

double open3d::visualization::visualizer::O3DVisualizer::GetAnimationDuration ( ) const

◆ GetAnimationFrameDelay()

double open3d::visualization::visualizer::O3DVisualizer::GetAnimationFrameDelay ( ) const

◆ GetAnimationTimeStep()

double open3d::visualization::visualizer::O3DVisualizer::GetAnimationTimeStep ( ) const

◆ GetCurrentTime()

double open3d::visualization::visualizer::O3DVisualizer::GetCurrentTime ( ) const

◆ GetGeometry()

O3DVisualizer::DrawObject open3d::visualization::visualizer::O3DVisualizer::GetGeometry ( const std::string &  name) const

◆ GetIsAnimating()

bool open3d::visualization::visualizer::O3DVisualizer::GetIsAnimating ( ) const

◆ GetScene()

Open3DScene * open3d::visualization::visualizer::O3DVisualizer::GetScene ( ) const

◆ GetSelectionSets()

std::vector< O3DVisualizerSelections::SelectionSet > open3d::visualization::visualizer::O3DVisualizer::GetSelectionSets ( ) const

◆ GetUIState()

O3DVisualizer::UIState open3d::visualization::visualizer::O3DVisualizer::GetUIState ( ) const

◆ Layout()

void open3d::visualization::visualizer::O3DVisualizer::Layout ( const gui::Theme theme)
protectedvirtual

Lays out all the widgets in the window. If all children of the window are layouts, this function does not need to be overriden.

Reimplemented from open3d::visualization::gui::Window.

◆ RemoveGeometry()

void open3d::visualization::visualizer::O3DVisualizer::RemoveGeometry ( const std::string &  name)

◆ ResetCameraToDefault()

void open3d::visualization::visualizer::O3DVisualizer::ResetCameraToDefault ( )

◆ SetAnimating()

void open3d::visualization::visualizer::O3DVisualizer::SetAnimating ( bool  is_animating)

◆ SetAnimationDuration()

void open3d::visualization::visualizer::O3DVisualizer::SetAnimationDuration ( double  sec)

◆ SetAnimationFrameDelay()

void open3d::visualization::visualizer::O3DVisualizer::SetAnimationFrameDelay ( double  secs)

◆ SetAnimationTimeStep()

void open3d::visualization::visualizer::O3DVisualizer::SetAnimationTimeStep ( double  time_step)

◆ SetBackground()

void open3d::visualization::visualizer::O3DVisualizer::SetBackground ( const Eigen::Vector4f &  bg_color,
std::shared_ptr< geometry::Image bg_image = nullptr 
)

◆ SetCurrentTime()

void open3d::visualization::visualizer::O3DVisualizer::SetCurrentTime ( double  t)

◆ SetLineWidth()

void open3d::visualization::visualizer::O3DVisualizer::SetLineWidth ( int  line_width)

◆ SetOnAnimationFrame()

void open3d::visualization::visualizer::O3DVisualizer::SetOnAnimationFrame ( std::function< void(O3DVisualizer &, double)>  cb)

◆ SetOnAnimationTick()

void open3d::visualization::visualizer::O3DVisualizer::SetOnAnimationTick ( std::function< TickResult(O3DVisualizer &, double, double)>  cb)

◆ SetPointSize()

void open3d::visualization::visualizer::O3DVisualizer::SetPointSize ( int  point_size)

◆ SetShader()

void open3d::visualization::visualizer::O3DVisualizer::SetShader ( Shader  shader)

◆ SetupCamera()

void open3d::visualization::visualizer::O3DVisualizer::SetupCamera ( float  fov,
const Eigen::Vector3f &  center,
const Eigen::Vector3f &  eye,
const Eigen::Vector3f &  up 
)

◆ ShowAxes()

void open3d::visualization::visualizer::O3DVisualizer::ShowAxes ( bool  show)

◆ ShowGeometry()

void open3d::visualization::visualizer::O3DVisualizer::ShowGeometry ( const std::string &  name,
bool  show 
)

◆ ShowSettings()

void open3d::visualization::visualizer::O3DVisualizer::ShowSettings ( bool  show)

◆ ShowSkybox()

void open3d::visualization::visualizer::O3DVisualizer::ShowSkybox ( bool  show)

◆ StartRPCInterface()

void open3d::visualization::visualizer::O3DVisualizer::StartRPCInterface ( const std::string &  address,
int  timeout 
)

Starts the RPC interface. See io/rpc/ReceiverBase for the parameters.

◆ StopRPCInterface()

void open3d::visualization::visualizer::O3DVisualizer::StopRPCInterface ( )

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