![]() |
Zivid C++ API 2.19.0+b5c53d0f-1
|
Simple visualizer component for point clouds. More...
#include <Zivid/Visualization/Visualizer.h>
Classes | |
| struct | ViewState |
| A camera view: the eye position, the look-at point and the up direction, each as {x, y, z}. More... | |
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 width, int height) |
| 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 ViewState | viewState () const |
| The current camera view. Remains valid after the window has been closed, reflecting the last shown view, so it can be captured and later restored with setViewState(). | |
| ZIVID_VISUALIZATION_EXPORT void | setViewState (const ViewState &viewState) |
| Set the camera view from a state previously obtained via viewState(). | |
| ZIVID_VISUALIZATION_EXPORT bool | userAdjustedView () const |
| True if the user has moved the camera (drag/zoom) since the last setViewState() or resetToFit(). Lets callers re-frame the view automatically only while it is still untouched. | |
| 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 | show (const Frame2D &frame) |
| Show a 2D 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. | |
Simple visualizer component for point clouds.
| ZIVID_VISUALIZATION_EXPORT Zivid::Visualization::Visualizer::Visualizer | ( | ) |
Constructor.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::close | ( | ) |
Stop the event loop and close the window. The object goes back to idle state.
| ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::colorsEnabled | ( | ) | const |
Whether coloring of the points with their accompanying RGB colors is enabled.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::hide | ( | ) |
Hide the visualization window.
| ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::isAxisIndicatorEnabled | ( | ) | const |
Whether the axis indicator is enabled.
| ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::isMeshingEnabled | ( | ) | const |
Whether meshing is enabled.
| 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.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::resize | ( | int | width, |
| int | height ) |
Resize the window to specified height and width.
| ZIVID_VISUALIZATION_EXPORT int Zivid::Visualization::Visualizer::run | ( | ) |
Run the event loop. Should be called to allow interaction with the point cloud.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setAxisIndicatorEnabled | ( | bool | enabled | ) |
Enable or disable the axis indicator.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setColorsEnabled | ( | bool | enabled | ) |
Enable or disable coloring of the points with their accompanying RGB colors.
| 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.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setViewState | ( | const ViewState & | viewState | ) |
Set the camera view from a state previously obtained via viewState().
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::setWindowTitle | ( | std::string | title | ) |
Set the window title.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show | ( | ) |
Show the visualization window.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show | ( | const Frame & | frame | ) |
Show a frame.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show | ( | const Frame2D & | frame | ) |
Show a 2D frame.
Displays the 2D frame as a 2D texture. This replaces any currently displayed content. The image will be shown at its native resolution, centered in the window.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::show | ( | const PointCloud & | cloud | ) |
Show a point cloud.
| 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.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::showFullScreen | ( | ) |
Show the window in full screen mode.
| ZIVID_VISUALIZATION_EXPORT void Zivid::Visualization::Visualizer::showMaximized | ( | ) |
Show the window in maximized mode.
|
static |
String representation of the Visualizer.
| ZIVID_VISUALIZATION_EXPORT bool Zivid::Visualization::Visualizer::userAdjustedView | ( | ) | const |
True if the user has moved the camera (drag/zoom) since the last setViewState() or resetToFit(). Lets callers re-frame the view automatically only while it is still untouched.
| ZIVID_VISUALIZATION_EXPORT ViewState Zivid::Visualization::Visualizer::viewState | ( | ) | const |
The current camera view. Remains valid after the window has been closed, reflecting the last shown view, so it can be captured and later restored with setViewState().