ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::visualization Namespace Reference

Namespaces

 app
 
 gl_util
 
 gui
 
 rendering
 
 visualizer
 
 webrtc_server
 

Classes

class  ColorMap
 
class  ColorMapGray
 
class  ColorMapJet
 See Matlab's Jet colormap. More...
 
class  ColorMapSummer
 See Matlab's Summer colormap. More...
 
class  ColorMapWinter
 See Matlab's Winter colormap. More...
 
class  ColorMapHot
 
struct  DrawObject
 
struct  DrawAction
 
class  PointCloudPicker
 A utility class to store picked points of a pointcloud. More...
 
class  SelectionPolygon
 
class  SelectionPolygonVolume
 Select a polygon volume for cropping. More...
 
class  GuiSettingsModel
 
class  GuiSettingsView
 
class  GuiVisualizer
 
class  SmallButton
 
class  SmallToggleButton
 
class  MessageProcessor
 
class  RenderOption
 Defines rendering options for visualizer. More...
 
class  RenderOptionWithEditing
 
class  ViewControl
 View controller for visualizer. More...
 
class  ViewControlWithCustomAnimation
 
class  ViewControlWithEditing
 
class  ViewParameters
 
class  ViewTrajectory
 
class  GLFWContext
 GLFW context, handled as a singleton. More...
 
class  Visualizer
 The main Visualizer class. More...
 
class  VisualizerWithCustomAnimation
 
class  VisualizerWithEditing
 Visualizer with editing capabilities. More...
 
class  VisualizerWithKeyCallback
 Visualizer with custom key callack capabilities. More...
 
class  VisualizerWithVertexSelection
 

Enumerations

enum  MenuId {
  FILE_OPEN , FILE_EXPORT_RGB , FILE_QUIT , SETTINGS_LIGHT_AND_MATERIALS ,
  HELP_KEYS , HELP_CAMERA , HELP_ABOUT , HELP_CONTACT ,
  HELP_DEBUG
}
 

Functions

const std::shared_ptr< const ColorMapGetGlobalColorMap ()
 Interface functions. More...
 
void SetGlobalColorMap (ColorMap::ColorMapOption option)
 
