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

Diffraction class Event. More...

#include <Diffraction.h>

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

Public Member Functions

 Diffraction (const vec3 &position=vec3(0.0, 0.0, 0.0), const vec3 &incomingDirection=vec3(0.0, 0.0, 0.0), Cylindre *c=NULL)
 Constructor. More...
 
 Diffraction (const Diffraction &other)
 Copy constructor. More...
 
virtual ~Diffraction ()
 Destructor. More...
 
virtual void setNbResponseLeft (int _nbResponseLeft)
 Set the number of remaining rays to launch. More...
 
virtual bool getResponse (vec3 &r, bool force=false)
 Computes the next response of the event in function of the number of responses left. More...
 
void setAngleOuverture (decimal angle)
 Set the aperture angle of the cone of Keller. More...
 
decimal getAngleOuverture ()
 Get the aperture angle of the cone of Keller. More...
 
decimal getDeltaTheta () const
 Get the angle between 2 consecutive responses. More...
 
virtual double getAngle ()
 Get the angle between the incident ray and the diffraction edge. More...
 
virtual bool generateTest (std::vector< vec3 > &succededTest, std::vector< vec3 > &failTest, unsigned int nbResponses)
 
virtual const ReperegetRepere () const
 Get the local frame. More...
 
- Public Member Functions inherited from Event
 Event (const vec3 &position=vec3(0.0, 0.0, 0.0), const vec3 &incomingDirection=vec3(0.0, 0.0, 0.0), Shape *_shape=NULL)
 Default constructor. More...
 
 Event (const Event &other)
 Copy constructor. More...
 
virtual ~Event ()
 Destructor. More...
 
const vec3 & getPosition () const
 Return a reference to the event location point. More...
 
void setPosition (const vec3 &_pos)
 Set a new point to the event. More...
 
vec3 getIncomingDirection ()
 Return the direction of the incoming vector. More...
 
void setIncomingDirection (const vec3 &_from)
 Set a new incoming vector. More...
 
bool isReponseLeft ()
 Return true if it remains rays to launch. More...
 
int getNbResponseLeft ()
 Return the number of remaining rays to launch. More...
 
virtual int getInitialNbResponseLeft () const
 Return the number of rays to launch after event. More...
 
ShapegetShape ()
 Return the primitive of the impact. More...
 
const ShapegetShape () const
 
void setShape (Shape *_shape)
 Set the impacted primitive of the event. More...
 
virtual bool isAcceptableResponse (vec3 &test)
 Return true if the ray direction vector in response of the event is acceptable. More...
 
virtual bool generateResponse (std::vector< vec3 > &responses, unsigned int nbResponses)
 
virtual bool appendTarget (vec3 target, bool force=false)
 
virtual int getType () const
 Return the event type. More...
 
virtual void setType (const typeevent &_type)
 Added by DTh to make possible simple test of rays. More...
 
virtual double getAngle () const
 Get incident angle. More...
 
const decimal distance (const Event &other) const
 Return distance from another event. 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...
 

Public Attributes

bool(* responseValidator )(const vec3 &, const vec3 &, const vec3 &, vec3 &)
 Filter generated response (or not) More...
 
void(* getTheta )(const decimal &, const decimal &, const decimal &, decimal &)
 

Protected Member Functions

void buildRepere ()
 Build local frame. More...
 
void computeAngle ()
 Compute the angle between the incident ray and the diffraction edge. More...
 
void computeDTheta ()
 Compute the angle step between two responses in function of the aperture angle and the number of responses left. More...
 

Protected Attributes

Repere localRepere
 Local frame. More...
 
decimal angleOuverture
 Angle formed by the two faces of the diffraction edge. More...
 
decimal angleArrive
 Incident ray angle. More...
 
decimal delta_theta
 Angle step between two rays to send. More...
 
vec3 N1
 Face 1 normal. More...
 
vec3 N2
 Face 2 normal. More...
 
- Protected Attributes inherited from Event
vec3 pos
 Location point of the event. More...
 
vec3 from
 Direction vector of the incoming ray. More...
 
int nbResponseLeft
 Number of remaining rays to launch. More...
 
int initialNbResponse
 Number of rays to launch after event. More...
 
Samplersampler
 Pointer to a Sampler. More...
 
Shapeshape
 The impact primitive. More...
 
typeevent type
 Event type. More...
 
- Protected Attributes inherited from Base
std::string name
 Each instantiated object may be named. More...
 

Detailed Description

Diffraction class Event.

Definition at line 30 of file Diffraction.h.

