library of assembled shared sources

http://lass.cocamware.com

lass::spat::PlanarMesh Class Reference

a planar mesh More...

#include <planar_mesh.h>

Inheritance diagram for lass::spat::PlanarMesh:

Inheritance graph
[legend]
Collaboration diagram for lass::spat::PlanarMesh:

Collaboration graph
[legend]

Data Structures

struct  ProxyHandle
class  StackIncrementer

Public Types

enum  { stackDepth = TBitField::size - 1, publicMarkIndex = TBitField::size - 1 }
typedef lass::prim::Point2D< T > TPoint2D
typedef lass::prim::Vector2D< T > TVector2D
typedef lass::prim::Line2D< T,
prim::Cartesian,
prim::Unnormalized
TLine2D
typedef lass::prim::Ray2D< T,
prim::Unnormalized,
prim::Unbounded
TRay2D
typedef
lass::prim::LineSegment2D< T > 
TLineSegment2D
typedef
lass::prim::SimplePolygon2D< T > 
TSimplePolygon2D
typedef lass::prim::Triangle2D< T > TTriangle2D
typedef experimental::BitField
< num::Tuint32
TBitField
typedef lass::spat::QuadEdge
< ProxyHandle
TQuadEdge
typedef TQuadEdge::Edge TEdge
typedef std::vector< TQuadEdge * > TQuadEdgeList
typedef std::vector
< ProxyHandle * > 
TProxyHandleList
typedef lass::util::CallbackR1
< bool, TEdge * > 
TEdgeCallback
typedef lass::util::CallbackR3
< bool, TEdge *, const
TSimplePolygon2D &, FaceHandle > 
TEdgePolyFaceHandleCallback

Public Member Functions

 PlanarMesh (const TPoint2D &a, const TPoint2D &b, const TPoint2D &c)
 PlanarMesh (const TPoint2D &a, const TPoint2D &b, const TPoint2D &c, const TPoint2D &d)
 PlanarMesh (const prim::Aabb2D< T > &iAabb)
void setTolerance (const T &iTolerance)
const T & tolerance ()
void setPointDistanceTolerance (const T &iPointDistanceTolerance)
const T & pointDistanceTolerance ()
virtual ~PlanarMesh ()
TEdgestartEdge () const
bool isBoundingPoint (const TPoint2D &iPoint) const
 true for points defining the boundary
bool forAllPrimaryEdges (const TEdgeCallback &iCallback)
bool forAllPrimaryUndirectedEdges (const TEdgeCallback &iCallback)
 forAllPrimaryUndirectedEdges.
bool forAllPrimaryUndirectedEdgesCached (const TEdgeCallback &iCallback)
 forAllPrimaryUndirectedEdges.
bool forAllDualEdges (const TEdgeCallback &iCallback)
bool forAllEdges (const TEdgeCallback &iCallback)
bool forAllVertices (const TEdgeCallback &iCallback)
bool forAllFaces (const TEdgeCallback &iCallback)
bool forAllFacesCached (const TEdgeCallback &iCallback)
template<typename InputPolygonIterator , typename InputFaceHandleIterator >
bool forAllPolygonFaces (InputPolygonIterator iFirstPolygon, InputPolygonIterator iLastPolygon, InputFaceHandleIterator iFirstFaceHandle, const TEdgePolyFaceHandleCallback &iCallback)
 marks all faces which have their barycentrum inside the given polygon with the provided handle
TEdgelocate (const TPoint2D &iPoint, TEdge *iHint=0) const
 locate an edge of the triangle containing iPoint
TEdgepointLocate (const TPoint2D &iPoint) const
 locate an edge of which the org is the same as iPoint, useful for known degeneracy point location, possibly slower than the regular locate
TEdgeshoot (const TRay2D &iRay) const
 locate the edge found by shooting the ray from within the triangle containt the tail of the ray
template<typename OutputIterator >
OutputIterator walk (const TLineSegment2D &iSegment, OutputIterator oCrossedEdges) const
template<typename OutputIterator >
OutputIterator walkIntersections (const TLineSegment2D &iSegment, OutputIterator oIntersections) const
std::pair< int, TEdge * > walkTillConstrained (const TRay2D &iRay) const
TEdgeinsertSite (const TPoint2D &iPoint, bool makeDelaunay=true, bool forceOnEdge=false)
 makeDelaunay: after insertion of the site force a _Delaunay_ triangulation forceOnEdge : points are considered on the edge although due to numerical roundoff they maybe not, as user you should let this default to false or you'd better be knowning damn well what you are doing :-D