void Draw (const std::vector< std::shared_ptr< ccHObject >> &geometries, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
 
void Draw (const std::vector< std::shared_ptr< t::geometry::Geometry >> &tgeometries, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
 
void Draw (const std::vector< std::shared_ptr< rendering::TriangleMeshModel >> &models, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
 
void Draw (const std::vector< DrawObject > &objects, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
 
bool DrawGeometries (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name="cloudViewer", int width=640, int height=480, int left=50, int top=50, bool point_show_normal=false, bool mesh_show_wireframe=false, bool mesh_show_back_face=false, Eigen::Vector3d *lookat=nullptr, Eigen::Vector3d *up=nullptr, Eigen::Vector3d *front=nullptr, double *zoom=nullptr)
 Function to draw a list of geometry objects. More...
 
bool DrawGeometriesWithCustomAnimation (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name="CloudViewer", int width=640, int height=480, int left=50, int top=50, const std::string &json_filename="")
 Function to draw a list of geometry objects with a GUI that supports animation. More...
 
bool DrawGeometriesWithAnimationCallback (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, std::function< bool(Visualizer *)> callback_func, const std::string &window_name="CloudViewer", int width=640, int height=480, int left=50, int top=50)
 Function to draw a list of geometry objects with a customized animation callback function. More...
 
bool DrawGeometriesWithKeyCallbacks (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::map< int, std::function< bool(Visualizer *)>> &key_to_callback, const std::string &window_name="CloudViewer", int width=640, int height=480, int left=50, int top=50)
 Function to draw a list of geometry. More...
 
bool DrawGeometriesWithEditing (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name="CloudViewer", int width=640, int height=480, int left=50, int top=50)
 Function to draw a list of geometry. More...
 
bool DrawGeometriesWithVertexSelection (const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top)
 
std::shared_ptr< gui::SliderMakeSlider (const gui::Slider::Type type, const double min, const double max, const double value)
 

Variables

static const char * CUSTOM_LIGHTING = "Custom"
 
const std::string MODEL_NAME = "__model__"
 
const std::string INSPECT_MODEL_NAME = "__inspect_model__"
 
const std::string WIREFRAME_NAME = "__wireframe_model__"
 

Enumeration Type Documentation

◆ MenuId

Enumerator
FILE_OPEN 
FILE_EXPORT_RGB 
FILE_QUIT 
SETTINGS_LIGHT_AND_MATERIALS 
HELP_KEYS 
HELP_CAMERA 
HELP_ABOUT 
HELP_CONTACT 
HELP_DEBUG 

Definition at line 302 of file GuiVisualizer.cpp.

Function Documentation

◆ Draw() [1/4]

void cloudViewer::visualization::Draw ( const std::vector< DrawObject > &  objects,
const std::string &  window_name,
int  width,
int  height,
const std::vector< DrawAction > &  actions 
)

◆ Draw() [2/4]

void cloudViewer::visualization::Draw ( const std::vector< std::shared_ptr< ccHObject >> &  geometries,
const std::string &  window_name,
int  width,
int  height,
const std::vector< DrawAction > &  actions 
)

Definition at line 45 of file Draw.cpp.

References height, name, and width.

Referenced by Draw().

◆ Draw() [3/4]

void cloudViewer::visualization::Draw ( const std::vector< std::shared_ptr< rendering::TriangleMeshModel >> &  models,
const std::string &  window_name,
int  width,
int  height,
const std::vector< DrawAction > &  actions 
)

Definition at line 76 of file Draw.cpp.

References Draw(), height, name, and width.

◆ Draw() [4/4]

void cloudViewer::visualization::Draw ( const std::vector< std::shared_ptr< t::geometry::Geometry >> &  tgeometries,
const std::string &  window_name,
int  width,
int  height,
const std::vector< DrawAction > &  actions 
)

Definition at line 60 of file Draw.cpp.

References Draw(), height, name, and width.

◆ DrawGeometries()

bool cloudViewer::visualization::DrawGeometries ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
const std::string &  window_name = "cloudViewer",
int  width = 640,
int  height = 480,
int  left = 50,
int  top = 50,
bool  point_show_normal = false,
bool  mesh_show_wireframe = false,
bool  mesh_show_back_face = false,
Eigen::Vector3d *  lookat = nullptr,
Eigen::Vector3d *  up = nullptr,
Eigen::Vector3d *  front = nullptr,
double *  zoom = nullptr 
)

Function to draw a list of geometry objects.

The convenient function of drawing something This function is a wrapper that calls the core functions of Visualizer. This function MUST be called from the main thread. It blocks the main thread until the window is closed.

Parameters
geometry_ptrsList of geometries to be visualized.
window_nameThe displayed title of the visualization window.
widthThe width of the visualization window.
heightThe height of the visualization window.
leftmargin of the visualization window.
topThe top margin of the visualization window.
point_show_normalvisualize point normals if set to true.
mesh_show_wireframevisualize mesh wireframe if set to true.
mesh_show_back_facevisualize also the back face of the mesh triangles.
lookatThe lookat vector of the camera.
upThe up vector of the camera.
frontThe front vector of the camera.
zoomThe zoom of the camera.

Definition at line 32 of file DrawGeometry.cpp.

References cloudViewer::visualization::Visualizer::AddGeometry(), cloudViewer::visualization::Visualizer::CreateVisualizerWindow(), cloudViewer::visualization::Visualizer::DestroyVisualizerWindow(), cloudViewer::visualization::Visualizer::GetRenderOption(), cloudViewer::visualization::Visualizer::GetViewControl(), height, LogWarning, cloudViewer::visualization::RenderOption::mesh_show_back_face_, cloudViewer::visualization::RenderOption::mesh_show_wireframe_, cloudViewer::visualization::RenderOption::point_show_normal_, cloudViewer::visualization::Visualizer::Run(), cloudViewer::visualization::ViewControl::SetFront(), cloudViewer::visualization::ViewControl::SetLookat(), cloudViewer::visualization::ViewControl::SetUp(), cloudViewer::visualization::ViewControl::SetZoom(), and width.

Referenced by cloudViewer::t::pipelines::slac::VisualizeGridDeformation(), cloudViewer::t::pipelines::slac::VisualizePointCloudCorrespondences(), and cloudViewer::t::pipelines::slac::VisualizePointCloudDeformation().

◆ DrawGeometriesWithAnimationCallback()

bool cloudViewer::visualization::DrawGeometriesWithAnimationCallback ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
std::function< bool(Visualizer *)>  callback_func,
const std::string &  window_name = "CloudViewer",
int  width = 640,
int  height = 480,
int  left = 50,
int  top = 50 
)

Function to draw a list of geometry objects with a customized animation callback function.

Parameters
geometry_ptrsList of geometries to be visualized.
callback_funcCall back function to be triggered at a key press event.
window_nameThe displayed title of the visualization window.
widthThe width of the visualization window.
heightThe height of the visualization window.
leftmargin of the visualization window.
topThe top margin of the visualization window.

Definition at line 130 of file DrawGeometry.cpp.

References cloudViewer::visualization::Visualizer::AddGeometry(), cloudViewer::visualization::Visualizer::CreateVisualizerWindow(), cloudViewer::visualization::Visualizer::DestroyVisualizerWindow(), height, LogWarning, cloudViewer::visualization::Visualizer::RegisterAnimationCallback(), cloudViewer::visualization::Visualizer::Run(), and width.

◆ DrawGeometriesWithCustomAnimation()

bool cloudViewer::visualization::DrawGeometriesWithCustomAnimation ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
const std::string &  window_name = "CloudViewer",
int  width = 640,
int  height = 480,
int  left = 50,
int  top = 50,
const std::string &  json_filename = "" 
)

Function to draw a list of geometry objects with a GUI that supports animation.

Parameters
geometry_ptrsList of geometries to be visualized.
window_nameThe displayed title of the visualization window.
widthThe width of the visualization window.
heightThe height of the visualization window.
leftmargin of the visualization window.
topThe top margin of the visualization window.
json_filenameCamera trajectory json file path for custom animation.

Definition at line 84 of file DrawGeometry.cpp.

References cloudViewer::visualization::Visualizer::AddGeometry(), cloudViewer::visualization::Visualizer::CreateVisualizerWindow(), cloudViewer::visualization::Visualizer::DestroyVisualizerWindow(), cloudViewer::visualization::Visualizer::GetViewControl(), height, LogWarning, cloudViewer::visualization::Visualizer::Run(), cloudViewer::visualization::VisualizerWithCustomAnimation::UpdateWindowTitle(), and width.

◆ DrawGeometriesWithEditing()

bool cloudViewer::visualization::DrawGeometriesWithEditing ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
const std::string &  window_name = "CloudViewer",
int  width = 640,
int  height = 480,
int  left = 50,
int  top = 50 
)

