chrono::utils::ChPDSampler< T > Class Template Reference

Description

template<typename T = double>
class chrono::utils::ChPDSampler< T >

Sampler for 3D domains (box, sphere, or cylinder) using Poisson Disk Sampling.

The sampler produces a set of points uniformly distributed in the specified domain such that no two points are closer than a specified distance.

2D domains can also be sampled (rectangle or circle), by setting the size of the domain in the z direction to 0.

Based on "Fast Poisson Disk Sampling in Arbitrary Dimensions" by Robert Bridson
http://people.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf

#include <ChUtilsSamplers.h>

Inheritance diagram for chrono::utils::ChPDSampler< T >:
Collaboration diagram for chrono::utils::ChPDSampler< T >:

Public Types

typedef Types< T >::PointVector PointVector
 
typedef Types< T >::PointList PointList
 
typedef ChSampler< T >::VolumeType VolumeType
 
- Public Types inherited from chrono::utils::ChSampler< T >
typedef Types< T >::PointVector PointVector
 

Public Member Functions

 ChPDSampler (T separation, int pointsPerIteration=m_ppi_default)
 Construct a Poisson Disk sampler with specified minimum distance.
 
void SetRandomEngineSeed (unsigned int seed)
 Set the current state of the random-number engine (default: 0).
 
- Public Member Functions inherited from chrono::utils::ChSampler< T >
PointVector SampleBox (const ChVector3< T > &center, const ChVector3< T > &halfDim)
 Return points sampled from the specified box volume.
 
PointVector SampleSphere (const ChVector3< T > &center, T radius)
 Return points sampled from the specified spherical volume.
 
PointVector SampleCylinderX (const ChVector3< T > &center, T radius, T halfHeight)
 Return points sampled from the specified X-aligned cylindrical volume.
 
PointVector SampleCylinderY (const ChVector3< T > &center, T radius, T halfHeight)
 Return points sampled from the specified Y-aligned cylindrical volume.
 
PointVector SampleCylinderZ (const ChVector3< T > &center, T radius, T halfHeight)
 Return points sampled from the specified Z-aligned cylindrical volume.
 
virtual T GetSeparation () const
 Get the current value of the suggested minimum separation.
 
virtual void SetSeparation (T separation)
 Change the suggested minimum separation for subsequent calls to Sample.
 

Additional Inherited Members

- Protected Types inherited from chrono::utils::ChSampler< T >
enum  VolumeType {
  BOX, SPHERE, CYLINDER_X, CYLINDER_Y,
  CYLINDER_Z
}
 
- Protected Member Functions inherited from chrono::utils::ChSampler< T >
 ChSampler (T separation)
 
bool accept (VolumeType t, const ChVector3< T > &p) const
 Utility function to check if a point is inside the sampling volume.
 
- Protected Attributes inherited from chrono::utils::ChSampler< T >
m_separation
 inter-particle separation
 
m_fuzz
 fuzz value to account for roundoff error
 
ChVector3< T > m_center
 center of the sampling volume
 
ChVector3< T > m_size
 half dimensions of the bounding box of the sampling volume
 

The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/utils/ChUtilsSamplers.h