diff --git a/Code/src/Spline/Base.hpp b/Code/src/Spline/Base.hpp index 2263731..9e3d2b6 100644 --- a/Code/src/Spline/Base.hpp +++ b/Code/src/Spline/Base.hpp @@ -2,7 +2,7 @@ #define BASE_HPP #include -#include "Vector3.hpp" +#include "Vector.hpp" namespace pae { diff --git a/Code/src/Spline/Circle.hpp b/Code/src/Spline/Circle.hpp index a26341d..a21d2fe 100644 --- a/Code/src/Spline/Circle.hpp +++ b/Code/src/Spline/Circle.hpp @@ -3,7 +3,7 @@ #include #include -#include "Vector3.hpp" +#include "Vector.hpp" namespace pae { diff --git a/Code/src/Spline/Mesh.cpp b/Code/src/Spline/Mesh.cpp index c4b35cf..76e1569 100644 --- a/Code/src/Spline/Mesh.cpp +++ b/Code/src/Spline/Mesh.cpp @@ -28,12 +28,12 @@ Mesh& Mesh::operator+=(Mesh const& m) std::ostream& operator<<(std::ostream& out, Mesh const& mesh) { for (auto const& v : mesh.vertices) - out << "v " << v.x << " " << v.y << " " << v.z << "\n"; + out << "v " << v.x() << " " << v.y() << " " << v.z() << "\n"; out << "\n"; for (auto const& f : mesh.faces) - out << "f " << f.x << " " << f.y << " " << f.z << "\n"; + out << "f " << f.x() << " " << f.y() << " " << f.z() << "\n"; return out << std::endl; } @@ -41,9 +41,9 @@ std::ostream& operator<<(std::ostream& out, Mesh const& mesh) void Mesh::draw() const { glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vector3), &(glVertices[0].x)); + glVertexPointer(3, GL_FLOAT, sizeof(Vector3), &(glVertices[0].x())); glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vector3), &(glNormals[0].x)); + glNormalPointer(GL_FLOAT, sizeof(Vector3), &(glNormals[0].x())); glColor3f(0,0,1); glEnable(GL_LIGHT0); @@ -66,9 +66,9 @@ void Mesh::prepare(bool gouraudShading) // Generate the vertices for glDrawArrays(); for (auto const& f : faces) { - glVertices.push_back(Vector3{vertices[f.x].x, vertices[f.x].y, vertices[f.x].z}); - glVertices.push_back(Vector3{vertices[f.y].x, vertices[f.y].y, vertices[f.y].z}); - glVertices.push_back(Vector3{vertices[f.z].x, vertices[f.z].y, vertices[f.z].z}); + glVertices.push_back(Vector3{vertices[f.x()].x(), vertices[f.x()].y(), vertices[f.x()].z()}); + glVertices.push_back(Vector3{vertices[f.y()].x(), vertices[f.y()].y(), vertices[f.y()].z()}); + glVertices.push_back(Vector3{vertices[f.z()].x(), vertices[f.z()].y(), vertices[f.z()].z()}); // Compute the normal for the current face auto normal = crossProduct( @@ -93,7 +93,7 @@ void Mesh::prepareGouraudShading() std::vector> tmpNormals; for (unsigned int i = 0; i < vertices.size(); i++) { - tmpNormals.push_back(Vector3{0,0,0}); + tmpNormals.push_back(Vector3{0.0f,0.0f,0.0f}); } @@ -101,9 +101,9 @@ void Mesh::prepareGouraudShading() // of the faces in which this vertex appears for (unsigned int i = 0; i < faces.size(); i++) { - tmpNormals[faces[i].x] += normals[i]; - tmpNormals[faces[i].y] += normals[i]; - tmpNormals[faces[i].z] += normals[i]; + tmpNormals[faces[i].x()] += normals[i]; + tmpNormals[faces[i].y()] += normals[i]; + tmpNormals[faces[i].z()] += normals[i]; } // Normalize the normals on each vertex @@ -115,9 +115,9 @@ void Mesh::prepareGouraudShading() // Fill the glNormals wich the corresponding normal for (unsigned int i = 0; i < faces.size(); i++) { - glNormals.push_back(tmpNormals[faces[i].x]); - glNormals.push_back(tmpNormals[faces[i].y]); - glNormals.push_back(tmpNormals[faces[i].z]); + glNormals.push_back(tmpNormals[faces[i].x()]); + glNormals.push_back(tmpNormals[faces[i].y()]); + glNormals.push_back(tmpNormals[faces[i].z()]); } } diff --git a/Code/src/Spline/Mesh.hpp b/Code/src/Spline/Mesh.hpp index 94906e5..aa9814e 100644 --- a/Code/src/Spline/Mesh.hpp +++ b/Code/src/Spline/Mesh.hpp @@ -3,7 +3,7 @@ #include #include "Spline.hpp" -#include "Vector3.hpp" +#include "Vector.hpp" namespace pae { diff --git a/Code/src/Spline/Skeleton3D.hpp b/Code/src/Spline/Skeleton3D.hpp index 387bcb4..0e2333e 100644 --- a/Code/src/Spline/Skeleton3D.hpp +++ b/Code/src/Spline/Skeleton3D.hpp @@ -2,6 +2,7 @@ #define SKELETON3D_HPP #include +#include #include "Mesh.hpp" #include "Spline.hpp" @@ -18,6 +19,21 @@ namespace pae //////////////////////////////////////////////////////// using Junction = std::vector>; +namespace detail +{ + template + using Point = std::pair>; + + template + bool whichSide(std::array const& plane, Vector3 const& point); + + template + std::array closestPlane(std::vector,Point>> const& points); + + template + std::vector>> sortedPoints(std::array const& plane, std::vector> const& junction_circles, std::vector,Point>> const& closest_points); +} + template class Skeleton3D { @@ -50,6 +66,8 @@ class Skeleton3D void arcSubdivise(Vector3 pt1, Vector3 pt2, unsigned int profondeur, std::vector>& arc, Vector3 center, float radius); + std::pair,detail::Point> closestPointsCircles(Circle const& circle1, Circle const& circle2); + template friend std::ostream& operator<<(std::ostream& out, Skeleton3D const& s); diff --git a/Code/src/Spline/Skeleton3D.inl b/Code/src/Spline/Skeleton3D.inl index 771f1de..a783d2c 100644 --- a/Code/src/Spline/Skeleton3D.inl +++ b/Code/src/Spline/Skeleton3D.inl @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include "Skeleton3D.hpp" #include @@ -148,13 +150,49 @@ void Skeleton3D::meshJunction(Mesh mesh, std::vector,detail::Point>> closestPoints; + for (unsigned int i = 0; i& circle1 = junction_circles[i]; + Circle& circle2 = junction_circles[(i+1)%junction_circles.size()]; + closestPoints.push_back(closestPointsCircles(circle1,circle2)); } + // Find the medium plane that cut the circles in two + std::array plane = detail::closestPlane(closestPoints); + + // Compute list of points upside with the closestPointsCircles "correspondants" and outside + //TODO écrire un commentaire compréhensible ! + std::vector>> sorted_points = detail::sortedPoints(plane, junction_circles,closestPoints); + } +template +std::pair,detail::Point> Skeleton3D::closestPointsCircles(Circle const& circle1, Circle const& circle2) +{ + float bestDistance = (circle1.points[0].second - circle2.points[0].second).norm2(); + detail::Point const* bestPoint1 = nullptr; + detail::Point const* bestPoint2 = nullptr; + + + for(auto const& point1:circle1.points) + { + for(auto const& point2:circle2.points) + { + float twoDistance = (point1.second - point2.second).norm2(); + if( twoDistance < bestDistance) + { + bestDistance = twoDistance; + bestPoint1 = &point1; + bestPoint2 = &point2; + } + } + } + return std::make_pair(*bestPoint1,*bestPoint2); +} + + + template std::vector> Skeleton3D::findExtremities() { @@ -450,4 +488,99 @@ std::ostream& operator<<(std::ostream& out, Skeleton3D const& s) return out; } +namespace detail +{ + +template +bool whichSide(std::array const& plane, Vector3 const& point) +{ + return plane[0]*point.x() + plane[1]*point.y() + plane[2]*point.z() < - plane[3]; +} + +template +std::array closestPlane(std::vector,Point>> const& points) +{ + Eigen::MatrixXd m{points.size()*2,3}; + + for ( unsigned int i = 0; i < points.size()*2; i+=2) + { + m(i,0) = points[i].first.second.x(); + m(i,1) = points[i].first.second.y(); + m(i,2) = points[i].first.second.z(); + + m(i+1,0) = points[i].second.second.x(); + m(i+1,1) = points[i].second.second.y(); + m(i+1,2) = points[i].second.second.z(); + } + + Eigen::MatrixXd centered = m.rowwise() - m.colwise().mean(); + Eigen::MatrixXd cov = centered.adjoint() * centered; + + Eigen::SelfAdjointEigenSolver eig{cov}; + + Eigen::Vector3d v1 = eig.eigenvectors().col(1); + Eigen::Vector3d v2 = eig.eigenvectors().col(2); + + Eigen::Vector3d n = v1.cross(v2); + + return( std::array{n(0),n(1),n(2), n.dot(m.colwise().mean())} ); +} + +template +std::vector>> sortedPoints(std::array const& plane, std::vector> const& junction_circles, std::vector,Point>> const& closest_points) +{ + std::vector>> sorted_points; + for (unsigned int i = 0; i < junction_circles.size(); i++) + { + std::list> first_points; + std::list> second_points; + bool up_side = whichSide(plane, junction_circles[i].points[0].second); + bool current_points = up_side; + + for (unsigned int j = 0; j < junction_circles[i].points.size(); j++) + { + if (up_side == current_points) + { + if (whichSide(plane, junction_circles[i].points[j].second) == up_side) + { + first_points.push_back(junction_circles[i].points[j]); + } + else + { + current_points = whichSide(plane, junction_circles[i].points[j].second); + second_points.push_back(junction_circles[i].points[j]); + } + } + else + { + if (whichSide(plane, junction_circles[i].points[j].second) == current_points) + { + second_points.push_back(junction_circles[i].points[j]); + } + else + { + break; + } + } + + } + for (int j = static_cast(junction_circles[i].points.size()-1); j >= 0; j--) + { + if (whichSide(plane, junction_circles[i].points[j].second) == up_side) + { + first_points.push_front(junction_circles[i].points[j]); + } + else + { + break; + } + } + sorted_points.push_back(first_points); + sorted_points.push_back(second_points); + } + return sorted_points; +} + +} // namespace detail + } // namespace pae diff --git a/Code/src/Spline/Spline.inl b/Code/src/Spline/Spline.inl index bd406f3..c593237 100644 --- a/Code/src/Spline/Spline.inl +++ b/Code/src/Spline/Spline.inl @@ -2,7 +2,7 @@ #include #include #include -#include "Vector3.hpp" +#include "Vector.hpp" #include "Base.hpp" #include "Spline.hpp" @@ -21,7 +21,7 @@ std::vector> Spline::computeCircles(unsigned int nbCircl std::vector> circles; unsigned int offset = 0; - pae::Vector3 v{0,0,1}; + pae::Vector3 v{0.0f,0.0f,1.0f}; for (unsigned int i = 0; i < nbCircles; i++) { @@ -48,12 +48,12 @@ Circle Spline::computeCircle(float t, unsigned int const nbPoin C_prime_t /= C_prime_t.norm(); - auto a = C_prime_t.x; - auto b = C_prime_t.y; - auto c = C_prime_t.z; - auto d = r_t * r_prime_t - C_t.x * C_prime_t.x - C_t.y * C_prime_t.y - C_t.z * C_prime_t.z; + auto a = C_prime_t.x(); + auto b = C_prime_t.y(); + auto c = C_prime_t.z(); + auto d = r_t * r_prime_t - C_t.x() * C_prime_t.x() - C_t.y() * C_prime_t.y() - C_t.z() * C_prime_t.z(); - auto dist = std::abs(a * C_t.x + b * C_t.y + c * C_t.z + d)/std::sqrt(a*a+b*b+c*c); + auto dist = std::abs(a * C_t.x() + b * C_t.y() + c * C_t.z() + d)/std::sqrt(a*a+b*b+c*c); // std::cout << "dist : " << dist << std::endl; auto C_P_t = C_t + dist * C_prime_t; diff --git a/Code/src/Spline/Vector.hpp b/Code/src/Spline/Vector.hpp new file mode 100644 index 0000000..a574296 --- /dev/null +++ b/Code/src/Spline/Vector.hpp @@ -0,0 +1,77 @@ +#ifndef VECTOR_HPP +#define VECTOR_HPP + +#include +#include +#include + +namespace pae +{ + +template +class Vector +{ + public: + Vector(); + + template + Vector(Types... l); + + Vector(Vector const& v); + + T norm2() const; + T norm() const; + + Vector& operator=(T t); + Vector& operator=(Vector t); + + Vector operator-(); + + Vector& operator+=(Vector const& v); + Vector& operator-=(Vector const& v); + + Vector& operator*=(float f); + Vector& operator/=(float f); + + T& x() {static_assert(N > 0, "x() doesn't exist on Vector"); return data[0]; }; + T& y() {static_assert(N > 1, "y() doesn't exist on Vector"); return data[1]; }; + T& z() {static_assert(N > 2, "z() doesn't exist on Vector"); return data[2]; }; + T const& x() const {static_assert(N > 0, "x() doesn't exist on Vector"); return data[0]; }; + T const& y() const {static_assert(N > 1, "y() doesn't exist on Vector"); return data[1]; }; + T const& z() const {static_assert(N > 2, "z() doesn't exist on Vector"); return data[2]; }; + + std::array data; +}; + +template +bool operator==(Vector const& l, Vector const& r); + +template +bool operator!=(Vector const& l, Vector const& r); + +template +Vector operator+(Vector l, Vector const& r); + +template +Vector operator-(Vector l, Vector const& r); + +template +Vector operator*(Vector l, float f); + +template +Vector operator/(Vector l, float f); + +template +std::istream& operator>>(std::istream& stream, Vector& v); + +template +std::ostream& operator<<(std::ostream& stream, Vector const& v); + +template +using Vector3 = Vector; + +} // namespace pae + +#include "Vector.inl" + +#endif // VECTOR_HPP diff --git a/Code/src/Spline/Vector.inl b/Code/src/Spline/Vector.inl new file mode 100644 index 0000000..f3936e5 --- /dev/null +++ b/Code/src/Spline/Vector.inl @@ -0,0 +1,175 @@ +#include +#include +#include "Vector.hpp" + +namespace pae +{ + +template +Vector::Vector() : data{} +{ + +} + +template +template +Vector::Vector(Types... l) : data{{l...}} +{ + +} +template +Vector::Vector(Vector const& v) : data(v.data) +{ + +} + +template +T Vector::norm2() const +{ + return (*this) * (*this); +} + +template +T Vector::norm() const +{ + return std::sqrt(norm2()); +} + +template +Vector& Vector::operator=(T t) +{ + for (auto& d : data) + d = t; + + return *this; +} + +template +Vector& Vector::operator=(Vector t) +{ + this->data = std::move(t.data); + return *this; +} + +template +std::istream& operator>>(std::istream& stream, Vector& v) +{ + for (auto& d : v.data) + stream >> d; + + return stream; +} + +template +std::ostream& operator<<(std::ostream& stream, Vector const& v) +{ + stream << "[" << v.data[0]; + for (std::size_t i = 1; i < N; i++) + stream << ", " << v.data[i]; + + return stream << "]"; + +} + +template +bool operator==(Vector const& l, Vector const& r) +{ + bool ret = true; + for (std::size_t i = 0; i < N; i++) + ret = ret && (l.data[i] == r.data[i]); + + return ret; +} + +template +bool operator!=(Vector const& l, Vector const& r) +{ + return !(l == r); +} + +template +Vector Vector::operator-() +{ + Vector ret; + for (std::size_t i = 0; i < N; i++) + { + ret.data[i] = -data[i]; + } + return ret; +} + +template +Vector& Vector::operator+=(Vector const& v) +{ + for (std::size_t i = 0; i < N; i++) + data[i] += v.data[i]; + + return *this; +} + +template +Vector& Vector::operator-=(Vector const& v) +{ + for (std::size_t i = 0; i < N; i++) + data[i] -= v.data[i]; + + return *this; +} + +template +Vector& Vector::operator*=(float f) +{ + for (std::size_t i = 0; i < N; i++) + data[i] *= f; + + return *this; +} + +template +Vector& Vector::operator/=(float f) +{ + for (std::size_t i = 0; i < N; i++) + data[i] /= f; + + return *this; +} + +template +Vector operator+(Vector t, Vector const& r) { return t+=r; } + +template +Vector operator-(Vector t, Vector const& r) { return t-=r; } + +template +Vector operator*(Vector l, float r) { return l*=r; } + +template +Vector operator*(float r, Vector l) { return l*r; } + +template +Vector operator/(Vector l, float r) { return l/=r; } + +template +T operator*(Vector const& l, Vector const& r) +{ + T ret = 0; + + for (std::size_t i = 0; i < N; i++) + ret += (l.data[i] * r.data[i]); + + return ret; +} + +template +Vector crossProduct(Vector const& v1, Vector const& v2) +{ + return Vector{ + v1.y() * v2.z() - v1.z() * v2.y(), + v1.z() * v2.x() - v1.x() * v2.z(), + v1.x() * v2.y() - v1.y() * v2.x() + }; +} + +} // namespace pae + + diff --git a/Code/src/Spline/Vector3.hpp b/Code/src/Spline/Vector3.hpp deleted file mode 100644 index e9f8ab0..0000000 --- a/Code/src/Spline/Vector3.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef VECTOR3_HPP -#define VECTOR3_HPP - -#include -#include - -namespace pae -{ - -template -class Vector3 -{ - public: - Vector3(); - Vector3(T x, T y, T z); - Vector3(Vector3 const& v); - - T norm2() const; - T norm() const; - - Vector3& operator=(T t); - Vector3& operator=(Vector3 t); - - Vector3 operator-(); - - Vector3& operator+=(Vector3 const& v); - Vector3& operator-=(Vector3 const& v); - - Vector3& operator*=(float f); - Vector3& operator/=(float f); - - T x; - T y; - T z; -}; - -template -bool operator==(Vector3 const& l, Vector3 const& r); - -template -bool operator!=(Vector3 const& l, Vector3 const& r); - -template -Vector3 operator+(Vector3 l, Vector3 const& r); - -template -Vector3 operator-(Vector3 l, Vector3 const& r); - -template -Vector3 operator*(Vector3 l, float f); - -template -Vector3 operator/(Vector3 l, float f); - -template -std::istream& operator>>(std::istream& stream, Vector3& v); - -template -std::ostream& operator<<(std::ostream& stream, Vector3 const& v); - -} // namespace pae - -#include "Vector3.inl" - -#endif // VECTOR3_HPP diff --git a/Code/src/Spline/Vector3.inl b/Code/src/Spline/Vector3.inl deleted file mode 100644 index 3cafd59..0000000 --- a/Code/src/Spline/Vector3.inl +++ /dev/null @@ -1,124 +0,0 @@ -#include -#include -#include "Vector3.hpp" - -namespace pae -{ - -template -Vector3::Vector3() : Vector3{0,0,0} -{ - -} - -template -Vector3::Vector3(T x, T y, T z) : x{std::move(x)}, y{std::move(y)}, z{std::move(z)} -{ - -} - -template -Vector3::Vector3(Vector3 const& v) : Vector3{v.x,v.y,v.z} -{ - -} - -template -T Vector3::norm2() const -{ - return (*this) * (*this); -} - -template -T Vector3::norm() const -{ - return std::sqrt(norm2()); -} - -template -Vector3& Vector3::operator=(T t) -{ - x = t; - y = t; - z = t; - return *this; -} - -template -Vector3& Vector3::operator=(Vector3 t) -{ - this->x = std::move(t.x); - this->y = std::move(t.y); - this->z = std::move(t.z); - return *this; -} - -template -std::istream& operator>>(std::istream& stream, Vector3& v) -{ - return stream >> v.x >> v.y >> v.z; -} - -template -std::ostream& operator<<(std::ostream& stream, Vector3 const& v) -{ - return stream << "[" << v.x << ", " << v.y << ", " << v.z << "]"; -} - -template -bool operator==(Vector3 const& l, Vector3 const& r) -{ - return l.x == r.x && l.y == r.y && l.z == r.z; -} - -template -bool operator!=(Vector3 const& l, Vector3 const& r) -{ - return !(l == r); -} - -template -Vector3 Vector3::operator-() { return Vector3{-x,-y,-z}; } - -template -Vector3& Vector3::operator+=(Vector3 const& v) {x+=v.x; y+=v.y; z+=v.z; return *this;} - -template -Vector3& Vector3::operator-=(Vector3 const& v) {x-=v.x; y-=v.y; z-=v.z; return *this;} - -template -Vector3& Vector3::operator*=(float f) { x*=f; y*=f; z*=f; return *this;} - -template -Vector3& Vector3::operator/=(float f) { x/=f; y/=f; z/=f; return *this; } - -template -Vector3 operator+(Vector3 t, Vector3 const& r) { return t+=r; } - -template -Vector3 operator-(Vector3 t, Vector3 const& r) { return t-=r; } - -template -Vector3 operator*(Vector3 l, float r) { return l*=r; } - -template -Vector3 operator*(float r, Vector3 l) { return l*r; } - -template -Vector3 operator/(Vector3 l, float r) { return l/=r; } - -template -T operator*(Vector3 const& l, Vector3 const& r) { return l.x*r.x + l.y*r.y + l.z*r.z;} - -template -Vector3 crossProduct(Vector3 const& v1, Vector3 const& v2) -{ - return Vector3{v1.y * v2.z - v1.z * v2.y, - v1.z * v2.x - v1.x * v2.z, - v1.x * v2.y - v1.y * v2.x - }; -} - -} // namespace pae - - diff --git a/Code/src/Spline/main.cpp b/Code/src/Spline/main.cpp index a65ee7f..1845d76 100644 --- a/Code/src/Spline/main.cpp +++ b/Code/src/Spline/main.cpp @@ -1,48 +1,41 @@ #include #include -#include "Vector3.hpp" +#include "Vector.hpp" #include "Skeleton3D.hpp" #include "Spline.hpp" #include "Mesh.hpp" int main(int argc, char *argv[]) { - pae::Skeleton3D, float> skeleton; - skeleton.loadFromFile("dino.skl"); + using namespace pae; + using namespace pae::detail; - auto circles = skeleton.splines[0].computeCircles(12u,16u); + Circle c; + c.points.push_back(std::make_pair(7,pae::Vector3{0.0f,2.0f,-1.0f})); + c.points.push_back(std::make_pair(8,pae::Vector3{0.0f,1.0f,-1.0f})); + c.points.push_back(std::make_pair(9,pae::Vector3{0.0f,0.0f,-1.0f})); -// for (auto const& circle : circles) -// { -// std::cout << circle.center << std::endl; -// } + c.points.push_back(std::make_pair(0,pae::Vector3{0.0f,0.0f, 1.0f})); + c.points.push_back(std::make_pair(1,pae::Vector3{0.0f,1.0f, 1.0f})); + c.points.push_back(std::make_pair(2,pae::Vector3{0.0f,2.0f, 1.0f})); + c.points.push_back(std::make_pair(3,pae::Vector3{0.0f,3.0f, 1.0f})); + c.points.push_back(std::make_pair(4,pae::Vector3{0.0f,4.0f, 1.0f})); + c.points.push_back(std::make_pair(5,pae::Vector3{0.0f,4.0f,-1.0f})); + c.points.push_back(std::make_pair(6,pae::Vector3{0.0f,3.0f,-1.0f})); - // std::cout << skeleton << std::endl; + auto v = sortedPoints(std::array{0,0,1,0}, + std::vector>{c}, + std::vector, Point>>{}); - // auto const& splines = skeleton.splines; + for (auto& element : v) + { + for (auto& e : element) + { + std::cout << e.first << " " << e.second << std::endl; + } + std::cout << std::endl; + } - // auto spline = splines[7]; - - // unsigned int nbCircles = 10; - // unsigned int const nbPoints = 8; - - // //std::vector> circles = spline.computeCircles(nbCircles, nbPoints); - // auto circles = spline.computeCircles(nbCircles, nbPoints); - - pae::Mesh mesh; - mesh = pae::splineMeshing(circles); - - // std::cout << mesh << std::endl; - - // std::cout << "Il y a : " << mesh.vertices.size() << " vertices." << std::endl; - // std::cout << "Il y a : " << mesh.faces.size() << " faces." << std::endl; - // std:: cout << std::endl; - - // for (unsigned int i = 0; i < mesh.faces.size(); i++) - // { - // std::cout << "La face " << i+1 << " est composée des faces " << mesh.faces[i] << std::endl; - // } - -// return 0; + return 0; }