2929#include < reactphysics3d/collision/PolygonVertexArray.h>
3030#include < reactphysics3d/utils/DefaultLogger.h>
3131#include < reactphysics3d/engine/PhysicsCommon.h>
32- #include < reactphysics3d/utils/Error .h>
32+ #include < reactphysics3d/utils/Message .h>
3333#include < cstdlib>
3434
3535using namespace reactphysics3d ;
@@ -54,7 +54,7 @@ ConvexMesh* ConvexMesh::create(MemoryAllocator& allocator) {
5454}
5555
5656// Initialize a mesh and returns errors if any
57- bool ConvexMesh::init (const PolygonVertexArray& polygonVertexArray, std::vector<Error >& errors) {
57+ bool ConvexMesh::init (const PolygonVertexArray& polygonVertexArray, std::vector<Message >& errors) {
5858
5959 bool isValid = true ;
6060
@@ -80,7 +80,7 @@ bool ConvexMesh::init(const PolygonVertexArray& polygonVertexArray, std::vector<
8080}
8181
8282// Copy the vertices into the mesh
83- bool ConvexMesh::copyVertices (const PolygonVertexArray& polygonVertexArray, std::vector<Error >& errors) {
83+ bool ConvexMesh::copyVertices (const PolygonVertexArray& polygonVertexArray, std::vector<Message >& errors) {
8484
8585 bool isValid = true ;
8686
@@ -110,7 +110,7 @@ bool ConvexMesh::copyVertices(const PolygonVertexArray& polygonVertexArray, std:
110110 }
111111 else {
112112
113- errors.push_back (Error (" The mesh does not have any vertices" ));
113+ errors.push_back (Message (" The mesh does not have any vertices" ));
114114
115115 isValid = false ;
116116 }
@@ -120,7 +120,7 @@ bool ConvexMesh::copyVertices(const PolygonVertexArray& polygonVertexArray, std:
120120
121121// Create the half-edge structure of the mesh
122122// / This method returns true if the mesh is valid or false otherwise
123- bool ConvexMesh::createHalfEdgeStructure (const PolygonVertexArray& polygonVertexArray, std::vector<Error >& errors) {
123+ bool ConvexMesh::createHalfEdgeStructure (const PolygonVertexArray& polygonVertexArray, std::vector<Message >& errors) {
124124
125125 bool isValid = true ;
126126
@@ -152,7 +152,7 @@ bool ConvexMesh::createHalfEdgeStructure(const PolygonVertexArray& polygonVertex
152152 if (faceVertices.size () < 3 ) {
153153
154154 // Create a new error
155- errors.push_back (Error (std::string (" The face with index " + std::to_string (f) + " has less than three vertices" )));
155+ errors.push_back (Message (std::string (" The face with index " + std::to_string (f) + " has less than three vertices" )));
156156
157157 isValid = false ;
158158
@@ -173,7 +173,7 @@ bool ConvexMesh::createHalfEdgeStructure(const PolygonVertexArray& polygonVertex
173173 " Error when creating a ConvexMesh: input PolygonVertexArray is not valid. Mesh with duplicated vertices is not supported." , __FILE__, __LINE__);
174174
175175 // Create a new error
176- errors.push_back (Error (std::string (" Convex Mesh might have duplicated vertices (invalid Euler formula)" )));
176+ errors.push_back (Message (std::string (" Convex Mesh might have duplicated vertices (invalid Euler formula)" )));
177177
178178 isValid = false ;
179179 }
@@ -188,7 +188,7 @@ bool ConvexMesh::createHalfEdgeStructure(const PolygonVertexArray& polygonVertex
188188}
189189
190190// Compute the faces normals
191- bool ConvexMesh::computeFacesNormals (std::vector<Error >& errors) {
191+ bool ConvexMesh::computeFacesNormals (std::vector<Message >& errors) {
192192
193193 bool isValid = true ;
194194
@@ -211,7 +211,7 @@ bool ConvexMesh::computeFacesNormals(std::vector<Error>& errors) {
211211 }
212212 else {
213213 isValid = false ;
214- errors.push_back (Error (" Face with index " + std::to_string (f) + " has a zero area" ));
214+ errors.push_back (Message (" Face with index " + std::to_string (f) + " has a zero area" ));
215215 }
216216 }
217217 }
0 commit comments