Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Protected Attributes | List of all members
Sampler Class Reference

Sampler class and its sub-classes describe ray generators used in AcousticRayTracer. In these classes : More...

#include <Sampler.h>

Inheritance diagram for Sampler:
Inheritance graph
[legend]

Public Member Functions

 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 SamplerClone ()
 Clone a sample. More...
 
virtual ~Sampler ()
 Destructor. More...
 
virtual vec3 getSample ()
 Return the sample. More...
 
virtual bool isAcceptableSample (vec3 v)
 Return true for an acceptable sample. 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)
 
virtual unsigned int computeDiffractionNbr (const decimal &theta)
 Return the number of rays to launch after a diffraction event. More...
 

Protected Attributes

unsigned int _nb_rays
 Number of rays to launch. More...
 
decimal _theta
 Global polar angle. More...
 
decimal _phi
 Global equatorial angle. More...
 

Detailed Description

Sampler class and its sub-classes describe ray generators used in AcousticRayTracer. In these classes :

Definition at line 29 of file Sampler.h.

Constructor & Destructor Documentation

◆ Sampler() [1/3]

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

Default constructor.

Definition at line 33 of file Sampler.h.

Here is the caller graph for this function:

◆ Sampler() [2/3]

Sampler::Sampler ( const Sampler other)
inline

Copy constructors.

Definition at line 40 of file Sampler.h.

◆ Sampler() [3/3]

Sampler::Sampler ( Sampler sampler)
inline

Definition at line 48 of file Sampler.h.

◆ ~Sampler()

virtual Sampler::~Sampler ( )
inlinevirtual

Destructor.

Definition at line 62 of file Sampler.h.

Member Function Documentation

◆ Clone()

virtual Sampler* Sampler::Clone ( )
inlinevirtual

Clone a sample.

Reimplemented in UniformBeamSampler, UniformPlaneSampler, UniformSphericSampler2, UniformSphericSampler, Longitude2DSampler, Latitude2DSampler, and RandomSphericSampler.

Definition at line 56 of file Sampler.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeDiffractionNbr()

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

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

Reimplemented in UniformBeamSampler, UniformSphericSampler2, UniformSphericSampler, and RandomSphericSampler.

Definition at line 84 of file Sampler.h.

Here is the caller graph for this function:

◆ getNbRays()

virtual unsigned int Sampler::getNbRays ( ) const
inlinevirtual

Get/Set the number of rays to launch.

Definition at line 72 of file Sampler.h.

◆ getPhi()

decimal Sampler::getPhi ( ) const
inline

Get/Set the equatorial polar angle.

Definition at line 80 of file Sampler.h.

◆ getSample()

virtual vec3 Sampler::getSample ( )
inlinevirtual

Return the sample.

Reimplemented in UniformBeamSampler, UniformPlaneSampler, UniformSphericSampler2, UniformSphericSampler, Longitude2DSampler, Latitude2DSampler, and RandomSphericSampler.

Definition at line 65 of file Sampler.h.

Here is the caller graph for this function:

◆ getTheta()

decimal Sampler::getTheta ( ) const
inline

Get/Set the polar angle.

Definition at line 76 of file Sampler.h.

◆ init()

virtual void Sampler::init ( )
inlinevirtual

Initialize the sample.

Reimplemented in UniformPlaneSampler, UniformBeamSampler, UniformSphericSampler2, UniformSphericSampler, Longitude2DSampler, and Latitude2DSampler.

Definition at line 69 of file Sampler.h.

Here is the caller graph for this function:

◆ isAcceptableSample()

virtual bool Sampler::isAcceptableSample ( vec3  v)
inlinevirtual

Return true for an acceptable sample.

Reimplemented in UniformPlaneSampler, UniformBeamSampler, UniformSphericSampler2, UniformSphericSampler, Longitude2DSampler, Latitude2DSampler, and RandomSphericSampler.

Definition at line 67 of file Sampler.h.

◆ setNbRays()

virtual void Sampler::setNbRays ( const unsigned int &  nbRays)
inlinevirtual

Definition at line 73 of file Sampler.h.

Here is the call graph for this function:

◆ setPhi()

void Sampler::setPhi ( const decimal &  Phi)
inline

Definition at line 81 of file Sampler.h.

Here is the call graph for this function:

◆ setTheta()

void Sampler::setTheta ( const decimal &  Theta)
inline

Definition at line 77 of file Sampler.h.

Here is the call graph for this function:

Member Data Documentation

◆ _nb_rays

unsigned int Sampler::_nb_rays
protected

Number of rays to launch.

Definition at line 87 of file Sampler.h.

◆ _phi

decimal Sampler::_phi
protected

Global equatorial angle.

Definition at line 89 of file Sampler.h.

◆ _theta

decimal Sampler::_theta
protected

Global polar angle.

Definition at line 88 of file Sampler.h.


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