TDME2  1.9.200
Triangle.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
5 #include <tdme/tdme.h>
7 #include <tdme/math/Vector3.h>
8 
9 using std::vector;
10 
12 
13 /**
14  * Triangle entity, this is not directly connectable with physics engine
15  * @author Andreas Drewke
16  */
18 {
19 public:
20  /**
21  * Public constructor
22  */
23  Triangle();
24 
25  /**
26  * Public constructor
27  * @param vertex0 vertex 0
28  * @param vertex1 vertex 1
29  * @param vertex2 vertex 2
30  */
31  Triangle(const Vector3& vertex0, const Vector3& vertex1, const Vector3& vertex2);
32 
33  /**
34  * @return triangle vertices
35  */
36  inline const
37  vector<Vector3>& getVertices() const {
38  return vertices;
39  }
40 
41  /**
42  * Compute closest point on bounding volume
43  * @param point point
44  * @param closestPoint closest point
45  */
46  void computeClosestPointOnBoundingVolume(const Vector3& point, Vector3& closestPoint) const;
47 
48 private:
49  vector<Vector3> vertices;
50 };
Triangle entity, this is not directly connectable with physics engine.
Definition: Triangle.h:18
Triangle()
Public constructor.
Definition: Triangle.cpp:12
const vector< Vector3 > & getVertices() const
Definition: Triangle.h:37
void computeClosestPointOnBoundingVolume(const Vector3 &point, Vector3 &closestPoint) const
Compute closest point on bounding volume.
Definition: Triangle.cpp:25
vector< Vector3 > vertices
Definition: Triangle.h:49
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Definition: Vector3.h:20