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

Specular reflection class Event. More...

#include <SpecularReflexion.h>

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

Public Member Functions

 SpecularReflexion (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...
 
 SpecularReflexion (const SpecularReflexion &other)
 Copy constructor. More...
 
virtual ~SpecularReflexion ()
 Destructor. More...
 
virtual bool getResponse (vec3 &r, bool force=false)
 Return a direction vector for the impact. Ray direction vector in response 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 double getAngle ()
 Get incident angle. 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 void setNbResponseLeft (int _nbResponseLeft)
 Set 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 generateTest (std::vector< vec3 > &succededTest, std::vector< vec3 > &failTest, unsigned int nbResponses)
 
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...
 

Additional Inherited Members

- 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

Specular reflection class Event.

Definition at line 23 of file SpecularReflexion.h.

Constructor & Destructor Documentation

◆ SpecularReflexion() [1/2]

SpecularReflexion::SpecularReflexion ( const vec3 &  position = vec3(0.0, 0.0, 0.0),
const vec3 &  incomingDirection = vec3(0.0, 0.0, 0.0),
Shape _shape = NULL 
)
inline

Default constructor.

Definition at line 28 of file SpecularReflexion.h.

◆ SpecularReflexion() [2/2]

SpecularReflexion::SpecularReflexion ( const SpecularReflexion other)
inline

Copy constructor.

Definition at line 36 of file SpecularReflexion.h.

◆ ~SpecularReflexion()

virtual SpecularReflexion::~SpecularReflexion ( )
inlinevirtual

Destructor.

Definition at line 41 of file SpecularReflexion.h.

Member Function Documentation

◆ getAngle()

double SpecularReflexion::getAngle ( )
virtual

Get incident angle.

Definition at line 31 of file SpecularReflexion.cpp.

Here is the call graph for this function:

◆ getResponse()

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

Return a direction vector for the impact. Ray direction vector in response of the event.

Returns
New direction vector
Warning
Should be overloaded by the inherited classes of Event

Reimplemented from Event.

Definition at line 19 of file SpecularReflexion.cpp.

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

◆ isAcceptableResponse()

virtual bool SpecularReflexion::isAcceptableResponse ( vec3 &  test)
inlinevirtual

Return true if the ray direction vector in response of the event is acceptable.

Returns
True if the response is acceptable
Warning
Should be overloaded by the inherited classes of Event

Reimplemented from Event.

Definition at line 47 of file SpecularReflexion.h.


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