TEdgeinsertEdge (const TLineSegment2D &iSegment, EdgeHandle iLeftHandle=EdgeHandle(), EdgeHandle iRightHandle=EdgeHandle(), PointHandle iPointHandle=PointHandle(), bool forcePointHandle=false, bool makeDelaunay=true)
 insertEdge.
TEdgeinsertPolygon (const TSimplePolygon2D &iSegment, EdgeHandle iLeftHandle=EdgeHandle(), EdgeHandle iRightHandle=EdgeHandle(), bool makeDelaunay=true)
void markPolygon (TEdge *iStartEdge, const TSimplePolygon2D &iPolygon, FaceHandle iFaceHandle)
 marks all faces which have their barycentrum inside the given polygon with the provided handle
template<typename InputPolygonIterator , typename InputFaceHandleIterator >
void markPolygons (InputPolygonIterator iFirstPolygon, InputPolygonIterator iLastPolygon, InputFaceHandleIterator iFirstFaceHandle)
 marks all faces which have their barycentrum inside the given polygon with the provided handle
void markPolygons (const std::vector< TSimplePolygon2D > &iPolygons, const std::vector< FaceHandle > &iFaceHandles)
 marks all faces which have their barycentrum inside the given polygon with the provided handle
bool deleteEdge (TEdge *iEdge)
 delete edge without using gc
bool gcDeleteEdge (TEdge *iEdge)
 delete edge using garbage collector, useful for deletion avalanches
int gc ()
 do garbage collection after deletion avalanches, returns number of quadedge collected
long edgeCount () const
void makeMaximalConvexPolygon (T iMaxSurface=T(-1))
void makeRectangular (T minAngle, T maxAngle)
TEdgemakeEdge (const TPoint2D &a, const TPoint2D &b, bool makeConstrained)
 makes a _dangling_ edge, this is really only for ADVANCED usage, you'll have to splice it or it won't be in the mesh!
TEdgeconnect (TEdge *a, TEdge *b)
 connects the dest of a with the org of b
TEdgesplit (TEdge *a, T iWhere)
 splits an edge with iWhere in the open interval (0,1) and returns the new edge with as org the splitting point
void swap (TEdge *iEdge)
void setTempQuadEdges (bool iAllocateInTemp)
bool moveWithinNeighbourhood (TEdge *iEdge, const TPoint2D &iNewLocation)
bool removeVertex (TEdge *iEdge)

Static Public Member Functions

static TTriangle2D triangle (const TEdge *iEdge)
static TSimplePolygon2D polygon (const TEdge *iEdge)
static const TPoint2Dorg (const TEdge *iEdge)
static const TPoint2Ddest (const TEdge *iEdge)
static const TPoint2DfastOrg (const TEdge *iEdge)
static const TPoint2DfastDest (const TEdge *iEdge)
static TPoint2D along (const TEdge *iEdge, const T &iParam)
static TPoint2D fastAlong (const TEdge *iEdge, const T &iParam)
static const TVector2D direction (const TEdge *iEdge)
static bool rightOf (const TPoint2D &iPoint, const TEdge *iEdge)
static bool fastRightOf (const TPoint2D &iPoint, const TEdge *iEdge)
static bool leftOf (const TPoint2D &iPoint, const TEdge *iEdge)
static bool fastLeftOf (const TPoint2D &iPoint, const TEdge *iEdge)
static bool onEdge (const TPoint2D &iPoint, const TEdge *iEdge)
static bool hasLeftFace (const TEdge *iEdge)
static bool fastHasLeftFace (const TEdge *iEdge)
static bool hasRightFace (const TEdge *iEdge)
static int chainOrder (const TEdge *iEdge)
 chainOrder.
static int vertexOrder (const TEdge *iEdge)
 vertexOrder.
static bool allEqualChainOrder (const TEdge *iEdge)
 allEqualchainOrder.
static bool inConvexCell (const TPoint2D &iPoint, const TEdge *iEdge)
static void setOrg (const TPoint2D &iOrg, TEdge *iEdge)
static void setDest (const TPoint2D &iDest, TEdge *iEdge)
static bool inPrimaryMesh (const TEdge *iEdge)
static bool inDualMesh (const TEdge *iEdge)
static bool marking (const TEdge *iEdge)
static void setMarking (TEdge *iEdge, bool iMark)
static PointHandle pointHandle (const TEdge *iEdge)
static EdgeHandle edgeHandle (const TEdge *iEdge)
static FaceHandle faceHandle (const TEdge *iEdge)
static PointHandle & pointHandleRef (TEdge *iEdge)
static EdgeHandle & edgeHandleRef (TEdge *iEdge)
static FaceHandle & faceHandleRef (TEdge *iEdge)
static void setPointHandle (TEdge *iEdge, PointHandle iHandle)
static void setEdgeHandle (TEdge *iEdge, EdgeHandle iHandle)
static void setFaceHandle (TEdge *iEdge, FaceHandle iHandle)
static void setOrientedEdgeHandle (TEdge *iEdge, EdgeHandle iLeftHandle, EdgeHandle iRightHandle, const TVector2D &iDirection)

