PTTRIANGULATOR Class Reference

PTTRIANGULATOR class provides algorithm of triangulation of points with respect of hard edges and clip regions. More...

#include <mi32/pttriang.h>

List of all members.

Public Types

typedef SIMPLE_ARRAY< INT32BOUNDARY
typedef MILIST< BOUNDARYBOUNDARYLIST
enum  RULE { RULE_Delaunay = 0, RULE_ShortestEdge = 1, RULE_NoRestrictions = 2 }

Public Member Functions

 PTTRIANGULATOR ()
 ~PTTRIANGULATOR ()
ERRVALUE AddHardEdge (const INT32 &start, const INT32 &end)
void AddHardEdge (const DPOINT2D &start, const DPOINT2D &end)
void AddHardLine (const POLYLINE &polyline)
INT32 AddPoint (const DPOINT2D &point)
INT32 AddPoints (const POLYLINE &polyline)
INT32 AddPoints (const DOUBLE_ARRAY< DPOINT3D > &points)
INT32 AddPoints (const DOUBLE_ARRAY< DPOINT2D > &points)
void ClearAll ()
void ClearAllSelection ()
void ClearClipRegion ()
void ClearEdgesSelection ()
void ClearHardEdges ()
void ClearHardEdgesSelection ()
void ClearPoints ()
void ClearTrianglesSelection ()
INT32 FindClosestTriangle (const DPOINT2D &point) const
INT32 FindDifferentNode (const DPOINT2D &point, const INT32 node) const
INT32 FindEdge (const DPOINT2D &point) const
INT32 FindHardEdge (const DPOINT2D &point) const
INT32 FindNode (const DPOINT2D &point) const
INT32 FindTriangle (const DPOINT2D &point) const
void GetBoundaries (BOUNDARYLIST &boundaries) const
bool GetEdgeInfo (const INT32 edge, EDGEINFO &edgeinfo) const
void GetHardEdges (SIMPLE_ARRAY< INT32 > &hardedges) const
INT32 GetIndexOfNode (const INT32 node) const
ERRVALUE GetNodeEdges (const INT32 node, SIMPLE_ARRAY< INT32 > &edges) const
ERRVALUE GetNodeNodes (const INT32 node, SIMPLE_ARRAY< INT32 > &nodes) const
INT32 GetNodeOfIndex (const INT32 index) const
INT32 GetNumEdges () const
INT32 GetNumNodes () const
INT32 GetNumSelectedEdges () const
INT32 GetNumSelectedHardEdges () const
INT32 GetNumSelectedTriangles () const
INT32 GetNumTriangles () const
bool GetPoint2D (const INT32 node, DPOINT2D &point) const
bool GetPoint3D (const INT32 node, DPOINT3D &point) const
RULE GetRule () const
double GetTolerance () const
bool GetTriangleEdges (const INT32 triangle, TRIANGLEEDGES &edges) const
bool GetTriangleInfo (const INT32 triangle, TRIANGLEINFO &triangleinfo) const
bool GetTriangleNodes (const INT32 triangle, TRIANGLENODES &nodes) const
bool GetTriangleTriangles (const INT32 triangle, TRIANGLETRIANGLES &triangles) const
bool IsEdgeSelected (const INT32 edge) const
bool IsHardEdge (const INT32 start, const INT32 end) const
bool IsHardEdgeSelected (const INT32 edge) const
bool IsSegmentIntersectedByHardEdges (const INT32 start, const INT32 end) const
bool IsTriangleSelected (const INT32 triangle) const
bool IsTriangulated ()
PTTRIANGULATORoperator= (const PTTRIANGULATOR &rhs)
INT32 RemoveSelectedEdges ()
INT32 RemoveSelectedHardEdges ()
INT32 RemoveSelectedTriangles ()
void SelectEdge (const INT32 edge)
void SelectHardEdge (const INT32 edge)
void SelectTriangle (const INT32 triangle)
void SetBoundaries (const BOUNDARYLIST &boundaries)
void SetClipRegion (const REGION2D &region)
ERRVALUE Triangulate (const double tolerance=0.0, const RULE rule=RULE_Delaunay)
void UnSelectEdge (const INT32 edge)
void UnSelectHardEdge (const INT32 edge)
void UnSelectTriangle (const INT32 triangle)

Detailed Description

