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

Cylinder class. More...

#include <Cylindre.h>

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

Public Member Functions

 Cylindre (Shape *_p1=NULL, Shape *_p2=NULL, std::vector< vec3 > *_vertices=NULL, unsigned int v1=0, unsigned int v2=1, decimal _epaisseur=0.2)
 Constructors. More...
 
 Cylindre (const Cylindre &other)
 
virtual ~Cylindre ()
 Destructor. More...
 
virtual bool isVisible ()
 A cylinder is not visible. More...
 
virtual bool getIntersection (Ray &ray, Intersection &inter)
 Get the Intersection between a ray and this shape. More...
 
void setAngleOuverture (decimal angle)
 
decimal getAngleOuverture ()
 Get opening angle. More...
 
ShapegetFirstShape ()
 Get the first shape. More...
 
ShapegetSecondShape ()
 Get the second shape. More...
 
virtual bool sample (decimal density, std::vector< vec3 > &samples)
 Uncommented cause not used: 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...
 
virtual ShapeClone ()
 Clone and return a pointer to a Shape. 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 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 ()
 
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 Member Functions

void computeMesh ()
 

Protected Attributes

Shapep1
 First shape of the diffraction edge represented by the Cylinder. More...
 
Shapep2
 Second shape of the diffraction edge represented by the Cylinder. More...
 
decimal epaisseur
 Width. More...
 
decimal hauteur
 Height. More...
 
decimal angleOuverture
 Opening angle. More...
 
Repere localRepere
 Local frame. More...
 
vector< vec3 > points
 Array of points defining the mesh. More...
 
vector< Shape * > mesh
 Cylinder mesh (array of triangles) 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...
 

Detailed Description

Cylinder class.

Definition at line 26 of file Cylindre.h.

Constructor & Destructor Documentation

◆ Cylindre() [1/2]

Cylindre::Cylindre ( Shape _p1 = NULL,
Shape _p2 = NULL,
std::vector< vec3 > *  _vertices = NULL,
unsigned int  v1 = 0,
unsigned int  v2 = 1,
decimal  _epaisseur = 0.2 
)

Constructors.

Definition at line 19 of file Cylindre.cpp.

Here is the call graph for this function:

◆ Cylindre() [2/2]

Cylindre::Cylindre ( const Cylindre other)

Definition at line 53 of file Cylindre.cpp.

Here is the call graph for this function:

◆ ~Cylindre()

virtual Cylindre::~Cylindre ( )
inlinevirtual

Destructor.

Definition at line 34 of file Cylindre.h.

Member Function Documentation

◆ computeMesh()

void Cylindre::computeMesh ( )
protected

Definition at line 129 of file Cylindre.cpp.

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

◆ form()

virtual int Cylindre::form ( )
inlinevirtual

Return type of the shape.

Reimplemented from Shape.

Definition at line 66 of file Cylindre.h.

◆ getAngleOuverture()

decimal Cylindre::getAngleOuverture ( )
inline

Get opening angle.

Definition at line 48 of file Cylindre.h.

◆ getFirstShape()

Shape* Cylindre::getFirstShape ( )
inline

Get the first shape.

Definition at line 54 of file Cylindre.h.

◆ getIntersection()

bool Cylindre::getIntersection ( Ray ray,
Intersection inter 
)
virtual

Get the Intersection between a ray and this shape.

Reimplemented from Shape.

Definition at line 106 of file Cylindre.cpp.

◆ getSecondShape()

Shape* Cylindre::getSecondShape ( )
inline

Get the second shape.

Definition at line 59 of file Cylindre.h.

◆ isVisible()

virtual bool Cylindre::isVisible ( )
inlinevirtual

A cylinder is not visible.

Reimplemented from Shape.

Definition at line 36 of file Cylindre.h.

◆ sample()

bool Cylindre::sample ( decimal  density,
std::vector< vec3 > &  samples 
)
virtual

Uncommented cause not used:

Reimplemented from Shape.

Definition at line 177 of file Cylindre.cpp.

Here is the call graph for this function:

◆ setAngleOuverture()

void Cylindre::setAngleOuverture ( decimal  angle)
inline

Definition at line 43 of file Cylindre.h.

Here is the caller graph for this function:

Member Data Documentation

◆ angleOuverture

decimal Cylindre::angleOuverture
protected

Opening angle.

Definition at line 95 of file Cylindre.h.

◆ epaisseur

decimal Cylindre::epaisseur
protected

Width.

Definition at line 93 of file Cylindre.h.

◆ hauteur

decimal Cylindre::hauteur
protected

Height.

Definition at line 94 of file Cylindre.h.

◆ localRepere

Repere Cylindre::localRepere
protected

Local frame.

Definition at line 97 of file Cylindre.h.

◆ mesh

vector<Shape*> Cylindre::mesh
protected

Cylinder mesh (array of triangles)

Definition at line 100 of file Cylindre.h.

◆ p1

Shape* Cylindre::p1
protected

First shape of the diffraction edge represented by the Cylinder.

Definition at line 90 of file Cylindre.h.

◆ p2

Shape* Cylindre::p2
protected

Second shape of the diffraction edge represented by the Cylinder.

Definition at line 91 of file Cylindre.h.

◆ points

vector<vec3> Cylindre::points
protected

Array of points defining the mesh.

Definition at line 99 of file Cylindre.h.


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