Cortex
10.0.0-a4
|
#include <Triangulator.h>
Public Types | |
typedef PointIterator | Iterator |
typedef std::iterator_traits< PointIterator >::value_type | Point |
typedef VectorTraits< Point >::BaseType | BaseType |
typedef MeshBuilder | MeshBuilderType |
typedef std::pair< PointIterator, PointIterator > | Loop |
![]() | |
typedef size_t | RefCount |
Public Member Functions | |
IE_CORE_DECLAREMEMBERPTR (Triangulator) | |
Triangulator (typename MeshBuilder::Ptr builder) | |
void | triangulate (PointIterator first, PointIterator last) |
template<typename LoopIterator > | |
void | triangulate (LoopIterator first, LoopIterator last) |
![]() | |
IE_CORE_DECLAREMEMBERPTR (RefCounted) | |
void | addRef () const |
Add a reference to the current object. | |
void | removeRef () const |
Remove a reference from the current object. | |
RefCount | refCount () const |
Returns the current reference count. | |
The Triangulator template class performs triangulation of simple planar polygons. It uses a MeshBuilder class to build the triangulated mesh.
typedef std::pair<PointIterator, PointIterator> IECore::Triangulator< PointIterator, MeshBuilder >::Loop |
A loop is defined by an iterator range from it's first to last point.
void IECore::Triangulator< PointIterator, MeshBuilder >::triangulate | ( | PointIterator | first, |
PointIterator | last | ||
) |
Triangulates the polygon specified by the points in the specified iterator range. Points must be planar and have an anticlockwise winding order.
void IECore::Triangulator< PointIterator, MeshBuilder >::triangulate | ( | LoopIterator | first, |
LoopIterator | last | ||
) |
Triangulate the polygon with holes specified by the loops in the specified iterator range. The first loop defines the outer edges of the polygon, and must have an anticlockwise winding order. Additional loops define holes in the polygon and must have a clockwise winding order. The inner loops should not intersect each other or the outer loop.