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

Receptor inherits from a Sphere Shape. More...

#include <Recepteur.h>

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

Public Member Functions

 Recepteur ()
 Default constructor. More...
 
 Recepteur (const vec3 &pos, const decimal &r)
 Constructor. More...
 
 Recepteur (const Recepteur &other)
 Copy constructor. More...
 
virtual ~Recepteur ()
 Destructor. More...
 
ShapegetShape ()
 Return the Shape. More...
 
vec3 getPosition ()
 Get the center of the bounding box. More...
 
bool intersectionRecepteur (vec3 &origine, vec3 &directeur, float tmax, Intersection &result)
 Get the Intersection between a ray and this shape. More...
 
unsigned int getId ()
 Get/Set identification. More...
 
void setId (unsigned int _id)
 
- Public Member Functions inherited from Sphere
 Sphere ()
 Constructor, the Sphere is located at (0,0,0) with a radius 0. More...
 
 Sphere (vec3 pos, decimal r)
 Constructor with the position pos and the radius r of the sphere. More...
 
 Sphere (Sphere *other)
 Copy constructor from a pointed sphere. More...
 
virtual ShapeClone ()
 Return a pointer to this sphere. More...
 
 Sphere (const Sphere &other)
 Copy constructor. More...
 
virtual bool getIntersection (Ray &ray, Intersection &inter)
 Check if a ray intersect this sphere. More...
 
void setRadius (decimal _radius)
 Set the radius of the sphere. More...
 
decimal getRadius ()
 Get the radius of the sphere. More...
 
void setPosition (const vec3 &_position)
 Set the center of the sphere. More...
 
vec3 getPosition ()
 Get the position (center) of the sphere. More...
 
virtual int form ()
 Return type of the shape. More...
 
- Public Member Functions inherited from Shape
 Shape ()
 Default constructor. More...
 
 Shape (const std::string _name)
 Constructor by giving a name to the Shape. More...
 
 Shape (Shape *other)
 Copy constructor. More...
 
virtual ~Shape ()
 Destructor. More...
 
 Shape (const Shape &other)
 Copy constructor. More...
 
MaterialgetMaterial ()
 Return the pointed material. More...
 
void setMaterial (Material *m)
 Set the material. More...
 
virtual void updateBBox ()
 Update the bounding box: More...
 
BBox getBBox ()
 Return the bounding box. More...
 
void setVertices (std::vector< vec3 > *_vertices)
 Set/Get global vertices. More...
 
vector< vec3 > * getVertices ()
 
vector< unsigned int > * getLocalVertices ()
 Get local vertices. More...
 
virtual bool isVisible ()
 Return visibility. More...
 
virtual vec3 getNormal (const vec3 pos=vec3())
 Get normal. More...
 
void setPrimitiveId (int id)
 Set/Get the primitive id. More...
 
int getPrimitiveId () const
 
void setFaceId (int id)
 Set/Get the face id. More...
 
int getFaceId () const
 
void setEtageId (int id)
 Set/Get the floor id. More...
 
int getEtageId ()
 
void setBuildingId (int id)
 Set/Get the building id. More...
 
int getBuildingId ()
 
virtual bool sample (decimal density, std::vector< vec3 > &samples)
 Uncommented cause not used: More...
 
bool isSol () const
 Get/Set the flag _isSol (ground or not) More...
 
void setIsSol (const bool &isSol)
 
- 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

unsigned int id
 Shape identification. More...
 
- Protected Attributes inherited from Sphere
vec3 position
 Center of the sphere. More...
 
decimal radius
 Radius of the sphere. More...
 
- Protected Attributes inherited from Shape
BBox box
 Bounding box of the shape. More...
 
Materialmaterial
 Pointer to material. More...
 
std::vector< vec3 > * vertices
 GlobalVertices of the scene. More...
 
std::vector< unsigned int > localVertices
 Index of the vertices used for this shape. More...
 
int primitiveId
 Index of the primitive (given by the scene) More...
 
int faceId
 Index of the face supporting the primitive. More...
 
int buildingId
 Index of the building supporting the primitive (-1 if none) More...
 
int etageId
 Index of the floor (etage) supporting the primitive (-1 if none) More...
 
bool _isSol
 Triangle type (false = non natural, true = ground) More...
 
- Protected Attributes inherited from Base
std::string name
 Each instantiated object may be named. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Sphere
void setBBox ()
 

Detailed Description

Receptor inherits from a Sphere Shape.

Definition at line 27 of file Recepteur.h.

Constructor & Destructor Documentation

◆ Recepteur() [1/3]

Recepteur::Recepteur ( )
inline

Default constructor.

Definition at line 31 of file Recepteur.h.

◆ Recepteur() [2/3]

Recepteur::Recepteur ( const vec3 &  pos,
const decimal &  r 
)
inline

Constructor.

Definition at line 33 of file Recepteur.h.

◆ Recepteur() [3/3]

Recepteur::Recepteur ( const Recepteur other)
inline

Copy constructor.

Definition at line 38 of file Recepteur.h.

◆ ~Recepteur()

virtual Recepteur::~Recepteur ( )
inlinevirtual

Destructor.

Definition at line 43 of file Recepteur.h.

Member Function Documentation

◆ getId()

unsigned int Recepteur::getId ( )
inline

Get/Set identification.

Definition at line 54 of file Recepteur.h.

◆ getPosition()

vec3 Recepteur::getPosition ( )
inline

Get the center of the bounding box.

Definition at line 48 of file Recepteur.h.

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

◆ getShape()

Shape* Recepteur::getShape ( )
inline

Return the Shape.

Definition at line 45 of file Recepteur.h.

◆ intersectionRecepteur()

bool Recepteur::intersectionRecepteur ( vec3 &  origine,
vec3 &  directeur,
float  tmax,
Intersection result 
)

Get the Intersection between a ray and this shape.

Definition at line 19 of file Recepteur.cpp.

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

◆ setId()

void Recepteur::setId ( unsigned int  _id)
inline

Definition at line 55 of file Recepteur.h.

Here is the caller graph for this function:

Member Data Documentation

◆ id

unsigned int Recepteur::id
protected

Shape identification.

Definition at line 58 of file Recepteur.h.


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