4
* Created on: Apr 9, 2014
12
#include <opencv2/core/core.hpp>
15
// --------------------------------------------------- //
17
// --------------------------------------------------- //
22
explicit Triangle(int id, cv::Point3f V0, cv::Point3f V1, cv::Point3f V2);
25
cv::Point3f getV0() const { return v0_; }
26
cv::Point3f getV1() const { return v1_; }
27
cv::Point3f getV2() const { return v2_; }
30
/** The identifier number of the triangle */
32
/** The three vertices that defines the triangle */
33
cv::Point3f v0_, v1_, v2_;
37
// --------------------------------------------------- //
39
// --------------------------------------------------- //
44
explicit Ray(cv::Point3f P0, cv::Point3f P1);
47
cv::Point3f getP0() { return p0_; }
48
cv::Point3f getP1() { return p1_; }
51
/** The two points that defines the ray */
56
// --------------------------------------------------- //
57
// OBJECT MESH CLASS //
58
// --------------------------------------------------- //
67
std::vector<std::vector<int> > getTrianglesList() const { return list_triangles_; }
68
cv::Point3f getVertex(int pos) const { return list_vertex_[pos]; }
69
int getNumVertices() const { return num_vertexs_; }
71
void load(const std::string path_file);
74
/** The identification number of the mesh */
76
/** The current number of vertices in the mesh */
78
/** The current number of triangles in the mesh */
80
/* The list of triangles of the mesh */
81
std::vector<cv::Point3f> list_vertex_;
82
/* The list of triangles of the mesh */
83
std::vector<std::vector<int> > list_triangles_;
86
#endif /* OBJECTMESH_H_ */