Function to draw a list of geometry.

Geometry providing user interaction.

Parameters
geometry_ptrsList of geometries to be visualized.
window_nameThe displayed title of the visualization window.
widthThe width of the visualization window.
heightThe height of the visualization window.
leftmargin of the visualization window.
topThe top margin of the visualization window.

Definition at line 199 of file DrawGeometry.cpp.

References cloudViewer::visualization::VisualizerWithEditing::AddGeometry(), cloudViewer::visualization::Visualizer::CreateVisualizerWindow(), cloudViewer::visualization::Visualizer::DestroyVisualizerWindow(), height, LogWarning, cloudViewer::visualization::Visualizer::Run(), and width.

◆ DrawGeometriesWithKeyCallbacks()

bool cloudViewer::visualization::DrawGeometriesWithKeyCallbacks ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
const std::map< int, std::function< bool(Visualizer *)>> &  key_to_callback,
const std::string &  window_name = "CloudViewer",
int  width = 640,
int  height = 480,
int  left = 50,
int  top = 50 
)

Function to draw a list of geometry.

Geometry objects with a customized key-callback mapping

Parameters
geometry_ptrsList of geometries to be visualized.
key_to_callbackMap of key to call back functions.
window_nameThe displayed title of the visualization window.
widthThe width of the visualization window.
heightThe height of the visualization window.
leftmargin of the visualization window.
topThe top margin of the visualization window.

Definition at line 163 of file DrawGeometry.cpp.

References cloudViewer::visualization::Visualizer::AddGeometry(), cloudViewer::visualization::Visualizer::CreateVisualizerWindow(), cloudViewer::visualization::Visualizer::DestroyVisualizerWindow(), height, LogWarning, cloudViewer::visualization::VisualizerWithKeyCallback::RegisterKeyCallback(), cloudViewer::visualization::Visualizer::Run(), and width.

◆ DrawGeometriesWithVertexSelection()

bool cloudViewer::visualization::DrawGeometriesWithVertexSelection ( const std::vector< std::shared_ptr< const ccHObject >> &  geometry_ptrs,
const std::string &  window_name,
int  width,
int  height,
int  left,
int  top 
)

◆ GetGlobalColorMap()

const std::shared_ptr< const ColorMap > cloudViewer::visualization::GetGlobalColorMap ( )

Interface functions.

Definition at line 84 of file ColorMap.cpp.

References Runtime::GetInstance().

◆ MakeSlider()

std::shared_ptr<gui::Slider> cloudViewer::visualization::MakeSlider ( const gui::Slider::Type  type,
const double  min,
const double  max,
const double  value 
)

Definition at line 30 of file GuiSettingsView.cpp.

References type.

Referenced by cloudViewer::visualization::GuiSettingsView::GuiSettingsView().

◆ SetGlobalColorMap()

Variable Documentation

◆ CUSTOM_LIGHTING

const char* cloudViewer::visualization::CUSTOM_LIGHTING = "Custom"
static

◆ INSPECT_MODEL_NAME

const std::string cloudViewer::visualization::INSPECT_MODEL_NAME = "__inspect_model__"

◆ MODEL_NAME

◆ WIREFRAME_NAME

const std::string cloudViewer::visualization::WIREFRAME_NAME = "__wireframe_model__"