xmsmesh  1.0
MeIntersectPolys.cpp File Reference
#include <xmsmesh/meshing/detail/MeIntersectPolys.h>
#include <boost/geometry/geometry.hpp>
#include <boost/unordered_set.hpp>
#include <xmsinterp/geometry/GmBoostTypes.h>
#include <xmsmesh/meshing/detail/MePolyOffsetter.h>
#include <xmscore/misc/XmError.h>
#include <xmscore/stl/vector.h>
#include <xmsmesh/meshing/detail/MeIntersectPolys.t.h>
#include <xmscore/testing/TestTools.h>

Go to the source code of this file.

Classes

class  xms::MeIntersectPolys::impl
 Does polygon intersection for MePolyCleaner. More...
 

Macros

#define T_TOL   1e-13
 tolerance used in multipoly intersector
 
#define TOLERANCE   1e9
 tolerance used in PolyOffsetter
 

Functions

static GmBstBox3d xms::iCalcPolyEnvelope (const std::vector< size_t > &a_loop, const std::vector< Pt3d > &a_pts)
 Returns the envelop of a polygon. More...
 
static bool xms::iEnvelopesOverlap (size_t a_i, size_t a_j, const std::vector< GmBstBox3d > &a_iEnv, const std::vector< GmBstBox3d > &a_jEnv)
 Returns true only if the envelopes overlap (not touch) More...
 
static bool xms::iEnvelopeInsideOfEnvelope (size_t a_i, size_t a_j, const std::vector< GmBstBox3d > &a_envelopes)
 Returns true if envelope a_i is inside of envelope a_j. More...
 

Detailed Description

Definition in file MeIntersectPolys.cpp.

Function Documentation

◆ iCalcPolyEnvelope()

static GmBstBox3d xms::iCalcPolyEnvelope ( const std::vector< size_t > &  a_loop,
const std::vector< Pt3d > &  a_pts 
)
static

Returns the envelop of a polygon.

Parameters
a_loopVector of point indexes defining a polygon.
a_ptsVector of locations. The indexes in a_loop refer to this vector.
Returns
Returns the envelop of a polygon.

Definition at line 110 of file MeIntersectPolys.cpp.

References xms::iCalcPolyEnvelope(), xms::Pt3< T >::x, and xms::Pt3< T >::y.

Referenced by xms::MeIntersectPolys::impl::BoostPolySubtract(), xms::MeIntersectPolys::impl::BoostPolyUnion(), xms::MeIntersectPolys::CalcEnvelopes(), and xms::iCalcPolyEnvelope().

◆ iEnvelopeInsideOfEnvelope()

static bool xms::iEnvelopeInsideOfEnvelope ( size_t  a_i,
size_t  a_j,
const std::vector< GmBstBox3d > &  a_envelopes 
)
static

Returns true if envelope a_i is inside of envelope a_j.

Parameters
a_iIndex to an envelope from a polygon.
a_jIndex to an envelope from a polygon.
a_envelopesVector of envelopes used by the a_i & a_j variables.
Returns
Returns true if envelope a_i is inside of envelope a_j

Definition at line 159 of file MeIntersectPolys.cpp.

References xms::iEnvelopeInsideOfEnvelope(), xms::Pt3< T >::x, and xms::Pt3< T >::y.

Referenced by xms::MeIntersectPolys::impl::ClassifyPolysInsideOfPolys(), and xms::iEnvelopeInsideOfEnvelope().

◆ iEnvelopesOverlap()

static bool xms::iEnvelopesOverlap ( size_t  a_i,
size_t  a_j,
const std::vector< GmBstBox3d > &  a_iEnv,
const std::vector< GmBstBox3d > &  a_jEnv 
)
static

Returns true only if the envelopes overlap (not touch)

Parameters
a_iIndex to an envelope from a polygon.
a_jIndex to an envelope from a polygon.
a_iEnvVector of envelopes used by the a_i variable.
a_jEnvVector of envelopes used by the a_j variable.
Returns
Returns true only if the envelopes overlap (not touch)

Definition at line 141 of file MeIntersectPolys.cpp.

References xms::iEnvelopesOverlap(), xms::Pt3< T >::x, and xms::Pt3< T >::y.

Referenced by xms::MeIntersectPolys::impl::ClassifyDisjointPolys(), xms::iEnvelopesOverlap(), xms::MeIntersectPolys::impl::InInDoIntersection(), and xms::MeIntersectPolys::impl::InOutFindIntersectingPolys().