separate triangulation into cgal project
This commit is contained in:
parent
325a391988
commit
77209abbcd
6 changed files with 226 additions and 187 deletions
|
@ -146,28 +146,6 @@ public:
|
|||
/// <returns>Projected shape into space</returns>
|
||||
static indexed_triangle_set polygons2model(const Polygons &shape2d, const IProject& projection);
|
||||
|
||||
// define oriented connection of 2 vertices(defined by its index)
|
||||
using HalfEdge = std::pair<uint32_t, uint32_t>;
|
||||
using HalfEdges = std::set<HalfEdge>;
|
||||
using Indices = std::vector<Vec3i>;
|
||||
/// <summary>
|
||||
/// Connect points by triangulation to create filled surface by triangle indices
|
||||
/// </summary>
|
||||
/// <param name="points">Points to connect</param>
|
||||
/// <param name="edges">Constraint for edges, pair is from point(first) to point(second)</param>
|
||||
/// <returns>Triangles</returns>
|
||||
static Indices triangulate(const Points &points, const HalfEdges &half_edges);
|
||||
static Indices triangulate(const Polygon &polygon);
|
||||
static Indices triangulate(const Polygons &polygons);
|
||||
|
||||
/// <summary>
|
||||
/// Filter out triagles without both side edge or inside half edges
|
||||
/// Main purpose: Filter out triangles which lay outside of ExPolygon given to triangulation
|
||||
/// </summary>
|
||||
/// <param name="indices">Triangles</param>
|
||||
/// <param name="half_edges">Only outer edges</param>
|
||||
static void remove_outer(Indices &indices, const HalfEdges &half_edges);
|
||||
|
||||
class ProjectZ : public IProject
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue