SFCGAL 2.3.0
SFCGAL::algorithm::ConsistentOrientationBuilder Class Reference

Make orientation consistent in a triangle set. More...

#include <ConsistentOrientationBuilder.h>

Public Types

using vertex_descriptor = graph::GeometryGraph::vertex_descriptor
 Vertex descriptor type for geometry graph.
using edge_descriptor = graph::GeometryGraph::edge_descriptor
 Edge descriptor type for geometry graph.
using directed_edge_descriptor
 Directed edge descriptor type for geometry graph.

Public Member Functions

 ConsistentOrientationBuilder ()
 default constructor
void addTriangle (const Triangle &triangle)
 Add a Triangle to the builder.
void addTriangulatedSurface (const TriangulatedSurface &triangulatedSurface)
 Add a TriangulatedSurface to the builder.
TriangulatedSurface buildTriangulatedSurface ()
 Get the resulting TriangulatedSurface where each connected part has consistent orientation.
size_t numTriangles () const
 Returns the number of triangles.
Triangle triangleN (const size_t &n) const
 Returns the n-th triangle.
const std::set< size_t > & neighbors (const size_t &n) const
 Get the neighbors of the n-th triangle (advanced usage).

Detailed Description

Make orientation consistent in a triangle set.

Member Typedef Documentation

◆ directed_edge_descriptor

Initial value:
std::pair< edge_descriptor, EdgeDirection > directed_edge_descriptor
Definition GeometryGraph.h:78

Directed edge descriptor type for geometry graph.

◆ edge_descriptor

◆ vertex_descriptor

Constructor & Destructor Documentation

◆ ConsistentOrientationBuilder()

SFCGAL::algorithm::ConsistentOrientationBuilder::ConsistentOrientationBuilder ( )

default constructor

Member Function Documentation

◆ addTriangle()

void SFCGAL::algorithm::ConsistentOrientationBuilder::addTriangle ( const Triangle & triangle)

Add a Triangle to the builder.

Parameters
triangleThe triangle to add

◆ addTriangulatedSurface()

void SFCGAL::algorithm::ConsistentOrientationBuilder::addTriangulatedSurface ( const TriangulatedSurface & triangulatedSurface)

Add a TriangulatedSurface to the builder.

Parameters
triangulatedSurfaceThe triangulated surface to add

◆ buildTriangulatedSurface()

auto SFCGAL::algorithm::ConsistentOrientationBuilder::buildTriangulatedSurface ( )

Get the resulting TriangulatedSurface where each connected part has consistent orientation.

Returns
TriangulatedSurface with consistent orientation
Exceptions
SFCGAL::Exceptionif such a TriangulatedSurface can't be built

◆ neighbors()

const std::set< size_t > & SFCGAL::algorithm::ConsistentOrientationBuilder::neighbors ( const size_t & n) const

Get the neighbors of the n-th triangle (advanced usage).

Parameters
nIndex of the triangle
Returns
Set of indices of neighboring triangles
Note
Use after buildTriangulatedSurface

◆ numTriangles()

size_t SFCGAL::algorithm::ConsistentOrientationBuilder::numTriangles ( ) const
inline

Returns the number of triangles.

Returns
The number of triangles in the builder

◆ triangleN()

auto SFCGAL::algorithm::ConsistentOrientationBuilder::triangleN ( const size_t & n) const

Returns the n-th triangle.

Parameters
nIndex of the triangle to retrieve
Returns
The triangle at index n