PTTRIANGULATOR class provides algorithm of triangulation of points with respect of hard edges and clip regions.


Member Typedef Documentation


Member Enumeration Documentation

Rule is used to swap diagonal in quadritlateral.

Enumerator:
RULE_Delaunay 
RULE_ShortestEdge 
RULE_NoRestrictions 

Constructor & Destructor Documentation

PTTRIANGULATOR::PTTRIANGULATOR (  ) 

Constructor.

PTTRIANGULATOR::~PTTRIANGULATOR (  ) 

Destructor.


Member Function Documentation

ERRVALUE PTTRIANGULATOR::AddHardEdge ( const INT32 start,
const INT32 end 
)

Add hard edge for triangulation as two indices for added before points.

void PTTRIANGULATOR::AddHardEdge ( const DPOINT2D start,
const DPOINT2D end 
)

Add hard edge for triangulation as two DPOINT2Ds.

void PTTRIANGULATOR::AddHardLine ( const POLYLINE polyline  ) 

Add hard line for triangulation as polyline.

INT32 PTTRIANGULATOR::AddPoint ( const DPOINT2D point  ) 

Add point for triangulation Return index of point added for triangulation.

INT32 PTTRIANGULATOR::AddPoints ( const POLYLINE polyline  ) 

Add points for triangulation Return index of first point added for triangulation.

INT32 PTTRIANGULATOR::AddPoints ( const DOUBLE_ARRAY< DPOINT3D > &  points  ) 

Add points for triangulation Return index of first point added for triangulation.

INT32 PTTRIANGULATOR::AddPoints ( const DOUBLE_ARRAY< DPOINT2D > &  points  ) 

Add points for triangulation Return index of first point added for triangulation.

void PTTRIANGULATOR::ClearAll (  ) 

Clear all input data.

void PTTRIANGULATOR::ClearAllSelection (  )  [inline]
void PTTRIANGULATOR::ClearClipRegion (  )  [inline]

Clear clip region.

void PTTRIANGULATOR::ClearEdgesSelection (  )  [inline]
void PTTRIANGULATOR::ClearHardEdges (  ) 

Clear all hard edges and lines.

void PTTRIANGULATOR::ClearHardEdgesSelection (  )  [inline]
void PTTRIANGULATOR::ClearPoints (  ) 

Clear all points.

void PTTRIANGULATOR::ClearTrianglesSelection (  )  [inline]
INT32 PTTRIANGULATOR::FindClosestTriangle ( const DPOINT2D point  )  const

Find closest triangle to specified point.

Returns:
Triangle index or -1 if none found.
INT32 PTTRIANGULATOR::FindDifferentNode ( const DPOINT2D point,
const INT32  node 
) const

Find closest node to specified point, or next closest if same as specified.

INT32 PTTRIANGULATOR::FindEdge ( const DPOINT2D point  )  const

Find closest edge to specified point.

INT32 PTTRIANGULATOR::FindHardEdge ( const DPOINT2D point  )  const

Find closest hard edge to specified point.

INT32 PTTRIANGULATOR::FindNode ( const DPOINT2D point  )  const

Find closest node to specified point.

INT32 PTTRIANGULATOR::FindTriangle ( const DPOINT2D point  )  const
void PTTRIANGULATOR::GetBoundaries ( BOUNDARYLIST boundaries  )  const
bool PTTRIANGULATOR::GetEdgeInfo ( const INT32  edge,
EDGEINFO edgeinfo 
) const

Get edge information for given edge Return true if given edge exists.

void PTTRIANGULATOR::GetHardEdges ( SIMPLE_ARRAY< INT32 > &  hardedges  )  const
INT32 PTTRIANGULATOR::GetIndexOfNode ( const INT32  node  )  const

Get index of node assigned when this node was added for triangulation Return index of node or -1 if node is part of break edge of clip region.

ERRVALUE PTTRIANGULATOR::GetNodeEdges ( const INT32  node,
SIMPLE_ARRAY< INT32 > &  edges 
) const
ERRVALUE PTTRIANGULATOR::GetNodeNodes ( const INT32  node,
SIMPLE_ARRAY< INT32 > &  nodes 
) const
INT32 PTTRIANGULATOR::GetNodeOfIndex ( const INT32  index  )  const
INT32 PTTRIANGULATOR::GetNumEdges (  )  const [inline]

