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

Acoustic source class. More...

#include <Source.h>

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

Public Member Functions

 Source (std::string _name="unknown source")
 Base constructor. More...
 
 Source (const Source &other)
 Copy constructor. More...
 
virtual ~Source ()
 Destructor. More...
 
std::string getName ()
 Get the name of the Source. More...
 
void setName (const std::string &_name)
 Set the name of the Source. More...
 
vec3 getPosition ()
 Get the position of the Source. More...
 
void setPosition (const vec3 _pos)
 Set the position of the Source. More...
 
Spectre getSpectre ()
 Get the spectrum. More...
 
void setSpectre (const Spectre &spectre)
 Set the spectrum. More...
 
int getNbRayLeft ()
 Get the number of remaining rays to generate. More...
 
void setNbRayLeft (int nb)
 Set the number of remaining rays to generate. More...
 
int getInitialRayCount ()
 Get the initial rays counter. More...
 
void setInitialRayCount (int nb)
 Set the initial rays counter. More...
 
SamplergetSampler ()
 Get the Sampler of this Source. More...
 
void setSampler (Sampler *_sampler)
 Set the Sampler for this Source. More...
 
unsigned int getId ()
 Get the Source id. More...
 
void setId (unsigned int _id)
 Set the Source id. More...
 
bool getDirection (vec3 &r)
 Get a direction (return false if all rays has been launched) More...
 
- Public Member Functions inherited from Base
 Base ()
 Default constructor. More...
 
 Base (const Base &other)
 Copy constructor. More...
 
virtual ~Base ()
 Destructor. More...
 
std::string getName ()
 Get the name of the object. More...
 
void setName (const std::string &_name)
 Set the name of the object. More...
 

Protected Attributes

std::string name
 Name. More...
 
vec3 pos
 Position. More...
 
Spectre spectrePuissance
 Spectrum. More...
 
Samplersampler
 A pointer to a Sampler. More...
 
int nbRayLeft
 Number of remaining rays to generate. More...
 
int initialRayCount
 Initial rays counter. More...
 
unsigned int id
 Source identification. More...
 
int indice
 Index to know which ray we are working on. More...
 
- Protected Attributes inherited from Base
std::string name
 Each instantiated object may be named. More...
 

Detailed Description

Acoustic source class.

Definition at line 32 of file Source.h.

Constructor & Destructor Documentation

◆ Source() [1/2]

Source::Source ( std::string  _name = "unknown source")
inline

Base constructor.

Definition at line 63 of file Source.h.

◆ Source() [2/2]

Source::Source ( const Source other)
inline

Copy constructor.

Definition at line 72 of file Source.h.

Here is the call graph for this function:

◆ ~Source()

virtual Source::~Source ( )
inlinevirtual

Destructor.

Definition at line 92 of file Source.h.

Member Function Documentation

◆ getDirection()

bool Source::getDirection ( vec3 &  r)
inline

Get a direction (return false if all rays has been launched)

Definition at line 171 of file Source.h.

Here is the call graph for this function:

◆ getId()

unsigned int Source::getId ( )
inline

Get the Source id.

Definition at line 161 of file Source.h.

Here is the caller graph for this function:

◆ getInitialRayCount()

int Source::getInitialRayCount ( )
inline

Get the initial rays counter.

Definition at line 140 of file Source.h.

Here is the caller graph for this function:

◆ getName()

std::string Source::getName ( )
inline

Get the name of the Source.

Definition at line 95 of file Source.h.

◆ getNbRayLeft()

int Source::getNbRayLeft ( )
inline

Get the number of remaining rays to generate.

Definition at line 126 of file Source.h.

◆ getPosition()

vec3 Source::getPosition ( )
inline

Get the position of the Source.

Definition at line 105 of file Source.h.

Here is the caller graph for this function:

◆ getSampler()

Sampler* Source::getSampler ( )
inline

Get the Sampler of this Source.

Definition at line 151 of file Source.h.

Here is the caller graph for this function:

◆ getSpectre()

Spectre Source::getSpectre ( )
inline

Get the spectrum.

Definition at line 115 of file Source.h.

◆ setId()

void Source::setId ( unsigned int  _id)
inline

Set the Source id.

Definition at line 166 of file Source.h.

◆ setInitialRayCount()

void Source::setInitialRayCount ( int  nb)
inline

Set the initial rays counter.

Definition at line 145 of file Source.h.

◆ setName()

void Source::setName ( const std::string &  _name)
inline

Set the name of the Source.

Definition at line 100 of file Source.h.

◆ setNbRayLeft()

void Source::setNbRayLeft ( int  nb)
inline

Set the number of remaining rays to generate.

Definition at line 131 of file Source.h.

◆ setPosition()

void Source::setPosition ( const vec3  _pos)
inline

Set the position of the Source.

Definition at line 110 of file Source.h.

◆ setSampler()

void Source::setSampler ( Sampler _sampler)
inline

Set the Sampler for this Source.

Definition at line 156 of file Source.h.

◆ setSpectre()

void Source::setSpectre ( const Spectre spectre)
inline

Set the spectrum.

Definition at line 120 of file Source.h.

Member Data Documentation

◆ id

unsigned int Source::id
protected

Source identification.

Definition at line 217 of file Source.h.

◆ indice

int Source::indice
protected

Index to know which ray we are working on.

Definition at line 218 of file Source.h.

◆ initialRayCount

int Source::initialRayCount
protected

Initial rays counter.

Definition at line 216 of file Source.h.

◆ name

std::string Source::name
protected

Name.

Definition at line 211 of file Source.h.

◆ nbRayLeft

int Source::nbRayLeft
protected

Number of remaining rays to generate.

Definition at line 215 of file Source.h.

◆ pos

vec3 Source::pos
protected

Position.

Definition at line 212 of file Source.h.

◆ sampler

Sampler* Source::sampler
protected

A pointer to a Sampler.

Definition at line 214 of file Source.h.

◆ spectrePuissance

Spectre Source::spectrePuissance
protected

Spectrum.

Definition at line 213 of file Source.h.


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