Skip to content

Commit 7eaf0f4

Browse files
authored
Update README.md
1 parent d430f82 commit 7eaf0f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# TriangleMeshDistance
2-
Header only, single file, simple and efficient C++11 library to compute the signed distance function to a triangle mesh.
2+
Header only*, single file, simple and efficient C++11 library to compute the signed distance function to a triangle mesh.
33

44
The distance computation to the triangle collection is accelerated with a sphere bounding volume hierarchy. The sign of the distance is resolved with the method presented in *"Generating Signed Distance Fields From Triangle Meshes"* by Bærentzen, Andreas & Aanæs, Henrik. (2002).
55

6+
\* Depends on Eigen
7+
68
## Example
79
```cpp
810
// Declare mesh vertices and triangles
@@ -24,9 +26,8 @@ std::cout << "Nearest entity: " << result.nearest_entity << std::endl;
2426
std::cout << "Nearest triangle index: " << result.triangle_id << std::endl;
2527
```
2628
27-
28-
2929
## What you need to know about TriangleMeshDistance
30+
- The input triangle mesh must be fully connected and watertight. Triangle soups and meshes with holes will return the correct distance but the sign will be undefined.
3031
- `TriangleMeshDistance` keeps a copy of the vertex and triangle data.
3132
- The pseudonormals required to compute signed distances are calculated and stored at building time.
3233
- `TriangleMeshDistance` can be declared empty and constructed multiple times with different meshes. If the new mesh needs less memory than the curent one, memory allocations will be avoided.

0 commit comments

Comments
 (0)