Get number of edges in triangulation Return number of edges.

INT32 PTTRIANGULATOR::GetNumNodes (  )  const [inline]

Get number of nodes in triangulation Return number of nodes.

INT32 PTTRIANGULATOR::GetNumSelectedEdges (  )  const [inline]
INT32 PTTRIANGULATOR::GetNumSelectedHardEdges (  )  const [inline]
INT32 PTTRIANGULATOR::GetNumSelectedTriangles (  )  const [inline]
INT32 PTTRIANGULATOR::GetNumTriangles (  )  const [inline]

Get number of triangles triangulation Return number of triangles.

bool PTTRIANGULATOR::GetPoint2D ( const INT32  node,
DPOINT2D point 
) const

Get 2D point for given node Return true if given node exists.

bool PTTRIANGULATOR::GetPoint3D ( const INT32  node,
DPOINT3D point 
) const

Get 3D point for given node Return true if given node exists.

RULE PTTRIANGULATOR::GetRule (  )  const [inline]

Get rule used for triangulation Return rule.

double PTTRIANGULATOR::GetTolerance (  )  const [inline]

Get tolerance used for triangulation Return tolerance.

bool PTTRIANGULATOR::GetTriangleEdges ( const INT32  triangle,
TRIANGLEEDGES edges 
) const

Get edges information for given triangle Return true if given triangle exists.

bool PTTRIANGULATOR::GetTriangleInfo ( const INT32  triangle,
TRIANGLEINFO triangleinfo 
) const

Get triangle information for given edge Return true if given triangle exists.

bool PTTRIANGULATOR::GetTriangleNodes ( const INT32  triangle,
TRIANGLENODES nodes 
) const

Get nodes information for given triangle Return true if given triangle exists.

bool PTTRIANGULATOR::GetTriangleTriangles ( const INT32  triangle,
TRIANGLETRIANGLES triangles 
) const

Get neighbor triangles information for given triangle Return true if given triangle exists.

bool PTTRIANGULATOR::IsEdgeSelected ( const INT32  edge  )  const [inline]
bool PTTRIANGULATOR::IsHardEdge ( const INT32  start,
const INT32  end 
) const
bool PTTRIANGULATOR::IsHardEdgeSelected ( const INT32  edge  )  const [inline]
bool PTTRIANGULATOR::IsSegmentIntersectedByHardEdges ( const INT32  start,
const INT32  end 
) const
bool PTTRIANGULATOR::IsTriangleSelected ( const INT32  triangle  )  const [inline]
bool PTTRIANGULATOR::IsTriangulated (  )  [inline]

Is triangulated Return true if it is.

PTTRIANGULATOR& PTTRIANGULATOR::operator= ( const PTTRIANGULATOR rhs  ) 

Assignment operator.

INT32 PTTRIANGULATOR::RemoveSelectedEdges (  ) 

Remove selected edges.

Returns:
Number of edges removed or error < 0.
INT32 PTTRIANGULATOR::RemoveSelectedHardEdges (  ) 

Remove selected hard edges.

Returns:
Number of edges removed or error < 0.
INT32 PTTRIANGULATOR::RemoveSelectedTriangles (  ) 

Remove selected triangles.

Returns:
Number of triangles removed or error < 0.
void PTTRIANGULATOR::SelectEdge ( const INT32  edge  ) 
void PTTRIANGULATOR::SelectHardEdge ( const INT32  edge  ) 
void PTTRIANGULATOR::SelectTriangle ( const INT32  triangle  ) 
void PTTRIANGULATOR::SetBoundaries ( const BOUNDARYLIST boundaries  ) 
void PTTRIANGULATOR::SetClipRegion ( const REGION2D region  )  [inline]

Set clip region.

ERRVALUE PTTRIANGULATOR::Triangulate ( const double  tolerance = 0.0,
const RULE  rule = RULE_Delaunay 
)

Triangulate given set of input data for given rule and tolerance Return error code.

void PTTRIANGULATOR::UnSelectEdge ( const INT32  edge  ) 
void PTTRIANGULATOR::UnSelectHardEdge ( const INT32  edge  ) 
void PTTRIANGULATOR::UnSelectTriangle ( const INT32  triangle  ) 

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

Generated on Sun Oct 7 21:33:44 2012 for TNTsdk 2012 by  doxygen 1.6.1