Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Public Member Functions | List of all members
poissonDiskSampling Class Reference

a class that implements the Bridson fast sampling algorithm, in a periodic domain More...

#include <poissonDiskSampling.h>

Public Member Functions

 poissonDiskSampling (int desiredNumberOfPoints, scalar radius, vector< dVec > &sample, noiseSource &noise, shared_ptr< periodicBoundaryConditions > &Box, int max_sample_attempts=30)
 
int nDimArrayIndex (const iVec &dimensions, const iVec &x)
 
int nDimArrayIndex (const iVec &dimensions, const dVec &x)
 
void sample_annulus_point (scalar radius, const dVec &center, dVec &answer, noiseSource &noise)
 

Detailed Description

a class that implements the Bridson fast sampling algorithm, in a periodic domain

Robert Bridson, "Fast Poisson Disk Sampling in Arbitrary Dimensions" SIGGRAPH sketches (2007)

Constructor & Destructor Documentation

◆ poissonDiskSampling()

poissonDiskSampling::poissonDiskSampling ( int  pts,
scalar  radius,
vector< dVec > &  sample,
noiseSource noise,
shared_ptr< periodicBoundaryConditions > &  Box,
int  max_sample_attempts = 30 
)

Member Function Documentation

◆ nDimArrayIndex() [1/2]

int poissonDiskSampling::nDimArrayIndex ( const iVec dimensions,
const iVec x 
)

simple 1D indexing of a hypercubic cell structure

References iVec::x.

Referenced by poissonDiskSampling().

◆ nDimArrayIndex() [2/2]

int poissonDiskSampling::nDimArrayIndex ( const iVec dimensions,
const dVec &  x 
)

simple 1D indexing of a hypercubic cell structure

References iVec::x.

◆ sample_annulus_point()

void poissonDiskSampling::sample_annulus_point ( scalar  radius,
const dVec &  center,
dVec &  answer,
noiseSource noise 
)

Sample and reject to get a point in an anulus

References dot(), noiseSource::getRealUniform(), and scalar.

Referenced by poissonDiskSampling().


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