30
30
31
31
namespace tmd
32
32
{
33
- /* ========================================== DEFINITIONS ========================================== */
33
+ /* ========================================== DECLARATIONS ========================================== */
34
34
// Small vector 3D class class
35
35
template <typename FLOAT>
36
36
class Vec3r
@@ -66,7 +66,7 @@ namespace tmd
66
66
using Vec3d = Vec3r<double >;
67
67
// -----------------------------------
68
68
69
- // Point-Triangle distance definitions
69
+ // Point-Triangle distance declarations
70
70
enum class NearestEntity { V0, V1, V2, E01 , E12 , E02 , F };
71
71
static double point_triangle_sq_unsigned (NearestEntity& nearest_entity, Vec3d& nearest_point, const Vec3d& point, const Vec3d& v0, const Vec3d& v1, const Vec3d& v2);
72
72
// -----------------------------------
@@ -88,7 +88,7 @@ namespace tmd
88
88
class TriangleMeshDistance
89
89
{
90
90
private:
91
- /* Definitions */
91
+ /* Private declarations */
92
92
struct BoundingSphere
93
93
{
94
94
Vec3d center;
@@ -110,7 +110,7 @@ namespace tmd
110
110
};
111
111
112
112
113
- /* Fields */
113
+ /* Private fields */
114
114
std::vector<Vec3d> vertices;
115
115
std::vector<std::array<int , 3 >> triangles;
116
116
std::vector<Node> nodes;
@@ -120,14 +120,14 @@ namespace tmd
120
120
BoundingSphere root_bv;
121
121
bool is_constructed = false ;
122
122
123
- /* Methods */
123
+ /* Private methods */
124
124
void _construct ();
125
125
void _build_tree (const int node_id, BoundingSphere& bounding_sphere, std::vector<Triangle> &triangles, const int begin, const int end);
126
126
void _query (Result &result, const Node &node, const Vec3d& point) const ;
127
127
128
128
public:
129
129
130
- /* Methods */
130
+ /* Public methods */
131
131
TriangleMeshDistance () = default ;
132
132
133
133
/* *
@@ -197,7 +197,7 @@ namespace tmd
197
197
198
198
199
199
200
- /* ========================================== DECLARATIONS ========================================== */
200
+ /* ========================================== DEFINITIONS ========================================== */
201
201
template <typename FLOAT, typename INT, typename SIZE_T>
202
202
inline tmd::TriangleMeshDistance::TriangleMeshDistance (const FLOAT* vertices, const SIZE_T n_vertices, const INT* triangles, const SIZE_T n_triangles)
203
203
{
0 commit comments