Static Public Attributes

static const int PLANAR_MESH_STACK_DEPTH = TBitField::size - 1
 this determines the maximum nesting depth of forAllVertices and forAllFaces
static unsigned numSetOrientedEdgeHandleCalls = 0
static unsigned numSetOrientedEdgeHandleSwaps = 0

Private Member Functions

 PlanarMesh ()
void init4 (const TPoint2D &a, const TPoint2D &b, const TPoint2D &c, const TPoint2D &d)
void fixEdge (TEdge *e)
 in quadrilateral possibly switch the diagonal for delaunay
TEdgemakeEmptyEdge (bool makeConstrained)
void triangulate (TEdge *iEdge)
void splitEdge (TEdge *e, const TPoint2D &iPoint)
TEdgepointShoot (const TRay2D &iRay) const
 locate the edge found by shooting the ray from within the triangle with the support of the ray as a known point
template<typename OutputIterator >
OutputIterator pointWalk (const TLineSegment2D &iSegment, OutputIterator oCrossedEdges) const
void safeSplitEdge (TEdge *e, const TPoint2D &iPoint)
TPoint2D snap (const TPoint2D &a, const TPoint2D &b, const TPoint2D &c)
TEdgebruteForceLocate (const TPoint2D &iPoint) const
TEdgebruteForceExactLocate (const TPoint2D &iPoint) const
bool internalMarking (const TEdge *iEdge)
bool deletePoint (TEdge *e)
void setInternalMarking (TEdge *iEdge, bool iMark)
void setInternalMarkingAroundVertex (typename PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge *iEdge, bool iMark)
void setInternalMarkingInFace (typename PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge *iEdge, bool iMark)
bool floodPolygon (TEdge *iStartEdge, const TSimplePolygon2D &iPolygon, FaceHandle iFaceHandle)
bool floodPolygonCallback (TEdge *iStartEdge, const TSimplePolygon2D &iPolygon, FaceHandle iFaceHandle, const TEdgePolyFaceHandleCallback &iCallback)
template<typename T >
T *const make (const T &x)
template<typename T >
void free (T *p)

Private Attributes

bool allocateInTemp_
TEdgestartEdge_
TQuadEdgeList quadEdgeList_
TQuadEdgeList tempQuadEdgeList_
std::vector< TPoint2DboundingPoints_
tolerance_
pointDistanceTolerance_
long edgeCount_
int stackDepth_
experimental::ResetableThreadLocalVariable
< TEdge * > 
lastLocateEdge_
experimental::ResetableThreadLocalVariable
< TEdge * > 
lastFloodEdge_

Friends

class impl::EdgeToMatlab< T, PointHandle, EdgeHandle, FaceHandle >
class impl::EdgeGatherer< T, PointHandle, EdgeHandle, FaceHandle >
class impl::EdgeMarker< T, PointHandle, EdgeHandle, FaceHandle >

Detailed Description

a planar mesh

Author:
Tom De Muer [TDM]
Credits:
This code is inspired on the code of Dani Lischinski distributed under the GPL (Graphics Gems IV)

Definition at line 236 of file planar_mesh.h.


Member Typedef Documentation

Definition at line 239 of file planar_mesh.h.

Definition at line 240 of file planar_mesh.h.

Definition at line 241 of file planar_mesh.h.

Definition at line 242 of file planar_mesh.h.

Definition at line 243 of file planar_mesh.h.

Definition at line 244 of file planar_mesh.h.

Definition at line 245 of file planar_mesh.h.

Definition at line 246 of file planar_mesh.h.

Definition at line 292 of file planar_mesh.h.

Definition at line 293 of file planar_mesh.h.

Definition at line 294 of file planar_mesh.h.

Definition at line 295 of file planar_mesh.h.

Definition at line 296 of file planar_mesh.h.

Definition at line 297 of file planar_mesh.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
stackDepth 
publicMarkIndex 

Definition at line 249 of file planar_mesh.h.


Constructor & Destructor Documentation

TEMPLATE_DEF lass::spat::PlanarMesh::PlanarMesh ( const TPoint2D a,
const TPoint2D b,
const TPoint2D c 
)

