DGtal 2.0.0
Loading...
Searching...
No Matches
RandomPointExtension Struct Reference

[viewer3D-extension-derivation] More...

Inheritance diagram for RandomPointExtension:
[legend]

Public Member Functions

void OnUI ()
 

Detailed Description

[viewer3D-extension-derivation]

Definition at line 52 of file viewer3D-11-extension.cpp.

Member Function Documentation

◆ OnUI()

void RandomPointExtension::OnUI ( )
inline

Definition at line 53 of file viewer3D-11-extension.cpp.

53 {
54 static int count = 16;
55 // Depending on the viewer, this may change
56 ImGui::SliderInt("Number of points to draw", &count, 0, 32);
57 if (ImGui::Button("Create points")) {
58 for (int i = 0; i < count; ++i) {
59 // Rand values from -10 to 10
60 // Viewer is pointer to the viewer this extension is attached to
61 *viewer << Point(rand() % 21 - 10, rand() % 21 - 10, rand() % 21 - 10);
62 }
63 // Ask viewer to render all data that were added
64 viewer->renderNewData();
65 }
66 }
Space::Point Point
Definition StdDefs.h:168

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