Cortex  10.0.0-a4
Public Types | Public Member Functions | List of all members
IECore::Triangulator< PointIterator, MeshBuilder > Class Template Reference

#include <Triangulator.h>

+ Inheritance diagram for IECore::Triangulator< PointIterator, MeshBuilder >:

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
 
- Public Types inherited from IECore::RefCounted
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)
 
- Public Member Functions inherited from IECore::RefCounted
 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.
 

Detailed Description

template<typename PointIterator, typename MeshBuilder = MeshPrimitiveBuilder>
class IECore::Triangulator< PointIterator, MeshBuilder >

The Triangulator template class performs triangulation of simple planar polygons. It uses a MeshBuilder class to build the triangulated mesh.

Member Typedef Documentation

template<typename PointIterator , typename MeshBuilder = MeshPrimitiveBuilder>
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.

Member Function Documentation

template<typename PointIterator , typename MeshBuilder = MeshPrimitiveBuilder>
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.

template<typename PointIterator , typename MeshBuilder = MeshPrimitiveBuilder>
template<typename LoopIterator >
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.


The documentation for this class was generated from the following file: