#include <vtriangle.hpp>
Public Member Functions | |
| VTriangleSurface (double vertex_matching_eps=1.0e-9) | |
| Constructor for vertex triangle surface. More... | |
| ~VTriangleSurface () | |
| Destructor. More... | |
| void | set_vertex_matching_eps (double vertex_matching_eps) |
| Set vertex matching tolerance. More... | |
| uint32_t | vertexc (void) const |
| Return vertex count. More... | |
| const Vec3D & | vertex (uint32_t i) const |
| Return vertex i coordinates. More... | |
| uint32_t | trianglec (void) const |
| Return triangle count. More... | |
| const VTriangle & | triangle (uint32_t i) const |
| Return triangle i. More... | |
| uint32_t | add_vertex_no_check (const Vec3D &x) |
| Add a vertex x without checking. More... | |
| uint32_t | add_vertex (const Vec3D &x) |
| Add a vertex x with duplicate vertex elimination. More... | |
| uint32_t | add_triangle (const Vec3D &x1, const Vec3D &x2, const Vec3D &x3) |
| Add a triangle consiting of vertices x1, x2 and x3 with duplicate vertex elimination. More... | |
| uint32_t | add_triangle (const Vec3D x[3]) |
| Add a triangle consiting of vertices x with duplicate vertex elimination. More... | |
| uint32_t | add_triangle (uint32_t v1, uint32_t v2, uint32_t v3) |
| Add a triangle consiting of already defined vertices v1, v2 and v3. More... | |
| uint32_t | add_triangle (const uint32_t v[3]) |
| Add a triangle consiting of already defined vertices v. More... | |
| void | clear (void) |
| Clear surface. More... | |
| void | debug_print (std::ostream &os) const |
| Debug print. More... | |
Protected Attributes | |
| std::vector< Vec3D > | _vertex |
| List of vertices for surface triangles. More... | |
| std::vector< VTriangle > | _triangle |
| List of surface triangles. More... | |
Detailed Description
VTriangle surface.
Surface mesh constructed of vertex triangles and vertices.
VTriangleSurface can be constructed triangle-by-triangle with internal elimination of duplicated vertices. Construction of of surface with external (more intelligent) vertex handling is also possible.
Constructor & Destructor Documentation
| VTriangleSurface::VTriangleSurface | ( | double | vertex_matching_eps = 1.0e-9 | ) |
Constructor for vertex triangle surface.
The vertex matching tolerance can be set with vertex_matching_eps (defaults to 1.0e-9).
| VTriangleSurface::~VTriangleSurface | ( | ) |
Destructor.
Member Function Documentation
Add a triangle consiting of vertices x1, x2 and x3 with duplicate vertex elimination.
The vertices are assumed to be defined with right-hand ordering for defining outside direction. Each vertex of the triangle is checked against all vertices in the surface for duplicate entries. A vertex pairs closer than vertex_matching_eps are considered to be equal.
Returns the index of the new triangle.
| uint32_t VTriangleSurface::add_triangle | ( | const Vec3D | x[3] | ) |
Add a triangle consiting of vertices x with duplicate vertex elimination.
Convenience function.
|
inline |
Add a triangle consiting of already defined vertices v1, v2 and v3.
|
inline |
Add a triangle consiting of already defined vertices v.
Convenience function.
| uint32_t VTriangleSurface::add_vertex | ( | const Vec3D & | x | ) |
Add a vertex x with duplicate vertex elimination.
Returns the index of the (new or old) vertex.
|
inline |
Add a vertex x without checking.
Returns the index of the new vertex.
| void VTriangleSurface::clear | ( | void | ) |
Clear surface.
| void VTriangleSurface::debug_print | ( | std::ostream & | os | ) | const |
Debug print.
| void VTriangleSurface::set_vertex_matching_eps | ( | double | vertex_matching_eps | ) |
Set vertex matching tolerance.
Defaults to 1.0e-9.
|
inline |
Return triangle i.
|
inline |
Return triangle count.
|
inline |
Return vertex i coordinates.
|
inline |
Return vertex count.
Member Data Documentation
|
protected |
List of surface triangles.
|
protected |
List of vertices for surface triangles.
The documentation for this class was generated from the following files:
- vtriangle.hpp
- vtriangle.cpp