Constructor & Destructor Documentation

◆ Diffraction() [1/2]

Diffraction::Diffraction ( const vec3 &  position = vec3(0.0, 0.0, 0.0),
const vec3 &  incomingDirection = vec3(0.0, 0.0, 0.0),
Cylindre c = NULL 
)

Constructor.

Definition at line 87 of file Diffraction.cpp.

Here is the call graph for this function:

◆ Diffraction() [2/2]

Diffraction::Diffraction ( const Diffraction other)

Copy constructor.

Definition at line 125 of file Diffraction.cpp.

Here is the call graph for this function:

◆ ~Diffraction()

virtual Diffraction::~Diffraction ( )
inlinevirtual

Destructor.

Definition at line 39 of file Diffraction.h.

Member Function Documentation

◆ buildRepere()

void Diffraction::buildRepere ( )
protected

Build local frame.

Definition at line 188 of file Diffraction.cpp.

Here is the caller graph for this function:

◆ computeAngle()

void Diffraction::computeAngle ( )
protected

Compute the angle between the incident ray and the diffraction edge.

Definition at line 215 of file Diffraction.cpp.

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

◆ computeDTheta()

void Diffraction::computeDTheta ( )
inlineprotected

Compute the angle step between two responses in function of the aperture angle and the number of responses left.

Definition at line 123 of file Diffraction.h.

Here is the caller graph for this function:

◆ generateTest()

bool Diffraction::generateTest ( std::vector< vec3 > &  succededTest,
std::vector< vec3 > &  failTest,
unsigned int  nbResponses 
)
virtual

Reimplemented from Event.

Definition at line 230 of file Diffraction.cpp.

Here is the call graph for this function:

◆ getAngle()

virtual double Diffraction::getAngle ( )
inlinevirtual

Get the angle between the incident ray and the diffraction edge.

Definition at line 90 of file Diffraction.h.

Here is the caller graph for this function:

◆ getAngleOuverture()

decimal Diffraction::getAngleOuverture ( )
inline

Get the aperture angle of the cone of Keller.

Definition at line 74 of file Diffraction.h.

◆ getDeltaTheta()

decimal Diffraction::getDeltaTheta ( ) const
inline

Get the angle between 2 consecutive responses.

Definition at line 82 of file Diffraction.h.

◆ getRepere()

virtual const Repere& Diffraction::getRepere ( ) const
inlinevirtual

Get the local frame.

Definition at line 97 of file Diffraction.h.

◆ getResponse()

bool Diffraction::getResponse ( vec3 &  r,
bool  force = false 
)
virtual

Computes the next response of the event in function of the number of responses left.

Reimplemented from Event.

Definition at line 138 of file Diffraction.cpp.

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

◆ setAngleOuverture()

void Diffraction::setAngleOuverture ( decimal  angle)
inline

Set the aperture angle of the cone of Keller.

Definition at line 65 of file Diffraction.h.

Here is the call graph for this function:

◆ setNbResponseLeft()

virtual void Diffraction::setNbResponseLeft ( int  _nbResponseLeft)
inlinevirtual

Set the number of remaining rays to launch.

Reimplemented from Event.

Definition at line 41 of file Diffraction.h.

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

Member Data Documentation

◆ angleArrive

decimal Diffraction::angleArrive
protected

Incident ray angle.

Definition at line 132 of file Diffraction.h.

◆ angleOuverture

decimal Diffraction::angleOuverture
protected

Angle formed by the two faces of the diffraction edge.

Definition at line 131 of file Diffraction.h.

◆ delta_theta

decimal Diffraction::delta_theta
protected

Angle step between two rays to send.

Definition at line 134 of file Diffraction.h.

◆ getTheta

void(* Diffraction::getTheta) (const decimal &, const decimal &, const decimal &, decimal &)

Get the angle of the next response around Keller's cone. (returns only angles that result in a response pointing outside the obstacle)

Definition at line 60 of file Diffraction.h.

◆ localRepere

Repere Diffraction::localRepere
protected

Local frame.

Definition at line 129 of file Diffraction.h.

◆ N1

vec3 Diffraction::N1
protected

Face 1 normal.

Definition at line 136 of file Diffraction.h.

◆ N2

vec3 Diffraction::N2
protected

Face 2 normal.

Definition at line 137 of file Diffraction.h.

◆ responseValidator

bool(* Diffraction::responseValidator) (const vec3 &, const vec3 &, const vec3 &, vec3 &)

Filter generated response (or not)

Definition at line 56 of file Diffraction.h.


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