DGtal 2.1.0
|
A general callback for the viewer to give control to the user. More...
#include <DGtal/io/Display3D.h>
Public Member Functions | |
virtual void | OnAttach (void *_viewer) |
Called when setCallback is performed on the viewer. | |
virtual void | OnUI (void *viewerData) |
Called to render or interact with some UI. | |
virtual void | OnClick (const std::string &name, size_t index, const DisplayData< RealPoint > &data, void *viewerData) |
Called when an element is clicked. | |
Data Fields | |
Display3D< Space, KSpace > * | viewer = nullptr |
A general callback for the viewer to give control to the user.
There are no guarentees on the thread-safeness of this class.
Definition at line 408 of file Display3D.h.
|
inlinevirtual |
Called when setCallback is performed on the viewer.
This is callback can be used to store the pointer to a particular instance of the viewer.
If only general properties are needed, use the Callback::viewer member which is set prior calling this function.
_viewer | A pointer to the viewer on which this callback is attached |
Definition at line 420 of file Display3D.h.
|
inlinevirtual |
Called when an element is clicked.
name | The name of the structure containing the element |
index | The index within the clicked structure |
data | The Display3D data associated with this structure |
viewerData | Viewer-dependent data associated with the click |
Definition at line 437 of file Display3D.h.
References DGtal::Display3D< Space, KSpace >::data, and index().
|
inlinevirtual |
Called to render or interact with some UI.
viewerData | Some viewer-dependent data to draw UI (context) |
Definition at line 426 of file Display3D.h.
Definition at line 440 of file Display3D.h.