TEMPLATE_DEF lass::spat::PlanarMesh::PlanarMesh ( const TPoint2D a,
const TPoint2D b,
const TPoint2D c,
const TPoint2D d 
)

Definition at line 956 of file planar_mesh.h.

References allocateInTemp_, and init4().

TEMPLATE_DEF lass::spat::PlanarMesh::PlanarMesh ( const prim::Aabb2D< T > &  iAabb  ) 

TEMPLATE_DEF lass::spat::PlanarMesh::~PlanarMesh (  )  [virtual]

lass::spat::PlanarMesh::PlanarMesh (  )  [private]


Member Function Documentation

void lass::spat::PlanarMesh::setTolerance ( const T &  iTolerance  )  [inline]

Definition at line 303 of file planar_mesh.h.

const T& lass::spat::PlanarMesh::tolerance (  )  [inline]

Definition at line 304 of file planar_mesh.h.

void lass::spat::PlanarMesh::setPointDistanceTolerance ( const T &  iPointDistanceTolerance  )  [inline]

Definition at line 305 of file planar_mesh.h.

const T& lass::spat::PlanarMesh::pointDistanceTolerance (  )  [inline]

Definition at line 306 of file planar_mesh.h.

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::startEdge (  )  const

Definition at line 2563 of file planar_mesh.h.

References startEdge_.

Referenced by pointShoot(), and shoot().

TEMPLATE_DEF bool lass::spat::PlanarMesh::isBoundingPoint ( const TPoint2D iPoint  )  const

true for points defining the boundary

Definition at line 1393 of file planar_mesh.h.

References boundingPoints_.

Referenced by lass::spat::LinearMeshInterpolator< T, TPI >::interpolate(), locate(), pointShoot(), and pointWalk().

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPrimaryEdges ( const TEdgeCallback iCallback  ) 

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPrimaryUndirectedEdges ( const TEdgeCallback iCallback  ) 

forAllPrimaryUndirectedEdges.

Edges sharing endpoints are only listed once

Definition at line 2993 of file planar_mesh.h.

References inPrimaryMesh(), and quadEdgeList_.

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPrimaryUndirectedEdgesCached ( const TEdgeCallback iCallback  ) 

forAllPrimaryUndirectedEdges.

Edges sharing endpoints are only listed once. Random starting point

Definition at line 3014 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::deleted, inPrimaryMesh(), and quadEdgeList_.

Referenced by makeMaximalConvexPolygon(), and makeRectangular().

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllDualEdges ( const TEdgeCallback iCallback  ) 

Definition at line 3063 of file planar_mesh.h.

References inDualMesh(), and quadEdgeList_.

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllEdges ( const TEdgeCallback iCallback  ) 

Definition at line 3086 of file planar_mesh.h.

References quadEdgeList_.

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllVertices ( const TEdgeCallback iCallback  ) 

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllFaces ( const TEdgeCallback iCallback  ) 

TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllFacesCached ( const TEdgeCallback iCallback  ) 

template<typename InputPolygonIterator , typename InputFaceHandleIterator >
TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPolygonFaces ( InputPolygonIterator  iFirstPolygon,
InputPolygonIterator  iLastPolygon,
InputFaceHandleIterator  iFirstFaceHandle,
const TEdgePolyFaceHandleCallback iCallback 
) [inline]

marks all faces which have their barycentrum inside the given polygon with the provided handle

Definition at line 2459 of file planar_mesh.h.

References chainOrder(), lass::io::cout(), floodPolygonCallback(), forAllPrimaryEdges(), lastFloodEdge_, lass::spat::QuadEdge< EdgeHandle >::Edge::lNext(), locate(), PLANAR_MESH_STACK_DEPTH, stackDepth_, and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::locate ( const TPoint2D iPoint,
TEdge iHint = 0 
) const

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::pointLocate ( const TPoint2D iPoint  )  const

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::shoot ( const TRay2D iRay  )  const

template<typename OutputIterator >
TEMPLATE_DEF OutputIterator lass::spat::PlanarMesh::walk ( const TLineSegment2D iSegment,
OutputIterator  oCrossedEdges 
) const [inline]

template<typename OutputIterator >
TEMPLATE_DEF OutputIterator lass::spat::PlanarMesh::walkIntersections ( const TLineSegment2D iSegment,
OutputIterator  oIntersections 
) const [inline]

