Code_TYMPAN
4.2.0
Industrial site acoustic simulation
|
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-4095) and the receptor number (in the range 0-1048576) as a bit field. The second one describes the sequences of events by their types (user could decide what 1 represent, may be REFLEXION or DIFFRACTION) More...
#include <Ray.h>
Public Member Functions | |
Ray () | |
Constructors. More... | |
Ray (const vec3 &_position, const vec3 &_direction) | |
Ray (const Ray &other) | |
Copy constructors. More... | |
Ray (Ray *other) | |
virtual | ~Ray () |
Destructor. More... | |
decimal | computeEventsSequenceLength () |
Compute the length of the sequence of events. More... | |
void | computeLongueur () |
Compute the distance traveled (length) by the ray and the result is set into the longueur attribute. More... | |
decimal | computeTrueLength (const vec3 &ref, const vec3 &lastPos, vec3 &closestPoint) |
Compute ray length from source to closestPoint closestPoint is the projection of ref on the line passing by lastPos and the position of the last event (or source if the ray has no events) More... | |
decimal | computePertinentLength (const vec3 &ref, const vec3 &lastPos, vec3 &closestPoint) |
Compute ray length from last pertinent event (i.e. source or last diffraction) to the nearest point of the "event" located at ref position. More... | |
Base * | getLastPertinentEventOrSource (typeevent evType=DIFFRACTION) |
Return a pointer to the last event of type evType or source if none. More... | |
vec3 | computeLocalOrigin (Base *ev) |
Return position of ev which might be a source or an event. More... | |
double | getLongueur () const |
Return the traveled distance by the ray. More... | |
unsigned int | getDiff () const |
Return the diffractions number encountered by the ray. More... | |
unsigned int | getReflex () const |
Return the reflections number encountered by the ray. More... | |
unsigned int | getNbEvents () const |
Return the total number of events. More... | |
std::vector< boost::shared_ptr< Event > > * | getEvents () |
Return the events array encountered by the ray. More... | |
const std::vector< boost::shared_ptr< Event > > * | getEvents () const |
Return the events array encountered by the ray. More... | |
vector< unsigned int > | getFaceHistory () |
Return the array of faces id encountered by the ray. More... | |
vector< unsigned int > | getPrimitiveHistory () |
Return the array of primitives id encountered by the ray. More... | |
Source * | getSource () |
Return the ray source. More... | |
void * | getRecepteur () |
Return the ray receptor. More... | |
signature | getSignature (const typeevent &typeEv=SPECULARREFLEXION) |
Compute the signature (i.e. std::pair<unsigned int, unsigned int>) of the ray) More... | |
decimal | getThickness (const decimal &distance, bool diffraction) |
Compute the thickness of the ray after having traveled a certain distance depending on the type of source which generated the ray (spherical or diffraction source) More... | |
decimal | getSolidAngle (bool &diffraction) |
Compute the solid angle associated with the ray (depends on the type of source which generated the ray and the number of rays it generated) More... | |
bitSet | getSRBitSet (const unsigned int &source_id, const unsigned int &receptor_id) |
Compute the bitSet associated with a source and a receptor. More... | |
bitSet | getEventsBitSet (const typeevent &typeEv) |
Compute the bitSet associated with a list of events of type evType. More... | |
decimal | getCumulDelta () const |
Return the cumulative difference between the rays length and its length when ignoring diffractions and taking the direct path between reflections instead. More... | |
decimal | getCumulDistance () const |
Return the cumulative length since the last reflection event. More... | |
unsigned long long int | getConstructId () const |
Return Ray id. More... | |
decimal | getMint () const |
Return mint. More... | |
decimal | getMaxt () const |
Return maxt. More... | |
vec3 | getFinalPosition () const |
Return ending point of the ray (this ending point is set when a the ray hits a receptor in engine.searchForReceptor) More... | |
vec3 | getDirection () const |
Return direction of the ray. More... | |
vec3 | getPosition () const |
Return starting point ray. More... | |
void | setPosition (vec3 _position) |
set the starting point ray More... | |
void | setDirection (vec3 _direction) |
set the direction if the ray More... | |
void | setFinalPosition (vec3 _finalPosition) |
set the ending point of the ray More... | |
void | setMint (decimal _mint) |
set the Mint More... | |
void | setMaxt (decimal _maxt) |
set the maxt More... | |
void | setSource (Source *_source) |
set the pointer to the source of the ray More... | |
void | setRecepteur (void *_recepteur) |
set the pointer to the receptor of the ray More... | |
void | setLongueur (decimal _longueur) |
set the distance traveled by the ray More... | |
void | setConstructId (unsigned long long int _constructId) |
set the ray id More... | |
void | setNbReflexion (unsigned int _nbReflexion) |
set the reflections number for the ray More... | |
void | setNbDiffraction (unsigned int _nbDiffraction) |
set the diffractions number for the ray More... | |
void | setCumulDistance (decimal _cumulDistance) |
set the cumulative distance by the ray computed at each step More... | |
void | setCumulDelta (decimal _cumulDelta) |
set the cumulative walking step difference by the ray computed at each step More... | |
void | addEvent (boost::shared_ptr< Event > _event) |
vector< unsigned int > | getEventSignature () |
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 | |
vec3 | position |
Starting point ray. More... | |
vec3 | direction |
Direction vector for the ray at the source. More... | |
vec3 | finalPosition |
Ending point of the ray. More... | |
decimal | mint |
decimal | maxt |
Source * | source |
Pointer to the source of the ray. More... | |
void * | recepteur |
Pointer to the receptor of the ray. More... | |
decimal | longueur |
Distance traveled by the ray. More... | |
unsigned long long int | constructId |
Ray id. More... | |
unsigned int | nbReflexion |
Reflections number for the ray. More... | |
unsigned int | nbDiffraction |
Diffractions number for the ray. More... | |
decimal | cumulDistance |
Cumulative length since last valid reflexion. More... | |
decimal | cumulDelta |
Cumulative difference by the ray computed at each step. More... | |
std::vector< boost::shared_ptr< Event > > | events |
Events list for the ray. More... | |
Protected Attributes inherited from Base | |
std::string | name |
Each instantiated object may be named. More... | |
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-4095) and the receptor number (in the range 0-1048576) as a bit field. The second one describes the sequences of events by their types (user could decide what 1 represent, may be REFLEXION or DIFFRACTION)
|
inline |
|
inline |
decimal Ray::computeEventsSequenceLength | ( | ) |
|
inline |
void Ray::computeLongueur | ( | ) |
decimal Ray::computePertinentLength | ( | const vec3 & | ref, |
const vec3 & | lastPos, | ||
vec3 & | closestPoint | ||
) |
decimal Ray::computeTrueLength | ( | const vec3 & | ref, |
const vec3 & | lastPos, | ||
vec3 & | closestPoint | ||
) |
Compute ray length from source to closestPoint closestPoint is the projection of ref on the line passing by lastPos and the position of the last event (or source if the ray has no events)
ref | |
lastPos | |
closestPoint |
Definition at line 98 of file Ray.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bitSet Ray::getEventsBitSet | ( | const typeevent & | typeEv | ) |
vector< unsigned int > Ray::getEventSignature | ( | ) |
Ray::getFaceHistory | ( | ) |
|
inline |
void * Ray::getLastPertinentEventOrSource | ( | typeevent | evType = DIFFRACTION | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Ray::getPrimitiveHistory | ( | ) |
|
inline |
|
inline |
signature Ray::getSignature | ( | const typeevent & | typeEv = SPECULARREFLEXION | ) |
decimal Ray::getSolidAngle | ( | bool & | diffraction | ) |
Compute the solid angle associated with the ray (depends on the type of source which generated the ray and the number of rays it generated)
diffraction | Set diffraction true if last pertinent event is a diffraction |
Definition at line 269 of file Ray.cpp.
|
inline |
|
inline |
decimal Ray::getThickness | ( | const decimal & | distance, |
bool | diffraction | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |