Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
RandomSphericSampler Class Reference

A Sampler class for random spherical sampling. More...

#include <RandomSphericSampler.h>

Inheritance diagram for RandomSphericSampler:
Inheritance graph
[legend]
Collaboration diagram for RandomSphericSampler:
Collaboration graph
[legend]

Public Member Functions

 RandomSphericSampler (const unsigned int &nbRays=0, const decimal &Theta=(decimal) M_PIDIV2, const decimal &Phi=(decimal) M_2PI)
 Constructors. More...
 
 RandomSphericSampler (const RandomSphericSampler &other)
 
 RandomSphericSampler (RandomSphericSampler *sampler)
 
virtual SamplerClone ()
 Clone a sample. More...
 
virtual ~RandomSphericSampler ()
 Destructor. More...
 
virtual vec3 getSample ()
 Return the sample. More...
 
virtual bool isAcceptableSample (vec3 v)
 Return true for an acceptable sample. More...
 
virtual unsigned int computeDiffractionNbr (const decimal &thetaCalcul)
 Return the number of rays to launch after a diffraction event. More...
 
- Public Member Functions inherited from Sampler
 Sampler (const unsigned int &nbRays=0, const decimal &Theta=(decimal) M_PIDIV2, const decimal &Phi=(decimal) M_2PI)
 Default constructor. More...
 
 Sampler (const Sampler &other)
 Copy constructors. More...
 
 Sampler (Sampler *sampler)
 
virtual ~Sampler ()
 Destructor. More...
 
virtual void init ()
 Initialize the sample. More...
 
virtual unsigned int getNbRays () const
 Get/Set the number of rays to launch. More...
 
virtual void setNbRays (const unsigned int &nbRays)
 
decimal getTheta () const
 Get/Set the polar angle. More...
 
void setTheta (const decimal &Theta)
 
decimal getPhi () const
 Get/Set the equatorial polar angle. More...
 
void setPhi (const decimal &Phi)
 

Private Attributes

boost::uniform_real bounded_sampler
 

Static Private Attributes

static boost::mt19937 random_generator = boost::mt19937()
 

Additional Inherited Members

- Protected Attributes inherited from Sampler
unsigned int _nb_rays
 Number of rays to launch. More...
 
decimal _theta
 Global polar angle. More...
 
decimal _phi
 Global equatorial angle. More...
 

Detailed Description

A Sampler class for random spherical sampling.

Definition at line 36 of file RandomSphericSampler.h.

Constructor & Destructor Documentation

◆ RandomSphericSampler() [1/3]

RandomSphericSampler::RandomSphericSampler ( const unsigned int &  nbRays = 0,
const decimal &  Theta = (decimal) M_PIDIV2,
const decimal &  Phi = (decimal) M_2PI 
)
inline

Constructors.

Definition at line 41 of file RandomSphericSampler.h.

Here is the caller graph for this function:

◆ RandomSphericSampler() [2/3]

RandomSphericSampler::RandomSphericSampler ( const RandomSphericSampler other)
inline

Definition at line 48 of file RandomSphericSampler.h.

◆ RandomSphericSampler() [3/3]

RandomSphericSampler::RandomSphericSampler ( RandomSphericSampler sampler)
inline

Definition at line 52 of file RandomSphericSampler.h.

◆ ~RandomSphericSampler()

virtual RandomSphericSampler::~RandomSphericSampler ( )
inlinevirtual

Destructor.

Definition at line 62 of file RandomSphericSampler.h.

Member Function Documentation

◆ Clone()

virtual Sampler* RandomSphericSampler::Clone ( )
inlinevirtual

Clone a sample.

Reimplemented from Sampler.

Definition at line 56 of file RandomSphericSampler.h.

Here is the call graph for this function:

◆ computeDiffractionNbr()

virtual unsigned int RandomSphericSampler::computeDiffractionNbr ( const decimal &  theta)
inlinevirtual

Return the number of rays to launch after a diffraction event.

Reimplemented from Sampler.

Definition at line 81 of file RandomSphericSampler.h.

◆ getSample()

virtual vec3 RandomSphericSampler::getSample ( )
inlinevirtual

Return the sample.

Reimplemented from Sampler.

Definition at line 64 of file RandomSphericSampler.h.

Here is the call graph for this function:

◆ isAcceptableSample()

virtual bool RandomSphericSampler::isAcceptableSample ( vec3  v)
inlinevirtual

Return true for an acceptable sample.

Reimplemented from Sampler.

Definition at line 79 of file RandomSphericSampler.h.

Member Data Documentation

◆ bounded_sampler

boost::uniform_real RandomSphericSampler::bounded_sampler
private

Definition at line 90 of file RandomSphericSampler.h.

◆ random_generator

boost::mt19937 RandomSphericSampler::random_generator = boost::mt19937()
staticprivate

Definition at line 88 of file RandomSphericSampler.h.


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