template class geode::TriangulatedSurfaceEpsilonModifier

Overview

#include <triangulated_surface_epsilon_modifier.h>

template <index_t dimension>
class TriangulatedSurfaceEpsilonModifier: public geode::TriangulatedSurfaceModifier
{
public:
    // construction

    TriangulatedSurfaceEpsilonModifier(
        const SurfaceMesh<dimension>& surface,
        TriangulatedSurfaceBuilder<dimension>& builder
        );

    // methods

    std::tuple<Position, SplitTriangleInfo> insert_point_in_triangle(
        index_t triangle_id,
        const Point<dimension>& point
        );

    std::tuple<Position, SplitPolygonEdgeInfo> insert_point_on_edge(
        const PolygonEdge& edge,
        const Point<dimension>& point
        );
};

Inherited Members

public:
    // methods

    index_t updated_vertex(index_t vertex_id) const;
    bool is_triangle_active(index_t triangle_id) const;
    bool is_edge_active(index_t edge_id) const;
    bool is_edge_active(const PolygonEdge& edge) const;

    SplitTriangleInfo split_triangle(
        index_t triangle_id,
        const Point<dimension>& point
        );

    SplitPolygonEdgeInfo split_edge(
        const PolygonEdge& edge,
        const Point<dimension>& point
        );

    CollapsePolygonEdgeInfo collapse_edge(
        const PolygonEdge& edge,
        const Point<dimension>& point
        );

    CollapseEdgeInfo collapse_edge(index_t edge_id, const Point<dimension>& point);
    void swap_edge(const PolygonEdge& edge);
    std::vector<index_t> clean_triangles();
    std::vector<index_t> clean_vertices();
    std::vector<index_t> clean_edges();
    std::tuple<std::vector<index_t>, std::vector<index_t>, std::vector<index_t>> clean();

    static bool is_collapse_edge_valid(
        const TriangulatedSurface<dimension>& surface,
        const PolygonEdge& edge,
        const Point<dimension>& point
        );

    static bool is_collapse_edge_valid(
        const TriangulatedSurface<dimension>& surface,
        index_t edge_id,
        const Point<dimension>& point
        );

Detailed Documentation

Methods

std::tuple<Position, SplitTriangleInfo> insert_point_in_triangle(
    index_t triangle_id,
    const Point<dimension>& point
    )

Insert a point in a triangle either by spliting the triangle into three new ones, or by snapping the point on an edge (two new triangles) or a vertex (no new triangles).

Parameters:

triangle_id

Index of the triangle to split.

point

Coordinates of the split point. @warn Split triangle is set as inactive but not deleted.

Returns:

in the following order: the position of the split vertex, the information regarding the modifications.

std::tuple<Position, SplitPolygonEdgeInfo> insert_point_on_edge(
    const PolygonEdge& edge,
    const Point<dimension>& point
    )

Insert a point on an edge either by spliting the edge into two new ones, or by snapping the point on a vertex (no new edges).

Parameters:

edge

Index of the PolygonEdge to split.

point

Coordinates of the split point. @warn Potential split triangles are set as inactive but not deleted.

Returns:

in the following order: the position of the split vertex, the information regarding the modifications.