TEMPLATE_DEF std::pair< int, typename PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * > lass::spat::PlanarMesh::walkTillConstrained ( const TRay2D iRay  )  const

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::insertSite ( const TPoint2D iPoint,
bool  makeDelaunay = true,
bool  forceOnEdge = false 
)

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::insertEdge ( const TLineSegment2D iSegment,
EdgeHandle  iLeftHandle = EdgeHandle(),
EdgeHandle  iRightHandle = EdgeHandle(),
PointHandle  iPointHandle = PointHandle(),
bool  iForcePointHandle = false,
bool  makeDelaunay = true 
)

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::insertPolygon ( const TSimplePolygon2D iSegment,
EdgeHandle  iLeftHandle = EdgeHandle(),
EdgeHandle  iRightHandle = EdgeHandle(),
bool  makeDelaunay = true 
)

TEMPLATE_DEF void lass::spat::PlanarMesh::markPolygon ( TEdge iStartEdge,
const TSimplePolygon2D iPolygon,
FaceHandle  iFaceHandle = FaceHandle() 
)

marks all faces which have their barycentrum inside the given polygon with the provided handle

Definition at line 2414 of file planar_mesh.h.

References chainOrder(), floodPolygon(), forAllPrimaryEdges(), lass::spat::QuadEdge< EdgeHandle >::Edge::lNext(), PLANAR_MESH_STACK_DEPTH, stackDepth_, and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

template<typename InputPolygonIterator , typename InputFaceHandleIterator >
TEMPLATE_DEF void lass::spat::PlanarMesh::markPolygons ( InputPolygonIterator  iFirstPolygon,
InputPolygonIterator  iLastPolygon,
InputFaceHandleIterator  iFirstFaceHandle 
) [inline]

marks all faces which have their barycentrum inside the given polygon with the provided handle

Definition at line 2434 of file planar_mesh.h.

References chainOrder(), floodPolygon(), forAllPrimaryEdges(), lass::spat::QuadEdge< EdgeHandle >::Edge::lNext(), locate(), PLANAR_MESH_STACK_DEPTH, stackDepth_, and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

Referenced by markPolygons().

TEMPLATE_DEF void lass::spat::PlanarMesh::markPolygons ( const std::vector< TSimplePolygon2D > &  iPolygons,
const std::vector< FaceHandle > &  iFaceHandles 
)

marks all faces which have their barycentrum inside the given polygon with the provided handle

Definition at line 2493 of file planar_mesh.h.

References LASS_THROW, and markPolygons().

TEMPLATE_DEF bool lass::spat::PlanarMesh::deleteEdge ( TEdge iEdge  ) 

TEMPLATE_DEF bool lass::spat::PlanarMesh::gcDeleteEdge ( TEdge iEdge  ) 

TEMPLATE_DEF int lass::spat::PlanarMesh::gc (  ) 

do garbage collection after deletion avalanches, returns number of quadedge collected

Definition at line 1319 of file planar_mesh.h.

References quadEdgeList_, and swap().

Referenced by makeMaximalConvexPolygon(), makeRectangular(), and removeVertex().

long lass::spat::PlanarMesh::edgeCount (  )  const [inline]

Definition at line 340 of file planar_mesh.h.

TEMPLATE_DEF void lass::spat::PlanarMesh::makeMaximalConvexPolygon ( iMaxSurface = T(-1)  ) 

TEMPLATE_DEF void lass::spat::PlanarMesh::makeRectangular ( minAngle,
maxAngle 
)

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TTriangle2D lass::spat::PlanarMesh::triangle ( const TEdge iEdge  )  [static]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TSimplePolygon2D lass::spat::PlanarMesh::polygon ( const TEdge iEdge  )  [static]

TEMPLATE_DEF const PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D & lass::spat::PlanarMesh::org ( const TEdge iEdge  )  [static]

TEMPLATE_DEF const PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D & lass::spat::PlanarMesh::dest ( const TEdge iEdge  )  [inline, static]

TEMPLATE_DEF const PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D & lass::spat::PlanarMesh::fastOrg ( const TEdge iEdge  )  [static]

TEMPLATE_DEF const PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D & lass::spat::PlanarMesh::fastDest ( const TEdge iEdge  )  [inline, static]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D lass::spat::PlanarMesh::along ( const TEdge iEdge,
const T &  iParam 
) [static]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D lass::spat::PlanarMesh::fastAlong ( const TEdge iEdge,
const T &  iParam 
) [static]

TEMPLATE_DEF const PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TVector2D lass::spat::PlanarMesh::direction ( const TEdge iEdge  )  [inline, static]

Definition at line 2682 of file planar_mesh.h.

References dest(), and org().

Referenced by insertEdge(), setOrientedEdgeHandle(), and splitEdge().

TEMPLATE_DEF bool lass::spat::PlanarMesh::rightOf ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

