Library of Assembled Shared Sources
|
a planar mesh More...
#include <planar_mesh.h>
Public Member Functions | |
bool | isBoundingPoint (const TPoint2D &iPoint) const |
true for points defining the boundary | |
bool | forAllPrimaryUndirectedEdges (const TEdgeCallback &iCallback) |
forAllPrimaryUndirectedEdges. | |
bool | forAllPrimaryUndirectedEdgesCached (const TEdgeCallback &iCallback) |
forAllPrimaryUndirectedEdges. | |
TEdge * | locate (const TPoint2D &iPoint, TEdge *iHint=0) const |
locate an edge of the triangle containing iPoint | |
TEdge * | pointLocate (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 | |
TEdge * | shoot (const TRay2D &iRay) const |
locate the edge found by shooting the ray from within the triangle containt the tail of the ray | |
TEdge * | insertSite (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 | |
TEdge * | insertEdge (const TLineSegment2D &iSegment, EdgeHandle iLeftHandle=EdgeHandle(), EdgeHandle iRightHandle=EdgeHandle(), PointHandle iPointHandle=PointHandle(), bool forcePointHandle=false, bool makeDelaunay=true) |
insertEdge. | |
void | markPolygon (TEdge *iStartEdge, const TSimplePolygon2D &iPolygon, FaceHandle iFaceHandle) |
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 | |
TEdge * | 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! | |
TEdge * | connect (TEdge *a, TEdge *b) |
connects the dest of a with the org of b | |
TEdge * | split (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 | |
template<typename InputPolygonIterator, typename InputFaceHandleIterator> | |
TEMPLATE_DEF void | markPolygons (InputPolygonIterator iFirstPolygon, InputPolygonIterator iLastPolygon, InputFaceHandleIterator iFirstFaceHandle) |
marks all faces which have their barycentrum inside the given polygon with the provided handle | |
template<typename InputPolygonIterator, typename InputFaceHandleIterator> | |
TEMPLATE_DEF 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 | |
Static Public Member Functions | |
static int | chainOrder (const TEdge *iEdge) |
chainOrder. | |
static int | vertexOrder (const TEdge *iEdge) |
vertexOrder. | |
static bool | allEqualChainOrder (const TEdge *iEdge) |
allEqualchainOrder. | |
Static Public Attributes | |
static const int | PLANAR_MESH_STACK_DEPTH = TBitField::size - 1 |
this determines the maximum nesting depth of forAllVertices and forAllFaces | |
a planar mesh
Definition at line 245 of file planar_mesh.h.
TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPrimaryUndirectedEdges | ( | const TEdgeCallback & | iCallback | ) |
forAllPrimaryUndirectedEdges.
Edges sharing endpoints are only listed once
Definition at line 2990 of file planar_mesh.h.
TEMPLATE_DEF bool lass::spat::PlanarMesh::forAllPrimaryUndirectedEdgesCached | ( | const TEdgeCallback & | iCallback | ) |
forAllPrimaryUndirectedEdges.
Edges sharing endpoints are only listed once. Random starting point
Definition at line 3011 of file planar_mesh.h.
TEMPLATE_DEF PlanarMesh< T, PointHandle, EdgeHandle, FaceHandle >::TEdge * lass::spat::PlanarMesh::shoot | ( | const TRay2D & | iRay | ) | const |
locate the edge found by shooting the ray from within the triangle containt the tail of the ray
method is polygon-safe
Definition at line 1599 of file planar_mesh.h.
References lass::num::abs(), lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::classify(), locate(), lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::point(), lass::prim::sRight, lass::prim::sSurface, lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::support(), lass::prim::Ray2D< T, NormalizingPolicy, ParameterPolicy >::t(), and vertexOrder().
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 ) |
insertEdge.
Inserts a constrained edge into the planar mesh. Edges on the lefthand side of the edge will be assigned iLeftHandle, others, iRightHandle. All inserted points will be assigned the point handle, in case the iPointHandle is different from the NullType.
Definition at line 2159 of file planar_mesh.h.
References lass::num::abs(), allEqualChainOrder(), insertEdge(), insertSite(), locate(), pointLocate(), lass::prim::rOne, lass::prim::LineSegment2D< T, ParameterPolicy >::vector(), and vertexOrder().
Referenced by insertEdge().
|
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 2763 of file planar_mesh.h.
Referenced by allEqualChainOrder(), locate(), and markPolygon().
|
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 2797 of file planar_mesh.h.
Referenced by allEqualChainOrder(), insertEdge(), insertSite(), and shoot().
|
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 2780 of file planar_mesh.h.
References chainOrder(), and vertexOrder().
Referenced by insertEdge(), and insertSite().