Code_TYMPAN  4.2.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 55 of file Source.h.

◆ Source() [2/2]

Source::Source ( const Source other)
inline

Copy constructor.

Definition at line 57 of file Source.h.

Here is the call graph for this function:

◆ ~Source()

virtual Source::~Source ( )
inlinevirtual

Destructor.

Definition at line 71 of file Source.h.

Here is the caller graph for this function:

Member Function Documentation

◆ getDirection()

bool Source::getDirection ( vec3 &  r)
inline

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

Definition at line 103 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 99 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 91 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 74 of file Source.h.

◆ getNbRayLeft()

int Source::getNbRayLeft ( )
inline

Get the number of remaining rays to generate.

Definition at line 87 of file Source.h.

◆ getPosition()

vec3 Source::getPosition ( )
inline

Get the position of the Source.

Definition at line 78 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 95 of file Source.h.

Here is the caller graph for this function:

◆ getSpectre()

Spectre Source::getSpectre ( )
inline

Get the spectrum.

Definition at line 82 of file Source.h.

◆ setId()

void Source::setId ( unsigned int  _id)
inline

Set the Source id.

Definition at line 101 of file Source.h.

Here is the caller graph for this function:

◆ setInitialRayCount()

void Source::setInitialRayCount ( int  nb)
inline

Set the initial rays counter.

Definition at line 93 of file Source.h.

Here is the caller graph for this function:

◆ setName()

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

Set the name of the Source.

Definition at line 76 of file Source.h.

◆ setNbRayLeft()

void Source::setNbRayLeft ( int  nb)
inline

Set the number of remaining rays to generate.

Definition at line 89 of file Source.h.

◆ setPosition()

void Source::setPosition ( const vec3  _pos)
inline

Set the position of the Source.

Definition at line 80 of file Source.h.

Here is the caller graph for this function:

◆ setSampler()

void Source::setSampler ( Sampler _sampler)
inline

Set the Sampler for this Source.

Definition at line 97 of file Source.h.

Here is the caller graph for this function:

◆ setSpectre()

void Source::setSpectre ( const Spectre spectre)
inline

Set the spectrum.

Definition at line 84 of file Source.h.

Member Data Documentation

◆ id

unsigned int Source::id
protected

Source identification.

Definition at line 149 of file Source.h.

◆ indice

int Source::indice
protected

Index to know which ray we are working on.

Definition at line 150 of file Source.h.

◆ initialRayCount

int Source::initialRayCount
protected

Initial rays counter.

Definition at line 148 of file Source.h.

◆ name

std::string Source::name
protected

Name.

Definition at line 143 of file Source.h.

◆ nbRayLeft

int Source::nbRayLeft
protected

Number of remaining rays to generate.

Definition at line 147 of file Source.h.

◆ pos

vec3 Source::pos
protected

Position.

Definition at line 144 of file Source.h.

◆ sampler

Sampler* Source::sampler
protected

A pointer to a Sampler.

Definition at line 146 of file Source.h.

◆ spectrePuissance

Spectre Source::spectrePuissance
protected

Spectrum.

Definition at line 145 of file Source.h.


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