SFCGAL  2.3.0
Public Types | Public Member Functions | List of all members
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. More...
 
using edge_descriptor = graph::GeometryGraph::edge_descriptor
 Edge descriptor type for geometry graph. More...
 
using directed_edge_descriptor = graph::GeometryGraph::directed_edge_descriptor
 Directed edge descriptor type for geometry graph. More...
 

Public Member Functions

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

Detailed Description

Make orientation consistent in a triangle set.

Member Typedef Documentation

Directed edge descriptor type for geometry graph.

Edge descriptor type for geometry graph.

Vertex descriptor type for geometry graph.

Constructor & Destructor Documentation

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

default constructor

Member Function Documentation

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

Add a Triangle to the builder.

Parameters
triangleThe triangle to add
void SFCGAL::algorithm::ConsistentOrientationBuilder::addTriangulatedSurface ( const TriangulatedSurface &  triangulatedSurface)

Add a TriangulatedSurface to the builder.

Parameters
triangulatedSurfaceThe triangulated surface to add
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
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
size_t SFCGAL::algorithm::ConsistentOrientationBuilder::numTriangles ( ) const
inline

Returns the number of triangles.

Returns
The number of triangles in the builder
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