Zivid C++ API 2.17.1+7516d437-1
Zivid::Visualization::Visualizer Class Reference

Simple visualizer component for point clouds. More...

#include <Zivid/Visualization/Visualizer.h>

Public Member Functions

ZIVID_VISUALIZATION_EXPORT Visualizer ()
 Constructor.
ZIVID_VISUALIZATION_EXPORT void show ()
 Show the visualization window.
ZIVID_VISUALIZATION_EXPORT void hide ()
 Hide the visualization window.
ZIVID_VISUALIZATION_EXPORT int run ()
 Run the event loop. Should be called to allow interaction with the point cloud.
ZIVID_VISUALIZATION_EXPORT void close ()
 Stop the event loop and close the window. The object goes back to idle state.
ZIVID_VISUALIZATION_EXPORT void resize (int h, int w)
 Resize the window to specified height and width.
ZIVID_VISUALIZATION_EXPORT void resetToFit ()
 Reset the view so that the point cloud will fit in the window.
ZIVID_VISUALIZATION_EXPORT void showFullScreen ()
 Show the window in full screen mode.
ZIVID_VISUALIZATION_EXPORT void showMaximized ()
 Show the window in maximized mode.
ZIVID_VISUALIZATION_EXPORT void setWindowTitle (std::string title)
 Set the window title.
ZIVID_VISUALIZATION_EXPORT void show (const PointCloud &cloud)
 Show a point cloud.
ZIVID_VISUALIZATION_EXPORT void show (const UnorganizedPointCloud &cloud)
 Show an unorganized point cloud.
ZIVID_VISUALIZATION_EXPORT void show (const Frame &frame)
 Show a frame.
ZIVID_VISUALIZATION_EXPORT void setColorsEnabled (bool enabled)
 Enable or disable coloring of the points with their accompanying RGB colors.
ZIVID_VISUALIZATION_EXPORT bool colorsEnabled () const
 Whether coloring of the points with their accompanying RGB colors is enabled.
ZIVID_VISUALIZATION_EXPORT void setMeshingEnabled (bool enabled)
 Enable or disable meshing.
ZIVID_VISUALIZATION_EXPORT bool isMeshingEnabled () const
 Whether meshing is enabled.
ZIVID_VISUALIZATION_EXPORT void setAxisIndicatorEnabled (bool enabled)
 Enable or disable the axis indicator.
ZIVID_VISUALIZATION_EXPORT bool isAxisIndicatorEnabled () const
 Whether the axis indicator is enabled.

Static Public Member Functions

static ZIVID_VISUALIZATION_EXPORT std::string toString ()
 String representation of the Visualizer.

Detailed Description

Simple visualizer component for point clouds.

Constructor & Destructor Documentation

◆ Visualizer()

ZIVID_VISUALIZATION_EXPORT Zivid::Visualization::Visualizer::Visualizer ( )

Constructor.

Member Function Documentation

◆ close()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::close ( )

Stop the event loop and close the window. The object goes back to idle state.

◆ colorsEnabled()

ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::colorsEnabled ( ) const

Whether coloring of the points with their accompanying RGB colors is enabled.

◆ hide()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::hide ( )

Hide the visualization window.

◆ isAxisIndicatorEnabled()

ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::isAxisIndicatorEnabled ( ) const

Whether the axis indicator is enabled.

◆ isMeshingEnabled()

ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::isMeshingEnabled ( ) const

Whether meshing is enabled.

◆ resetToFit()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::resetToFit ( )

Reset the view so that the point cloud will fit in the window.

The view will be reset to the default view, which is looking at the point cloud along the Z axis in the positive direction.

◆ resize()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::resize ( int h,
int w )

Resize the window to specified height and width.

◆ run()

ZIVID_VISUALIZATION_EXPORT int Zivid::Visualization::Visualizer::run ( )

Run the event loop. Should be called to allow interaction with the point cloud.

◆ setAxisIndicatorEnabled()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setAxisIndicatorEnabled ( bool enabled)

Enable or disable the axis indicator.

◆ setColorsEnabled()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setColorsEnabled ( bool enabled)

Enable or disable coloring of the points with their accompanying RGB colors.

◆ setMeshingEnabled()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setMeshingEnabled ( bool enabled)

Enable or disable meshing.

Meshing is not supported when showing an unorganized point cloud. An exception will be thrown if setMeshingEnabled(true) is called while an unorganized point cloud is being shown.

◆ setWindowTitle()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setWindowTitle ( std::string title)

Set the window title.

◆ show() [1/4]

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show ( )

Show the visualization window.

◆ show() [2/4]

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show ( const Frame & frame)

Show a frame.

◆ show() [3/4]

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show ( const PointCloud & cloud)

Show a point cloud.

◆ show() [4/4]

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show ( const UnorganizedPointCloud & cloud)

Show an unorganized point cloud.

Meshing is not supported when showing an unorganized point cloud. This method will throw an exception if meshing is enabled.

If the point cloud is transformed, then it may be necessary to call resetToFit() to reset the view such that the point cloud becomes visible.

◆ showFullScreen()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::showFullScreen ( )

Show the window in full screen mode.

◆ showMaximized()

ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::showMaximized ( )

Show the window in maximized mode.

◆ toString()

ZIVID_VISUALIZATION_EXPORT std::string Zivid::Visualization::Visualizer::toString ( )
static

String representation of the Visualizer.


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