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

Event that is only a point in a ray path with no direction change. More...

#include <DoNothing.h>

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

Public Member Functions

 DoNothing (const vec3 &position=vec3(0.0, 0.0, 0.0), const vec3 &incomingDirection=vec3(0.0, 0.0, 0.0), Shape *_shape=NULL)
 Constructors. More...
 
 DoNothing (const DoNothing &other)
 
virtual ~DoNothing ()
 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...
 
- 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

Event that is only a point in a ray path with no direction change.

Definition at line 24 of file DoNothing.h.

Constructor & Destructor Documentation

◆ DoNothing() [1/2]

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

Constructors.

Definition at line 28 of file DoNothing.h.

◆ DoNothing() [2/2]

DoNothing::DoNothing ( const DoNothing other)
inline

Definition at line 36 of file DoNothing.h.

◆ ~DoNothing()

virtual DoNothing::~DoNothing ( )
inlinevirtual

Destructor.

Definition at line 41 of file DoNothing.h.

Member Function Documentation

◆ getResponse()

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

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 45 of file DoNothing.h.

Here is the caller graph for this function:

◆ isAcceptableResponse()

virtual bool DoNothing::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 54 of file DoNothing.h.


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