Class PoissonDiskSampling

Class Documentation

class SPH::PoissonDiskSampling

This class implements a Poisson disk sampling for the surface of 3D models.

Public Functions

PoissonDiskSampling()
void sampleMesh(const unsigned int numVertices, const Vector3r *vertices, const unsigned int numFaces, const unsigned int *faces, const Real minRadius, const unsigned int numTrials, unsigned int distanceNorm, std::vector<Vector3r> &samples)

Performs the poisson sampling with the respective parameters. Compare http://graphics.cs.umass.edu/pubs/sa_2010.pdf

Parameters
  • mesh: mesh data of sampled body

  • vertices: vertex data of sampled data

  • sampledVertices: sampled vertices that will be returned

  • minRadius: minimal distance of sampled vertices

  • numTestpointsPerFace: # of generated test points per face of body

  • distanceNorm: 0: euclidean norm, 1: approx geodesic distance

  • numTrials: # of iterations used to find samples

Public Static Functions

FORCE_INLINE int floor (const Real v)
struct HashEntry

Struct to store the hash entry (spatial hashing)

Public Functions

HashEntry()

Public Members

std::vector<unsigned int> samples
unsigned int startIndex
struct InitialPointInfo

Struct to store the information of the initial points.

Public Members

CellPos cP
Vector3r pos
unsigned int ID