29 unsigned int nbRay = shot.
nbRay;
35 for (
unsigned int i = 0; i < nbRay; ++i)
37 for (
unsigned int j = 0; j < shot.
MatRes[0][i].etapes.size(); ++j)
41 pos.
z = -(pos.
z-pos_center.z);
49 QList<OTriangle> Liste_triangles = oDelaunayMaker.
getFaces();
50 QList<OPoint3D> Liste_vertex = oDelaunayMaker.
getVertex();
52 append_triangles_to_scene(Liste_vertex, Liste_triangles);
57 double h = compute_h(P);
64 double h = compute_h(P);
71 double offset = 2000.;
72 vec3 origine(P.
x, P.
y, (P.
z + offset) );
73 Ray ray1( origine,
vec3(0., 0., -1.) );
75 std::list<Intersection> LI;
76 return (P.
z + offset) -
static_cast<double>( _scene->getAccelerator()->traverse( &ray1, LI ) );
82 for (
int i = 0; i<Liste_triangles.size(); i++)
86 pos =
OPoint3Dtovec3( Liste_vertex.at( Liste_triangles.at(i)._p1 ) );
87 _scene->addVertex(pos, a);
89 pos =
OPoint3Dtovec3( Liste_vertex.at( Liste_triangles.at(i)._p2 ) );
90 _scene->addVertex(pos, b);
92 pos =
OPoint3Dtovec3( Liste_vertex.at( Liste_triangles.at(i)._p3 ) );
93 _scene->addVertex(pos, c);
95 (
Triangle*)_scene->addTriangle(a, b, c,
nullptr);
virtual vec3 fonction_h(const vec3 &P)
Pure virtual function for a point transformation.
Describes analytical ray curve tracing.
unsigned int nbRay
Launched rays number.
base_vec3< decimal > vec3
QList< OTriangle > getFaces(void)
Return faces list.
vector< RayCourb * > MatRes
Array containing the resulting rays for each source.
3D vector Vector defined with 3 float numbers
QList< OPoint3D > getVertex(void)
Return the vertexes list.
void addVertex(OPoint3D vertex)
Add a vertex.
vector< vec3 > sources
Sources vector.
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
vec3 OPoint3Dtovec3(const OPoint3D &_p)
Converts a OPoint3D to vec3.
virtual void buildNappe(const Lancer &shot)
Pure virtual function to create the triangles mesh built with rays.
OPoint3D vec3toOPoint3D(const vec3 &_v)
Converts a vec3 to OPoint3D.
void append_triangles_to_scene(QList< OPoint3D > &Liste_vertex, QList< OTriangle > &Liste_triangles)
bool compute(void)
Compute the triangulation.
virtual vec3 fonction_h_inverse(const vec3 &P)
Pure virtual function for an inverse point transformation.
double compute_h(const vec3 &P)