![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Public Member Functions | |
| RandomContext (RandomContext const &)=delete | |
| void | operator= (RandomContext const &)=delete |
| void | Seed (const int seed) |
| Seed the random number generator (globally). More... | |
| std::mt19937 * | GetEngine () |
| std::mutex * | GetMutex () |
| Get global singleton mutex to protect the engine call. More... | |
Static Public Member Functions | |
| static RandomContext & | GetInstance () |
| Returns the singleton instance. More... | |
Global thread-safe singleton instance for random generation. Generates compiler/OS/device independent random numbers.
Definition at line 18 of file Random.cpp.
|
delete |
|
inline |
This is used by other downstream random generators. You must also lock the GetMutex() before calling the engine.
Definition at line 37 of file Random.cpp.
Referenced by cloudViewer::utility::random::GetEngine().
|
inlinestatic |
Returns the singleton instance.
Definition at line 24 of file Random.cpp.
Referenced by cloudViewer::utility::random::GetEngine(), cloudViewer::utility::random::GetMutex(), and cloudViewer::utility::random::Seed().
|
inline |
Get global singleton mutex to protect the engine call.
Definition at line 40 of file Random.cpp.
Referenced by cloudViewer::utility::random::GetMutex().
|
delete |
|
inline |
Seed the random number generator (globally).
Definition at line 30 of file Random.cpp.
Referenced by cloudViewer::utility::random::Seed().