Definition at line 2702 of file planar_mesh.h.

References lass::prim::ccw(), dest(), and org().

Referenced by inConvexCell(), insertSite(), locate(), and pointLocate().

TEMPLATE_DEF bool lass::spat::PlanarMesh::fastRightOf ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

Definition at line 2708 of file planar_mesh.h.

References lass::prim::ccw(), fastDest(), and fastOrg().

Referenced by locate().

TEMPLATE_DEF bool lass::spat::PlanarMesh::leftOf ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

Definition at line 2715 of file planar_mesh.h.

References lass::prim::ccw(), dest(), and org().

Referenced by hasLeftFace(), insertSite(), pointLocate(), pointWalk(), swap(), triangulate(), and walk().

TEMPLATE_DEF bool lass::spat::PlanarMesh::fastLeftOf ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

Definition at line 2721 of file planar_mesh.h.

References lass::prim::ccw(), fastDest(), and fastOrg().

Referenced by fastHasLeftFace(), and locate().

TEMPLATE_DEF bool lass::spat::PlanarMesh::onEdge ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

TEMPLATE_DEF bool lass::spat::PlanarMesh::hasLeftFace ( const TEdge iEdge  )  [static]

TEMPLATE_DEF bool lass::spat::PlanarMesh::fastHasLeftFace ( const TEdge iEdge  )  [static]

Definition at line 2747 of file planar_mesh.h.

References fastDest(), fastLeftOf(), and lass::spat::QuadEdge< EdgeHandle >::Edge::lNext().

Referenced by locate().

TEMPLATE_DEF bool lass::spat::PlanarMesh::hasRightFace ( const TEdge iEdge  )  [static]

Definition at line 2756 of file planar_mesh.h.

References hasLeftFace(), and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

Referenced by insertSite().

TEMPLATE_DEF int lass::spat::PlanarMesh::chainOrder ( const TEdge iEdge  )  [static]

chainOrder.

returns the order of the polygonal chain starting from iEdge and walking around the left-face of iEdge. Or in other words: the number of vertices in the polygon on the left of iEdge.

Definition at line 2766 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::Edge::lNext().

Referenced by allEqualChainOrder(), floodPolygon(), floodPolygonCallback(), forAllPolygonFaces(), locate(), markPolygon(), markPolygons(), pointWalk(), walk(), and walkTillConstrained().

TEMPLATE_DEF int lass::spat::PlanarMesh::vertexOrder ( const TEdge iEdge  )  [static]

vertexOrder.

returns the order of the vertex defined by the origin of iEdge This is the number of undirected edges connected to this origin.

Definition at line 2800 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::Edge::oNext().

Referenced by allEqualChainOrder(), insertEdge(), insertSite(), pointShoot(), removeVertex(), and shoot().

TEMPLATE_DEF bool lass::spat::PlanarMesh::allEqualChainOrder ( const TEdge iEdge  )  [static]

allEqualchainOrder.

returns true when the chainorder of all edges which share org(iEdge) is equal, f.i. when they are all triangles/quadriliterals

Definition at line 2783 of file planar_mesh.h.

References chainOrder(), lass::spat::QuadEdge< EdgeHandle >::Edge::oNext(), and vertexOrder().

Referenced by insertEdge(), insertSite(), pointShoot(), and pointWalk().

TEMPLATE_DEF bool lass::spat::PlanarMesh::inConvexCell ( const TPoint2D iPoint,
const TEdge iEdge 
) [static]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::makeEdge ( const TPoint2D a,
const TPoint2D b,
bool  makeConstrained 
)

makes a _dangling_ edge, this is really only for ADVANCED usage, you'll have to splice it or it won't be in the mesh!

Definition at line 2550 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::Edge::handle(), lass::spat::experimental::ObjectAllocator::make(), makeEmptyEdge(), and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

Referenced by connect(), init4(), insertSite(), and PlanarMesh().

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::connect ( TEdge a,
TEdge b 
)

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::split ( TEdge a,
iWhere 
)

splits an edge with iWhere in the open interval (0,1) and returns the new edge with as org the splitting point

Definition at line 1046 of file planar_mesh.h.

References along(), LASS_ENFORCE, lass::spat::QuadEdge< EdgeHandle >::Edge::lNext(), splitEdge(), and lass::stde::T.

TEMPLATE_DEF void lass::spat::PlanarMesh::swap ( TEdge iEdge  ) 

TEMPLATE_DEF void lass::spat::PlanarMesh::setTempQuadEdges ( bool  iAllocateInTemp  ) 

Definition at line 991 of file planar_mesh.h.

