30 Cylindre(
Shape* _p1 = NULL,
Shape* _p2 = NULL, std::vector<vec3>* _vertices = NULL,
unsigned int v1 = 0,
31 unsigned int v2 = 1,
decimal _epaisseur = 0.2);
65 virtual bool sample(
decimal density, std::vector<vec3>& samples);
vector< vec3 > points
Array of points defining the mesh.
virtual ~Cylindre()
Destructor.
vector< Shape * > mesh
Cylinder mesh (array of triangles)
virtual int form()
Return type of the shape.
virtual bool sample(decimal density, std::vector< vec3 > &samples)
Uncommented cause not used:
decimal getAngleOuverture()
Get opening angle.
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.
Shape * getSecondShape()
Get the second shape.
decimal angleOuverture
Opening angle.
virtual bool isVisible()
A cylinder is not visible.
Shape * p1
First shape of the diffraction edge represented by the Cylinder.
virtual bool getIntersection(Ray &ray, Intersection &inter)
Get the Intersection between a ray and this shape.
Shape * getFirstShape()
Get the first shape.
Shape * p2
Second shape of the diffraction edge represented by the Cylinder.
void setAngleOuverture(decimal angle)
Repere localRepere
Local frame.
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
base class for shapes (Cylindre, Mesh, Sphere, Triangle,...)