![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Classes | |
| class | RandomContext |
| class | UniformIntGenerator |
| class | UniformRealGenerator |
| class | NormalGenerator |
| class | DiscreteGenerator |
Functions | |
| void | Seed (const int seed) |
| Set CloudViewer global random seed. More... | |
| std::mt19937 * | GetEngine () |
| std::mutex * | GetMutex () |
| uint32_t | RandUint32 () |
| void | pybind_random (py::module &m) |
| std::mt19937 * cloudViewer::utility::random::GetEngine | ( | ) |
Get global singleton random engine. You must also lock the global mutex before calling the engine.
Example:
Definition at line 55 of file Random.cpp.
References cloudViewer::utility::random::RandomContext::GetEngine(), and cloudViewer::utility::random::RandomContext::GetInstance().
Referenced by cloudViewer::utility::random::UniformIntGenerator< T >::operator()(), cloudViewer::utility::random::UniformRealGenerator< T >::operator()(), cloudViewer::utility::random::NormalGenerator< T >::operator()(), cloudViewer::utility::random::DiscreteGenerator< T >::operator()(), cloudViewer::t::geometry::PointCloud::RandomDownSample(), and RandUint32().
| std::mutex * cloudViewer::utility::random::GetMutex | ( | ) |
Get global singleton mutex to protect the engine call. Also see random::GetEngine().
Definition at line 57 of file Random.cpp.
References cloudViewer::utility::random::RandomContext::GetInstance(), and cloudViewer::utility::random::RandomContext::GetMutex().
Referenced by cloudViewer::utility::random::UniformIntGenerator< T >::operator()(), cloudViewer::utility::random::UniformRealGenerator< T >::operator()(), cloudViewer::utility::random::NormalGenerator< T >::operator()(), cloudViewer::utility::random::DiscreteGenerator< T >::operator()(), cloudViewer::t::geometry::PointCloud::RandomDownSample(), and RandUint32().
| void cloudViewer::utility::random::pybind_random | ( | py::module & | m | ) |
Definition at line 17 of file random.cpp.
References cloudViewer::docstring::FunctionDocInject(), and Seed().
Referenced by cloudViewer::utility::pybind_utility().
| uint32_t cloudViewer::utility::random::RandUint32 | ( | ) |
Generate a random uint32. This function is globally seeded by utility::random::Seed(). This function is automatically protected by the global random mutex.
Definition at line 59 of file Random.cpp.
References GetEngine(), and GetMutex().
Referenced by cloudViewer::core::SlabNodeManager::SlabNodeManager().
| void cloudViewer::utility::random::Seed | ( | const int | seed | ) |
Set CloudViewer global random seed.
Definition at line 53 of file Random.cpp.
References cloudViewer::utility::random::RandomContext::GetInstance(), and cloudViewer::utility::random::RandomContext::Seed().
Referenced by pybind_random().