References allocateInTemp_, quadEdgeList_, and tempQuadEdgeList_.

TEMPLATE_DEF void lass::spat::PlanarMesh::setOrg ( const TPoint2D iOrg,
TEdge iEdge 
) [static]

Definition at line 2688 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::Edge::handle(), inPrimaryMesh(), and LASS_ASSERT.

Referenced by swap().

TEMPLATE_DEF void lass::spat::PlanarMesh::setDest ( const TPoint2D iDest,
TEdge iEdge 
) [static]

Definition at line 2695 of file planar_mesh.h.

References inPrimaryMesh(), LASS_ASSERT, and lass::spat::QuadEdge< EdgeHandle >::Edge::sym().

Referenced by splitEdge(), and swap().

bool lass::spat::PlanarMesh::moveWithinNeighbourhood ( TEdge iEdge,
const TPoint2D iNewLocation 
)

TEMPLATE_DEF bool lass::spat::PlanarMesh::removeVertex ( TEdge iEdge  ) 

TEMPLATE_DEF bool lass::spat::PlanarMesh::inPrimaryMesh ( const TEdge iEdge  )  [static]

TEMPLATE_DEF bool lass::spat::PlanarMesh::inDualMesh ( const TEdge iEdge  )  [static]

Definition at line 2576 of file planar_mesh.h.

References inPrimaryMesh().

Referenced by forAllDualEdges(), forAllFaces(), forAllFacesCached(), and forAllVertices().

TEMPLATE_DEF bool lass::spat::PlanarMesh::marking ( const TEdge iEdge  )  [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::setMarking ( TEdge iEdge,
bool  iMark 
) [static]

TEMPLATE_DEF PointHandle lass::spat::PlanarMesh::pointHandle ( const TEdge iEdge  )  [static]

TEMPLATE_DEF EdgeHandle lass::spat::PlanarMesh::edgeHandle ( const TEdge iEdge  )  [static]

Definition at line 2833 of file planar_mesh.h.

References lass::spat::QuadEdge< EdgeHandle >::Edge::handle(), and inPrimaryMesh().

Referenced by splitEdge().

TEMPLATE_DEF FaceHandle lass::spat::PlanarMesh::faceHandle ( const TEdge iEdge  )  [static]

Definition at line 2839 of file planar_mesh.h.

References inPrimaryMesh(), and lass::spat::QuadEdge< EdgeHandle >::Edge::rot().

Referenced by connect(), and setFaceHandle().

TEMPLATE_DEF PointHandle & lass::spat::PlanarMesh::pointHandleRef ( TEdge iEdge  )  [static]

TEMPLATE_DEF EdgeHandle & lass::spat::PlanarMesh::edgeHandleRef ( TEdge iEdge  )  [static]

TEMPLATE_DEF FaceHandle & lass::spat::PlanarMesh::faceHandleRef ( TEdge iEdge  )  [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::setPointHandle ( TEdge iEdge,
PointHandle  iHandle 
) [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::setEdgeHandle ( TEdge iEdge,
EdgeHandle  iHandle 
) [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::setFaceHandle ( TEdge iEdge,
FaceHandle  iHandle 
) [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::setOrientedEdgeHandle ( TEdge iEdge,
EdgeHandle  iLeftHandle,
EdgeHandle  iRightHandle,
const TVector2D iDirection 
) [static]

TEMPLATE_DEF void lass::spat::PlanarMesh::init4 ( const TPoint2D a,
const TPoint2D b,
const TPoint2D c,
const TPoint2D d 
) [private]

TEMPLATE_DEF void lass::spat::PlanarMesh::fixEdge ( TEdge e  )  [private]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::makeEmptyEdge ( bool  makeConstrained  )  [private]

TEMPLATE_DEF void lass::spat::PlanarMesh::triangulate ( TEdge iEdge  )  [private]

TEMPLATE_DEF void lass::spat::PlanarMesh::splitEdge ( TEdge e,
const TPoint2D iPoint 
) [private]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::pointShoot ( const TRay2D iRay  )  const [private]

template<typename OutputIterator >
TEMPLATE_DEF OutputIterator lass::spat::PlanarMesh::pointWalk ( const TLineSegment2D iSegment,
OutputIterator  oCrossedEdges 
) const [inline, private]

TEMPLATE_DEF void lass::spat::PlanarMesh::safeSplitEdge ( TEdge e,
const TPoint2D iPoint 
) [private]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TPoint2D lass::spat::PlanarMesh::snap ( const TPoint2D a,
const TPoint2D b,
const TPoint2D c 
) [private]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::bruteForceLocate ( const TPoint2D iPoint  )  const [private]

TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::bruteForceExactLocate ( const TPoint2D iPoint  )  const [private]

Definition at line 1384 of file planar_mesh.h.

References lass::spat::impl::BrutePointExactLocator::edge, and forAllVertices().

Referenced by pointLocate().

TEMPLATE_DEF bool lass::spat::PlanarMesh::internalMarking ( const TEdge iEdge  )  [private]

bool lass::spat::PlanarMesh::deletePoint ( TEdge e  )  [private]

Referenced by ~PlanarMesh().

TEMPLATE_DEF void lass::spat::PlanarMesh::setInternalMarking ( TEdge iEdge,
bool  iMark 
) [private]

void lass::spat::PlanarMesh::setInternalMarkingAroundVertex ( typename PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge iEdge,
bool  iMark 
) [private]

Referenced by forAllVertices().

void lass::spat::PlanarMesh::setInternalMarkingInFace ( typename PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge iEdge,
bool  iMark 
) [private]

Referenced by forAllFaces(), and forAllFacesCached().

TEMPLATE_DEF bool lass::spat::PlanarMesh::floodPolygon ( TEdge iStartEdge,
const TSimplePolygon2D iPolygon,
FaceHandle  iFaceHandle = FaceHandle() 
) [private]

TEMPLATE_DEF bool lass::spat::PlanarMesh::floodPolygonCallback ( TEdge iStartEdge,
const TSimplePolygon2D iPolygon,
FaceHandle  iFaceHandle,
const TEdgePolyFaceHandleCallback iCallback 
) [private]

template<typename T >
T* const lass::spat::experimental::ObjectAllocator::make ( const T &  x  )  [inline, inherited]

Definition at line 101 of file planar_mesh.h.

References lass::util::AllocatorThrow< Allocator >::allocate(), and lass::stde::T.

Referenced by makeEdge(), and makeEmptyEdge().

template<typename T >
void lass::spat::experimental::ObjectAllocator::free ( T *  p  )  [inline, inherited]

Definition at line 115 of file planar_mesh.h.

References lass::stde::T.

Referenced by deleteEdge(), and ~PlanarMesh().


Friends And Related Function Documentation

friend class impl::EdgeToMatlab< T, PointHandle, EdgeHandle, FaceHandle > [friend]

Definition at line 433 of file planar_mesh.h.

friend class impl::EdgeGatherer< T, PointHandle, EdgeHandle, FaceHandle > [friend]

Definition at line 434 of file planar_mesh.h.

friend class impl::EdgeMarker< T, PointHandle, EdgeHandle, FaceHandle > [friend]

Definition at line 435 of file planar_mesh.h.


Field Documentation

const int lass::spat::PlanarMesh::PLANAR_MESH_STACK_DEPTH = TBitField::size - 1 [static]

this determines the maximum nesting depth of forAllVertices and forAllFaces

Definition at line 248 of file planar_mesh.h.

Referenced by forAllFaces(), forAllFacesCached(), forAllPolygonFaces(), forAllVertices(), markPolygon(), and markPolygons().

Definition at line 404 of file planar_mesh.h.

Referenced by init4(), makeEmptyEdge(), PlanarMesh(), and setTempQuadEdges().

Definition at line 405 of file planar_mesh.h.

Referenced by deleteEdge(), gcDeleteEdge(), init4(), PlanarMesh(), and startEdge().

Definition at line 407 of file planar_mesh.h.

Referenced by makeEmptyEdge(), and setTempQuadEdges().

Definition at line 408 of file planar_mesh.h.

Referenced by init4(), isBoundingPoint(), and PlanarMesh().

Definition at line 409 of file planar_mesh.h.

Referenced by init4(), insertEdge(), PlanarMesh(), pointShoot(), pointWalk(), shoot(), and walk().

Definition at line 410 of file planar_mesh.h.

Referenced by init4(), insertEdge(), insertSite(), and PlanarMesh().

Definition at line 415 of file planar_mesh.h.

Referenced by deleteEdge(), gcDeleteEdge(), init4(), locate(), PlanarMesh(), and pointLocate().

TEMPLATE_DEF unsigned lass::spat::PlanarMesh::numSetOrientedEdgeHandleCalls = 0 [static]

Definition at line 447 of file planar_mesh.h.

Referenced by setOrientedEdgeHandle().

TEMPLATE_DEF unsigned lass::spat::PlanarMesh::numSetOrientedEdgeHandleSwaps = 0 [static]

Definition at line 448 of file planar_mesh.h.

Referenced by setOrientedEdgeHandle().


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

Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo