Loading...
Searching...
No Matches
Elementary Computational Geometry (CGElem)
Collaboration diagram for Elementary Computational Geometry (CGElem):
const double bitpit::CGElem::DEFAULT_DISTANCE_TOLERANCE = 1.e-12
 
const double bitpit::CGElem::DEFAULT_COPLANARITY_TOLERANCE = 1.e-12
 
const std::array< std::array< int, 2 >, 12 > bitpit::CGElem::boxEdgeVertexConnectivity
 
const std::array< std::array< int, 4 >, 6 > bitpit::CGElem::boxFaceVertexConnectivity
 
bool bitpit::CGElem::validSegment (array3D const &, array3D const &)
 
bool bitpit::CGElem::validLine (array3D const &, array3D const &)
 
bool bitpit::CGElem::validPlane (array3D const &, array3D const &)
 
bool bitpit::CGElem::validTriangle (array3D const &, array3D const &, array3D const &)
 
bool bitpit::CGElem::validBarycentric (double const *, int)
 
int bitpit::CGElem::convertBarycentricToFlagSegment (std::array< double, 2 > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
int bitpit::CGElem::convertBarycentricToFlagSegment (const double *lambda, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
int bitpit::CGElem::convertBarycentricToFlagTriangle (std::array< double, 3 > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
int bitpit::CGElem::convertBarycentricToFlagTriangle (const double *lambda, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
int bitpit::CGElem::convertBarycentricToFlagPolygon (std::vector< double > const &, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
int bitpit::CGElem::convertBarycentricToFlagPolygon (std::size_t, double const *, double tolerance=DEFAULT_DISTANCE_TOLERANCE)
 
void bitpit::CGElem::computeGeneralizedBarycentric (array3D const &, std::vector< array3D > const &, std::vector< double > &)
 
void bitpit::CGElem::computeGeneralizedBarycentric (array3D const &, std::size_t, array3D const *, std::vector< double > &)
 
void bitpit::CGElem::computeGeneralizedBarycentric (array3D const &, std::size_t, array3D const *, double *)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricSegment (array3D const &, array3D const &, std::array< double, 2 > const &)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricSegment (array3D const &, array3D const &, double const *)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricTriangle (array3D const &, array3D const &, array3D const &, std::array< double, 3 > const &)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricTriangle (array3D const &, array3D const &, array3D const &, double const *)
 
array3D bitpit::CGElem::rotatePoint (const array3D &P, const array3D &n0, const array3D &n1, double angle)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon (std::vector< array3D > const &, std::vector< double > const &)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon (std::size_t, array3D const *, std::vector< double > const &)
 
array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon (std::size_t, array3D const *, double const *)
 
array3D bitpit::CGElem::projectPointLine (array3D const &, array3D const &, array3D const &)
 
array3D bitpit::CGElem::projectPointPlane (array3D const &, array3D const &, array3D const &)
 
array3D bitpit::CGElem::projectPointSegment (array3D const &, array3D const &, array3D const &)
 
array3D bitpit::CGElem::projectPointSegment (array3D const &, array3D const &, array3D const &, std::array< double, 2 > &)
 
array3D bitpit::CGElem::projectPointSegment (array3D const &, array3D const &, array3D const &, double *)
 
array3D bitpit::CGElem::projectPointTriangle (array3D const &, array3D const &, array3D const &, array3D const &)
 
array3D bitpit::CGElem::projectPointTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D &)
 
array3D bitpit::CGElem::projectPointTriangle (array3D const &P, array3D const &Q0, array3D const &Q1, array3D const &Q2, double *lambda)
 
array3D bitpit::CGElem::restrictPointTriangle (array3D const &, array3D const &, array3D const &, array3D &)
 
array3D bitpit::CGElem::restrictPointTriangle (array3D const &, array3D const &, array3D const &, double *)
 
std::vector< array3D > bitpit::CGElem::projectCloudTriangle (std::vector< array3D > const &, array3D const &, array3D const &, array3D const &, std::vector< array3D > &)
 
array3D bitpit::CGElem::projectPointPolygon (array3D const &, std::vector< array3D > const &)
 
array3D bitpit::CGElem::projectPointPolygon (array3D const &, std::size_t, array3D const *)
 
array3D bitpit::CGElem::projectPointPolygon (array3D const &, std::vector< array3D > const &, std::vector< double > &)
 
array3D bitpit::CGElem::projectPointPolygon (array3D const &, std::size_t, array3D const *, std::vector< double > &)
 
array3D bitpit::CGElem::projectPointPolygon (array3D const &, std::size_t, array3D const *, double *)
 
array3D bitpit::CGElem::projectPointCone (array3D const &, array3D const &, array3D const &, double)
 
double bitpit::CGElem::distancePointLine (array3D const &, array3D const &, array3D const &, array3D &)
 
double bitpit::CGElem::distancePointPlane (array3D const &, array3D const &, array3D const &, array3D &)
 
double bitpit::CGElem::distancePointSegment (array3D const &, array3D const &, array3D const &)
 
double bitpit::CGElem::distancePointSegment (array3D const &, array3D const &, array3D const &, std::array< double, 2 > &)
 
double bitpit::CGElem::distancePointTriangle (array3D const &, array3D const &, array3D const &, array3D const &)
 
double bitpit::CGElem::distancePointTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D &)
 
double bitpit::CGElem::distancePointCone (array3D const &, array3D const &, array3D const &, double)
 
std::vector< double > bitpit::CGElem::distanceCloudTriangle (std::vector< array3D > const &, array3D const &, array3D const &, array3D const &)
 
std::vector< double > bitpit::CGElem::distanceCloudTriangle (std::vector< array3D > const &, array3D const &, array3D const &, array3D const &, std::vector< array3D > &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::vector< array3D > const &, array3D &, int &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::size_t, array3D const *, array3D &, int &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::vector< array3D > const &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::size_t, array3D const *)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::vector< array3D > const &, std::vector< double > &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::size_t, array3D const *, std::vector< double > &)
 
double bitpit::CGElem::distancePointPolygon (array3D const &, std::size_t, array3D const *, double *)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::vector< array3D > const &, std::vector< array3D > &, std::vector< int > &)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::size_t, array3D const *, std::vector< array3D > &, std::vector< int > &)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::vector< array3D > const &)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::size_t, array3D const *)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::vector< array3D > const &, std::vector< std::vector< double > > &)
 
std::vector< double > bitpit::CGElem::distanceCloudPolygon (std::vector< array3D > const &, std::size_t, array3D const *, std::vector< std::vector< double > > &)
 
double bitpit::CGElem::distanceLineLine (array3D const &, array3D const &, array3D const &, array3D const &)
 
double bitpit::CGElem::distanceLineLine (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
bool bitpit::CGElem::intersectLineLine (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentSegment (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectLinePlane (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double coplanarityTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentPlane (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePlane (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &, const double coplanarityTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlaneBox (array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPlaneBox (array3D const &, array3D const &, array3D const &, array3D const &, std::vector< array3D > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectLineTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectLinePolygon (array3D const &, array3D const &, std::vector< array3D > const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectLinePolygon (array3D const &, array3D const &, std::size_t, array3D const *, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentPolygon (array3D const &, array3D const &, std::vector< array3D > const &, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentPolygon (array3D const &, array3D const &, std::size_t, array3D const *, array3D &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePixel (array3D const &Pp, array3D const &nP, array3D const *V, std::array< array3D, 2 > &intersection, std::array< int, 2 > &edges_of_intersection, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePixel (array3D const &Pp, array3D const &nP, array3D const *V, std::array< array3D, 2 > &intersection, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePixel (array3D const &Pp, array3D const &nP, array3D const *V, std::array< array3D, 2 > &intersection, std::vector< array3D > &poly, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlaneTriangle (array3D const &P0, array3D const &P1, array3D const &P2, array3D const &Pp, array3D const &nP, std::array< array3D, 2 > &intersection, std::array< int, 2 > &edges_of_intersection, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlaneTriangle (array3D const &P0, array3D const &P1, array3D const &P2, array3D const &Pp, array3D const &nP, std::array< array3D, 2 > &intersection, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlaneTriangle (array3D const &P0, array3D const &P1, array3D const &P2, array3D const &Pp, array3D const &nP, std::array< array3D, 2 > &intersection, std::vector< array3D > &poly, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePolygon (array3D const &P, array3D const &nP, std::size_t nV, array3D const *V, std::vector< std::array< array3D, 2 > > &Qs, std::vector< std::array< int, 2 > > &edges_of_Qs, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePolygon (array3D const &P, array3D const &nP, std::size_t nV, array3D const *V, std::vector< std::array< array3D, 2 > > &Qs, const double distanceTolerance=DEFAULT_COPLANARITY_TOLERANCE)
 
bool bitpit::CGElem::intersectPlanePolygon (array3D const &P, array3D const &nP, std::size_t nV, array3D const *V, std::vector< std::array< array3D, 2 > > &Qs, std::vector< std::vector< array3D > > &polys, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
array3D bitpit::CGElem::computePolygonNormal (std::size_t nV, const array3D *V)
 
void bitpit::CGElem::reconstructPlaneIntersectedPolygons (std::size_t nV, array3D const *V, std::vector< std::array< array3D, 2 > > const &Qs, std::vector< std::array< int, 2 > > const &edges_of_Qs, std::vector< std::vector< array3D > > &polys, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxBox (array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxBox (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, bool, bool, bool, std::vector< array3D > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxTriangle (array3D const &, array3D const &, array3D const &, array3D const &, array3D const &, bool, bool, bool, std::vector< array3D > &, std::vector< int > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentBox (array3D const &, array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentBox (array3D const &, array3D const &, array3D const &, array3D const &, bool, bool, std::vector< array3D > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectSegmentBox (array3D const &, array3D const &, array3D const &, array3D const &, bool, bool, std::vector< array3D > &, std::vector< int > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::vector< array3D > const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::size_t, array3D const *, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::vector< array3D > const &, bool, bool, bool, std::vector< array3D > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::size_t, array3D const *, bool, bool, bool, std::vector< array3D > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::vector< array3D > const &, bool, bool, bool, std::vector< array3D > &, std::vector< int > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxPolygon (array3D const &, array3D const &, std::size_t, array3D const *, bool, bool, bool, std::vector< array3D > &, std::vector< int > &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxCircle (array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectBoxSphere (array3D const &A0, array3D const &A1, array3D const &centre, double radius, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPointLine (array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPointSegment (array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPointTriangle (array3D const &, array3D const &, array3D const &, array3D const &, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
bool bitpit::CGElem::intersectPointBox (array3D const &, array3D const &, array3D const &, int dim=3, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE)
 
void bitpit::CGElem::computeAABBSegment (array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::computeAABBTriangle (array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::computeAABBPolygon (std::vector< array3D > const &, array3D &, array3D &)
 
void bitpit::CGElem::computeAABBPolygon (std::size_t, array3D const *, array3D &, array3D &)
 
void bitpit::CGElem::unionAABB (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::unionAABB (std::vector< array3D > const &, std::vector< array3D > const &, array3D &, array3D &)
 
void bitpit::CGElem::intersectionAABB (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::subtractionAABB (array3D const &, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::vertexOfSegment (int, array3D const &, array3D const &, array3D &)
 
void bitpit::CGElem::vertexOfTriangle (int, array3D const &, array3D const &, array3D const &, array3D &)
 
void bitpit::CGElem::edgeOfTriangle (int, array3D const &, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::faceOfBox (int, array3D const &, array3D const &, array3D &, array3D &, array3D &, array3D &)
 
void bitpit::CGElem::edgeOfBox (int, array3D const &, array3D const &, array3D &, array3D &)
 
void bitpit::CGElem::vertexOfBox (int, array3D const &, array3D const &, array3D &)
 
array3D bitpit::CGElem::rotateVector (array3D const &, array3D const &, double)
 
double bitpit::CGElem::areaTriangle (array3D const &, array3D const &, array3D const &)
 
int bitpit::CGElem::polygonEdgesCount (std::vector< array3D > const &)
 
int bitpit::CGElem::polygonEdgesCount (std::size_t, array3D const *)
 
int bitpit::CGElem::polygonSubtriangleCount (std::vector< array3D > const &)
 
int bitpit::CGElem::polygonSubtriangleCount (std::size_t, array3D const *)
 
void bitpit::CGElem::edgeOfPolygon (int, std::vector< array3D > const &, array3D &, array3D &)
 
void bitpit::CGElem::edgeOfPolygon (int, std::size_t, array3D const *, array3D &, array3D &)
 
void bitpit::CGElem::subtriangleOfPolygon (int, std::vector< array3D > const &, array3D &, array3D &, array3D &)
 
void bitpit::CGElem::subtriangleOfPolygon (int, std::size_t, array3D const *, array3D &, array3D &, array3D &)
 

Detailed Description

Function Documentation

◆ areaTriangle()

double bitpit::CGElem::areaTriangle ( array3D const & a,
array3D const & b,
array3D const & c )

computes the area of an triangle

Parameters
[in]afirst vertex coordinates
[in]bsecond vertex coordinates
[in]cthird vertex coordinates

Definition at line 3634 of file CG_elem.cpp.

◆ computeAABBPolygon() [1/2]

void bitpit::CGElem::computeAABBPolygon ( std::size_t nVS,
array3D const * VS,
array3D & P0,
array3D & P1 )

computes axis aligned boundig box of a polygon

Parameters
[in]nVSnumber of polygon vertices
[in]VSpolygon vertices coordinates
[out]P0min point of bounding box
[out]P1max point of bounding box

Definition at line 3290 of file CG_elem.cpp.

◆ computeAABBPolygon() [2/2]

void bitpit::CGElem::computeAABBPolygon ( std::vector< array3D > const & VS,
array3D & P0,
array3D & P1 )

computes axis aligned boundig box of a polygon

Parameters
[in]VSpolygon vertices coordinates
[out]P0min point of bounding box
[out]P1max point of bounding box

Definition at line 3278 of file CG_elem.cpp.

◆ computeAABBSegment()

void bitpit::CGElem::computeAABBSegment ( array3D const & A,
array3D const & B,
array3D & P0,
array3D & P1 )

computes axis aligned boundig box of a segment

Parameters
[in]Astart point of segment
[in]Bend point of segment
[out]P0min point of bounding box
[out]P1max point of bounding box

Definition at line 3234 of file CG_elem.cpp.

◆ computeAABBTriangle()

void bitpit::CGElem::computeAABBTriangle ( array3D const & A,
array3D const & B,
array3D const & C,
array3D & P0,
array3D & P1 )

computes axis aligned boundig box of a triangle

Parameters
[in]Afirst vertex of triangle
[in]Bsecond vertex of triangle
[in]Cthird vertex of triangle
[out]P0min point of bounding box
[out]P1max point of bounding box

Definition at line 3256 of file CG_elem.cpp.

◆ computeGeneralizedBarycentric() [1/3]

void bitpit::CGElem::computeGeneralizedBarycentric ( array3D const & p,
std::size_t nVertices,
array3D const * vertex,
double * lambda )

Computes Generalized Barycentric Coordinates of a point in convex polygons or polyedra. No check is performed to check convexity. Formula [6] of this paper is implemented. This formula actually refers to the method of Eugene Wachpress in the manuscript A Rational Finite Elment Basis. Generalized Barycentric Coordinates cannot be evaluated for degenerate polygons (i.e. polygons with consecutive collinear edges). No checks are performed to find out if the specified polygon is degenerate.

Parameters
[in]ppoint
[in]nVerticesnumber of polygon vertices
[in]vertexvertex coordinates of polygon
[out]lambdageneralized barycentric coordinates of p

Definition at line 789 of file CG_elem.cpp.

◆ computeGeneralizedBarycentric() [2/3]

void bitpit::CGElem::computeGeneralizedBarycentric ( array3D const & p,
std::size_t nVertices,
array3D const * vertex,
std::vector< double > & lambda )

Computes Generalized Barycentric Coordinates of a point in convex polygons or polyedra. No check is performed to check convexity. Formula [6] of this paper is implemented. This formula actually refers to the method of Eugene Wachpress in the manuscript A Rational Finite Elment Basis. Generalized Barycentric Coordinates cannot be evaluated for degenerate polygons (i.e. polygons with consecutive collinear edges). No checks are performed to find out if the specified polygon is degenerate.

Parameters
[in]ppoint
[in]nVerticesnumber of polygon vertices
[in]vertexvertex coordinates of polygon
[out]lambdageneralized barycentric coordinates of p

Definition at line 769 of file CG_elem.cpp.

◆ computeGeneralizedBarycentric() [3/3]

void bitpit::CGElem::computeGeneralizedBarycentric ( array3D const & p,
std::vector< array3D > const & vertex,
std::vector< double > & lambda )

Computes Generalized Barycentric Coordinates of a point in convex polygons or polyedra. No check is performed to check convexity. Formula [6] of this paper is implemented. This formula actually refers to the method of Eugene Wachpress in the manuscript A Rational Finite Elment Basis. Generalized Barycentric Coordinates cannot be evaluated for degenerate polygons (i.e. polygons with consecutive collinear edges). No checks are performed to find out if the specified polygon is degenerate.

Parameters
[in]ppoint
[in]vertexvertex coordinates of polygon
[out]lambdageneralized barycentric coordinates of p

Definition at line 751 of file CG_elem.cpp.

◆ computePolygonNormal()

array3D bitpit::CGElem::computePolygonNormal ( std::size_t nV,
const array3D * V )

Compute a normal for the polygon, by looping on constitutive vertices and summing normals of triangles formed by the i-th vertex and its immediate neighbours i-1 and i+1. Lines (nV = 2) or Single Vertex (nV = 1) will return zero normal;

Parameters
[in]nVNumber of Vertices of the polygon
[in]VPointer to Vertices list array. Must have size nV.

Definition at line 2638 of file CG_elem.cpp.

◆ convertBarycentricToFlagPolygon() [1/2]

int bitpit::CGElem::convertBarycentricToFlagPolygon ( std::size_t nLambda,
double const * lambda,
double tolerance )

Converts barycentric coordinates of a point on a convex polygon to a flag that indicates where the point lies. Flag = 0 Point lies within the simplex Flag = i Point coincides with the (ith - 1) vertex of simplex or lies within the area spanned by the edges incident in the (ith - 1) vertex Flag = -i Point lies on the edge starting from the (ith - 1) vertex and connecting the following vertex in counter-clockwise direction or in its shaddowed area

Parameters
[in]nLambdanumber of barycentric coordinates of point
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 702 of file CG_elem.cpp.

◆ convertBarycentricToFlagPolygon() [2/2]

int bitpit::CGElem::convertBarycentricToFlagPolygon ( std::vector< double > const & lambda,
double tolerance )

Converts barycentric coordinates of a point on a convex polygon to a flag that indicates where the point lies. Flag = 0 Point lies within the simplex Flag = i Point coincides with the (ith - 1) vertex of simplex or lies within the area spanned by the edges incident in the (ith - 1) vertex Flag = -i Point lies on the edge starting from the (ith - 1) vertex and connecting the following vertex in counter-clockwise direction or in its shaddowed area

Parameters
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 687 of file CG_elem.cpp.

◆ convertBarycentricToFlagSegment() [1/2]

int bitpit::CGElem::convertBarycentricToFlagSegment ( const double * lambda,
double tolerance )

Converts barycentric coordinates of a point on a segment to a flag that indicates where the point lies. Flag = 0 Point lies within the segment Flag = 1 Point coincides with the first vertex or is positioned befor the line Flag = 2 Point coincides with the second vertex or is positioned after the line

Parameters
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 634 of file CG_elem.cpp.

◆ convertBarycentricToFlagSegment() [2/2]

int bitpit::CGElem::convertBarycentricToFlagSegment ( std::array< double, 2 > const & lambda,
double tolerance )

Converts barycentric coordinates of a point on a segment to a flag that indicates where the point lies. Flag = 0 Point lies within the segment Flag = 1 Point coincides with the first vertex or is positioned befor the line Flag = 2 Point coincides with the second vertex or is positioned after the line

Parameters
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 619 of file CG_elem.cpp.

◆ convertBarycentricToFlagTriangle() [1/2]

int bitpit::CGElem::convertBarycentricToFlagTriangle ( const double * lambda,
double tolerance )

Converts barycentric coordinates of a point on a triangle to a flag that indicates where the point lies. Flag = 0 Point lies within the triangle Flag = i Point coincides with the (ith - 1) vertex of triangle or lies within the area spanned by the edges incident in the (ith - 1) vertex Flag = -i Point lies on the edge starting from the (ith - 1) vertex and connecting the following vertex in clockwise direction or in its shaddowed area

Parameters
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 673 of file CG_elem.cpp.

◆ convertBarycentricToFlagTriangle() [2/2]

int bitpit::CGElem::convertBarycentricToFlagTriangle ( array3D const & lambda,
double tolerance )

Converts barycentric coordinates of a point on a triangle to a flag that indicates where the point lies. Flag = 0 Point lies within the triangle Flag = i Point coincides with the (ith - 1) vertex of triangle or lies within the area spanned by the edges incident in the (ith - 1) vertex Flag = -i Point lies on the edge starting from the (ith - 1) vertex and connecting the following vertex in clockwise direction or in its shaddowed area

Parameters
[in]lambdabarycentric coordinates of point
[in]tolerancetolerance used for comparisons
Returns
flag

Definition at line 659 of file CG_elem.cpp.

◆ distanceCloudPolygon() [1/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & P,
std::size_t nV,
array3D const * V )

Computes distances of point cloud to a convex polygon

Parameters
[in]Ppoint cloud coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
Returns
distance

Definition at line 1655 of file CG_elem.cpp.

◆ distanceCloudPolygon() [2/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & cloud,
std::size_t nV,
array3D const * V,
std::vector< array3D > & xP,
std::vector< int > & flag )

Computes distances of point cloud to a convex polygon

Parameters
[in]cloudpoint cloud coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]xPclosest points on simplex
[out]flagpoint projecting onto polygon's interior (flag = 0), polygon's vertices (flag = 1, 2, ...) or polygon's edges (flag = -1, -2, -...)
Returns
distance

Definition at line 1613 of file CG_elem.cpp.

◆ distanceCloudPolygon() [3/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & cloud,
std::size_t nV,
array3D const * V,
std::vector< std::vector< double > > & lambda )

Computes distances of point cloud to a convex polygon

Parameters
[in]cloudpoint cloud coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]lambdabarycentric coordinates of the projection points
Returns
distance

Definition at line 1694 of file CG_elem.cpp.

◆ distanceCloudPolygon() [4/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & P,
std::vector< array3D > const & V )

Computes distances of point cloud to a convex polygon

Parameters
[in]Ppoint cloud coordinates
[in]Vpolygon vertices coordinates
Returns
distance

Definition at line 1643 of file CG_elem.cpp.

◆ distanceCloudPolygon() [5/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & cloud,
std::vector< array3D > const & V,
std::vector< array3D > & xP,
std::vector< int > & flag )

Computes distances of point cloud to a convex polygon

Parameters
[in]cloudpoint cloud coordinates
[in]Vpolygon vertices coordinates
[out]xPclosest points on simplex
[out]flagpoint projecting onto polygon's interior (flag = 0), polygon's vertices (flag = 1, 2, ...) or polygon's edges (flag = -1, -2, -...)
Returns
distance

Definition at line 1599 of file CG_elem.cpp.

◆ distanceCloudPolygon() [6/6]

std::vector< double > bitpit::CGElem::distanceCloudPolygon ( std::vector< array3D > const & cloud,
std::vector< array3D > const & V,
std::vector< std::vector< double > > & lambda )

Computes distances of point cloud to a convex polygon

Parameters
[in]cloudpoint cloud coordinates
[in]Vpolygon vertices coordinates
[out]lambdabarycentric coordinates of the projection points
Returns
distance

Definition at line 1681 of file CG_elem.cpp.

◆ distanceCloudTriangle() [1/2]

std::vector< double > bitpit::CGElem::distanceCloudTriangle ( std::vector< array3D > const & cloud,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2 )

Computes distances of point cloud to triangle

Parameters
[in]cloudpoint cloud coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
Returns
distances

Definition at line 1454 of file CG_elem.cpp.

◆ distanceCloudTriangle() [2/2]

std::vector< double > bitpit::CGElem::distanceCloudTriangle ( std::vector< array3D > const & cloud,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
std::vector< array3D > & lambda )

Computes distances of point cloud to triangle

Parameters
[in]cloudpoint cloud coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[out]lambdabarycentric coordinates of projection points
Returns
distances

Definition at line 1469 of file CG_elem.cpp.

◆ distanceLineLine() [1/2]

double bitpit::CGElem::distanceLineLine ( array3D const & P0,
array3D const & n0,
array3D const & P1,
array3D const & n1 )

Computes distance between two lines in 3D

Parameters
[in]n0direction of first line
[in]P0point on first line
[in]n1direction of second line
[in]P1point on second line
Returns
distance

Definition at line 1729 of file CG_elem.cpp.

◆ distanceLineLine() [2/2]

double bitpit::CGElem::distanceLineLine ( array3D const & P0,
array3D const & n0,
array3D const & P1,
array3D const & n1,
array3D & xP0,
array3D & xP1 )

Computes distance between two lines in 3D

Parameters
[in]n0direction of first line
[in]P0point on first line
[in]n1direction of second line
[in]P1point on second line
[out]xP0projection of line1 on line0
[out]xP1projection of line0 on line1
Returns
distance

Definition at line 1745 of file CG_elem.cpp.

◆ distancePointCone()

double bitpit::CGElem::distancePointCone ( array3D const & point,
array3D const & apex,
array3D const & axis,
double alpha )

Computes distance point to semi-infinite cone surface

Parameters
[in]pointpoint coordinates
[in]apexcone apex
[in]axiscone axis
[in]alphacone half angle
Returns
distance

Definition at line 1440 of file CG_elem.cpp.

◆ distancePointLine()

double bitpit::CGElem::distancePointLine ( array3D const & P,
array3D const & Q,
array3D const & n,
array3D & xP )

Computes distance point to line in 3D

Parameters
[in]Ppoint coordinates
[in]Qpoint on line
[in]nline direction
[out]xPclosest point on line
Returns
distance

Definition at line 1356 of file CG_elem.cpp.

◆ distancePointPlane()

double bitpit::CGElem::distancePointPlane ( array3D const & P,
array3D const & Q,
array3D const & n,
array3D & xP )

Computes distance point to plane

Parameters
[in]Ppoint coordinates
[in]Qpoint on plane
[in]nplane normal
[out]xPclosest point on line
Returns
distance

Definition at line 1370 of file CG_elem.cpp.

◆ distancePointPolygon() [1/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vsimplex vertices coordinates
Returns
distance

Definition at line 1544 of file CG_elem.cpp.

◆ distancePointPolygon() [2/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V,
array3D & xP,
int & flag )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]xPclosest points on polygon
[out]flagpoint projecting onto polygon's interior (flag = 0), polygon's vertices (flag = 1, 2, ...) or polygon's edges (flag = -1, -2, -...)
Returns
distance

Definition at line 1514 of file CG_elem.cpp.

◆ distancePointPolygon() [3/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V,
double * lambda )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]lambdabarycentric coordinates
Returns
distance

Definition at line 1585 of file CG_elem.cpp.

◆ distancePointPolygon() [4/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V,
std::vector< double > & lambda )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]lambdabarycentric coordinates
Returns
distance

Definition at line 1570 of file CG_elem.cpp.

◆ distancePointPolygon() [5/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::vector< array3D > const & V )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]Vsimplex vertices coordinates
Returns
distance

Definition at line 1532 of file CG_elem.cpp.

◆ distancePointPolygon() [6/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::vector< array3D > const & V,
array3D & xP,
int & flag )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]Vpolygon vertices coordinates
[out]xPclosest points on polygon
[out]flagpoint projecting onto polygon's interior (flag = 0), polygon's vertices (flag = 1, 2, ...) or polygon's edges (flag = -1, -2, -...)
Returns
distance

Definition at line 1500 of file CG_elem.cpp.

◆ distancePointPolygon() [7/7]

double bitpit::CGElem::distancePointPolygon ( array3D const & P,
std::vector< array3D > const & V,
std::vector< double > & lambda )

Computes distances of point to a convex polygon

Parameters
[in]Ppoint coordinates
[in]Vpolygon vertices coordinates
[out]lambdabarycentric coordinates
Returns
distance

Definition at line 1557 of file CG_elem.cpp.

◆ distancePointSegment() [1/2]

double bitpit::CGElem::distancePointSegment ( array3D const & P,
array3D const & Q0,
array3D const & Q1 )

Computes distance point to segment

Parameters
[in]Ppoint coordinates
[in]Q0segment starting point
[in]Q1segment ending point
Returns
distance

Definition at line 1383 of file CG_elem.cpp.

◆ distancePointSegment() [2/2]

double bitpit::CGElem::distancePointSegment ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
std::array< double, 2 > & lambda )

Computes distance point to segment in 3D using barycentric coordinates

Parameters
[in]Ppoint coordinates
[in]Q0segment starting point
[in]Q1segment ending point
[out]lambdabarycentric coordinates
Returns
distance

Definition at line 1397 of file CG_elem.cpp.

◆ distancePointTriangle() [1/2]

double bitpit::CGElem::distancePointTriangle ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2 )

Computes distance point to triangle

Parameters
[in]Ppoint coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
Returns
distance

Definition at line 1411 of file CG_elem.cpp.

◆ distancePointTriangle() [2/2]

double bitpit::CGElem::distancePointTriangle ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
array3D & lambda )

Computes distance point to triangle

Parameters
[in]Ppoint coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[out]lambdabarycentric coordinates of projection point
Returns
distance

Definition at line 1426 of file CG_elem.cpp.

◆ edgeOfBox()

void bitpit::CGElem::edgeOfBox ( int i,
array3D const & A0,
array3D const & A1,
array3D & P0,
array3D & P1 )

computes the edge coordiantes of a box

Parameters
[in]iedge index
[in]A0min point of bounding box
[in]A1max point of bounding box
[out]P0first vertex of edge
[out]P1first vertex of edge

Definition at line 3526 of file CG_elem.cpp.

◆ edgeOfPolygon() [1/2]

void bitpit::CGElem::edgeOfPolygon ( int edge,
std::size_t nV,
array3D const * V,
array3D & V0,
array3D & V1 )

Gets the edge coordinates of a convex polygon

Parameters
[in]edgeindex
[in]nVnumber of polygon vertices
[in]Vpolgon vertices
[in]V0first vertice coordinates of edge
[in]V1second vertice coordinates of edge

Definition at line 3711 of file CG_elem.cpp.

◆ edgeOfPolygon() [2/2]

void bitpit::CGElem::edgeOfPolygon ( int edge,
std::vector< array3D > const & V,
array3D & V0,
array3D & V1 )

Gets the edge coordinates of a convex polygon

Parameters
[in]edgeindex
[in]Vpolgon vertices
[in]V0first vertice coordinates of edge
[in]V1second vertice coordinates of edge

Definition at line 3698 of file CG_elem.cpp.

◆ edgeOfTriangle()

void bitpit::CGElem::edgeOfTriangle ( int i,
array3D const & V0,
array3D const & V1,
array3D const & V2,
array3D & P0,
array3D & P1 )

computes the edge coordiantes of a triangle

Parameters
[in]iedge index
[in]V0first vertex of triangle
[in]V1second vertex of triangle
[in]V2third vertex of triangle
[out]P0first vertex of edge
[out]P1first vertex of edge

Definition at line 3463 of file CG_elem.cpp.

◆ faceOfBox()

void bitpit::CGElem::faceOfBox ( int i,
array3D const & A0,
array3D const & A1,
array3D & P0,
array3D & P1,
array3D & P2,
array3D & P3 )

computes the face coordiantes of a box

Parameters
[in]iface index
[in]A0min point of bounding box
[in]A1max point of bounding box
[out]P0first vertex of face
[out]P1first vertex of face
[out]P2first vertex of face
[out]P3first vertex of face

Definition at line 3500 of file CG_elem.cpp.

◆ intersectBoxBox() [1/2]

bool bitpit::CGElem::intersectBoxBox ( array3D const & A1,
array3D const & A2,
array3D const & B1,
array3D const & B2,
array3D & I1,
array3D & I2,
int dim,
const double distanceTolerance )

Computes intersection between two axis aligned bounding boxes

Parameters
[in]A1min point of first box
[in]A2max point of first box
[in]B1min point of second box
[in]B2max point of second box
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]I1min point of intersection box
[out]I2max point of intersection box
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2795 of file CG_elem.cpp.

◆ intersectBoxBox() [2/2]

bool bitpit::CGElem::intersectBoxBox ( array3D const & A1,
array3D const & A2,
array3D const & B1,
array3D const & B2,
int dim,
const double distanceTolerance )

Computes intersection between two axis aligned bounding boxes

Parameters
[in]A1min point of first box
[in]A2max point of first box
[in]B1min point of second box
[in]B2max point of second box
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2772 of file CG_elem.cpp.

◆ intersectBoxCircle()

bool bitpit::CGElem::intersectBoxCircle ( array3D const & A0,
array3D const & A1,
array3D const & centre,
double radius,
const double distanceTolerance )

Checks it the axis aligned bounding box intersects the circle.

Parameters
[in]A0min point of box
[in]A1max point of box
[in]centreis the centre of the circle
[in]radiusis the radius of the circle
[in]distanceToleranceis the tolerance used to checking the intersection
Returns
Returns true if the box intersects the circle, false otherwise.

Definition at line 3037 of file CG_elem.cpp.

◆ intersectBoxPolygon() [1/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::size_t nVS,
array3D const * VS,
bool innerPolygonPoints,
bool polygonEdgeBoxFaceIntersections,
bool polygonBoxEdgeIntersections,
std::vector< array3D > & P,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a convex polygon

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]nVSnumber of polygon vertices
[in]VSpolygon vertices coordinates
[in]innerPolygonPointssimplex vertices within the box should be added to the intersection list
[in]polygonEdgeBoxFaceIntersectionsintersection between the edges of the polygon and the hull of the box should be added to the intersection list
[in]polygonBoxEdgeIntersectionsintersection between the polygon and the edges of the box should be added to the intersection list
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2983 of file CG_elem.cpp.

◆ intersectBoxPolygon() [2/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::size_t nVS,
array3D const * VS,
bool innerPolygonPoints,
bool polygonEdgeBoxFaceIntersections,
bool polygonBoxEdgeIntersections,
std::vector< array3D > & P,
std::vector< int > & flag,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a simplex

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]nVSnumber of polygon vertices
[in]VSsimplex vertices coordinates
[in]innerPolygonPointssimplex vertices within the box should be added to the intersection list
[in]polygonEdgeBoxFaceIntersectionsintersection between the edges of the polygon and the hull of the box should be added to the intersection list
[in]polygonBoxEdgeIntersectionsintersection between the polygon and the edges of the box should be added to the intersection list
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[out]flaghas the same size of P. If the ith flag=0, the intersection is due to innerPolygonPoints. If the ith flag=1, the intersection is due to polygonEdgeBoxFaceIntersections. If the ith flag=2, the intersection is due to polygonBoxEdgeIntersections.
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 3022 of file CG_elem.cpp.

◆ intersectBoxPolygon() [3/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::size_t nVS,
array3D const * VS,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a simplex

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]nVSnumber of polygon vertices
[in]VSsimplex vertices coordinates
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2945 of file CG_elem.cpp.

◆ intersectBoxPolygon() [4/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::vector< array3D > const & VS,
bool innerPolygonPoints,
bool polygonEdgeBoxFaceIntersections,
bool polygonBoxEdgeIntersections,
std::vector< array3D > & P,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a convex polygon

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]VSpolygon vertices coordinates
[in]innerPolygonPointssimplex vertices within the box should be added to the intersection list
[in]polygonEdgeBoxFaceIntersectionsintersection between the edges of the polygon and the hull of the box should be added to the intersection list
[in]polygonBoxEdgeIntersectionsintersection between the polygon and the edges of the box should be added to the intersection list
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2963 of file CG_elem.cpp.

◆ intersectBoxPolygon() [5/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::vector< array3D > const & VS,
bool innerPolygonPoints,
bool polygonEdgeBoxFaceIntersections,
bool polygonBoxEdgeIntersections,
std::vector< array3D > & P,
std::vector< int > & flag,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a simplex

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]VSsimplex vertices coordinates
[in]innerPolygonPointssimplex vertices within the box should be added to the intersection list
[in]polygonEdgeBoxFaceIntersectionsintersection between the edges of the polygon and the hull of the box should be added to the intersection list
[in]polygonBoxEdgeIntersectionsintersection between the polygon and the edges of the box should be added to the intersection list
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[out]flaghas the same size of P. If the ith flag=0, the intersection is due to innerPolygonPoints. If the ith flag=1, the intersection is due to polygonEdgeBoxFaceIntersections. If the ith flag=2, the intersection is due to polygonBoxEdgeIntersections.
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 3002 of file CG_elem.cpp.

◆ intersectBoxPolygon() [6/6]

bool bitpit::CGElem::intersectBoxPolygon ( array3D const & A0,
array3D const & A1,
std::vector< array3D > const & VS,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a simplex

Parameters
[in]A0min point of first box
[in]A1max point of first box
[in]VSsimplex vertices coordinates
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2931 of file CG_elem.cpp.

◆ intersectBoxSphere()

bool bitpit::CGElem::intersectBoxSphere ( array3D const & A0,
array3D const & A1,
array3D const & centre,
double radius,
const double distanceTolerance )

Checks it the axis aligned bounding box intersects the sphere.

Parameters
[in]A0min point of box
[in]A1max point of box
[in]centreis the centre of the sphere
[in]radiusis the radius of the sphere
[in]distanceToleranceis the tolerance used to checking the intersection
Returns
Returns true if the box intersects the sphere, false otherwise.

Definition at line 3063 of file CG_elem.cpp.

◆ intersectBoxTriangle() [1/3]

bool bitpit::CGElem::intersectBoxTriangle ( array3D const & A0,
array3D const & A1,
array3D const & V0,
array3D const & V1,
array3D const & V2,
bool interiorTriangleVertices,
bool triangleEdgeBoxFaceIntersections,
bool triangleBoxEdgeIntersections,
std::vector< array3D > & P,
int dim,
const double distanceTolerance )

Checks if an axis aligned bounding box and a triangle intersect

Parameters
[in]A0min point of box
[in]A1max point of box
[in]V0first vertex of triangle
[in]V1second vertex of triangle
[in]V2third vertex of triangle
[in]interiorTriangleVerticesif true, all triangle vertices within the box will be added to the intersection points P
[in]triangleEdgeBoxFaceIntersectionsif true, the intersections between the edges of the triangle and the hull of the box will be added to the intersection points P
[in]triangleBoxEdgeIntersectionsif true, the intersections between the edges (dim=3) or vertices (dim=2) of the box and the triangle will be added to the intersection points P
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2844 of file CG_elem.cpp.

◆ intersectBoxTriangle() [2/3]

bool bitpit::CGElem::intersectBoxTriangle ( array3D const & A0,
array3D const & A1,
array3D const & V0,
array3D const & V1,
array3D const & V2,
bool interiorTriangleVertices,
bool triangleEdgeBoxHullIntersections,
bool triangleBoxEdgeIntersections,
std::vector< array3D > & P,
std::vector< int > & flag,
int dim,
const double distanceTolerance )

Checks if an axis aligned bounding box and a triangle intersect

Parameters
[in]A0min point of box
[in]A1max point of box
[in]V0first vertex of triangle
[in]V1second vertex of triangle
[in]V2third vertex of triangle
[in]interiorTriangleVerticesif true, all triangle vertices within the box will be added to the intersection points P
[in]triangleEdgeBoxHullIntersectionsif true, the intersections between the edges of the triangle and the outer hull of the box will be added to the intersection points P
[in]triangleBoxEdgeIntersectionsif true, the intersections between the edges (dim=3) or vertices (dim=2) of the box and the triangle will be added to the intersection points P
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pcalculated intersection points
[out]flaghas the same size of P. If the ith flag=0, the intersection is due to interiorTriangleVertices. If the ith flag=1, the intersection is due to triangleEdgeBoxHullIntersection. If the ith flag=2, the intersection is due to triangleBoxEdgeIntersections.
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2865 of file CG_elem.cpp.

◆ intersectBoxTriangle() [3/3]

bool bitpit::CGElem::intersectBoxTriangle ( array3D const & A0,
array3D const & A1,
array3D const & V0,
array3D const & V1,
array3D const & V2,
int dim,
const double distanceTolerance )

Checks if an axis aligned bounding box and a triangle intersect

Parameters
[in]A0min point of box
[in]A1max point of box
[in]V0first vertex of triangle
[in]V1second vertex of triangle
[in]V2third vertex of triangle
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2824 of file CG_elem.cpp.

◆ intersectionAABB()

void bitpit::CGElem::intersectionAABB ( array3D const & A0,
array3D const & A1,
array3D const & B0,
array3D const & B1,
array3D & C0,
array3D & C1 )

computes the bounding box of the intersection of two axis aligned bounding boxes

Parameters
[in]A0min point of first bounding box
[in]A1max point of first bounding box
[in]B0min point of second bounding box
[in]B1max point of second bounding box
[out]C0min point of intersection of boxes
[out]C1max point of intersection of boxes

Definition at line 3357 of file CG_elem.cpp.

◆ intersectLineLine()

bool bitpit::CGElem::intersectLineLine ( array3D const & P1,
array3D const & n1,
array3D const & P2,
array3D const & n2,
array3D & P,
double distanceTolerance )

Computes intersection between two lines in 3D

Parameters
[in]n1direction of first line
[in]P1point on first line
[in]n2direction of second line
[in]P2point on second line
[out]Pintersection point if intersect, else unaltered
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 1787 of file CG_elem.cpp.

◆ intersectLinePlane()

bool bitpit::CGElem::intersectLinePlane ( array3D const & P1,
array3D const & n1,
array3D const & P2,
array3D const & n2,
array3D & P,
const double coplanarityTolerance )

Computes intersection between line and plane

Parameters
[in]P1point on line
[in]n1direction of line
[in]P2point on plane
[in]n2normal to plane
[in]coplanarityToleranceif angle between the line and plane is less than this value, they are considered as coplanar and not intersecting
[out]Pintersection point if intersect, else unaltered
Returns
if intersect

Definition at line 1839 of file CG_elem.cpp.

◆ intersectLinePolygon() [1/2]

bool bitpit::CGElem::intersectLinePolygon ( array3D const & P,
array3D const & n,
std::size_t nV,
array3D const * V,
array3D & Q,
const double distanceTolerance )

Computes intersection between triangle and a convex polygon

Parameters
[in]Ppoint on line
[in]ndirection of line
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 2057 of file CG_elem.cpp.

◆ intersectLinePolygon() [2/2]

bool bitpit::CGElem::intersectLinePolygon ( array3D const & P,
array3D const & n,
std::vector< array3D > const & V,
array3D & Q,
const double distanceTolerance )

Computes intersection between triangle and a convex polygon

Parameters
[in]Ppoint on line
[in]ndirection of line
[in]Vpolygon vertices coordinates
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 2042 of file CG_elem.cpp.

◆ intersectLineTriangle()

bool bitpit::CGElem::intersectLineTriangle ( array3D const & P,
array3D const & n,
array3D const & A,
array3D const & B,
array3D const & C,
array3D & Q,
const double distanceTolerance )

Computes intersection between triangle and a line

Parameters
[in]Ppoint on plane
[in]nnormal to plane
[in]Afirst vertex of triangle
[in]Bsecond vertex of triangle
[in]Cthird vertex of triangle
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 1988 of file CG_elem.cpp.

◆ intersectPlaneBox() [1/2]

bool bitpit::CGElem::intersectPlaneBox ( array3D const & P1,
array3D const & n1,
array3D const & A0,
array3D const & A1,
int dim,
const double distanceTolerance )

Computes if plane a box intersect

Parameters
[in]P1point on first plane
[in]n1normal to first plane
[in]A0min point of box
[in]A1max point of box
[in]dimnumber of dimensions
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 1954 of file CG_elem.cpp.

◆ intersectPlaneBox() [2/2]

bool bitpit::CGElem::intersectPlaneBox ( array3D const & P1,
array3D const & n1,
array3D const & A0,
array3D const & A1,
std::vector< array3D > & intersects,
int dim,
const double distanceTolerance )

Computes if plane a box intersect and intersection points between plane and edges of box

Parameters
[in]P1point on first plane
[in]n1normal to first plane
[in]A0min point of box
[in]A1max point of box
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]intersectsintersection points
[in]dimnumber of dimensions
Returns
if intersect

Definition at line 1971 of file CG_elem.cpp.

◆ intersectPlanePixel() [1/3]

bool bitpit::CGElem::intersectPlanePixel ( array3D const & Pp,
array3D const & nP,
array3D const * V,
std::array< array3D, 2 > & intersection,
const double distanceTolerance )

Check if a pixel is crossing a given plane and fully calculate the intersection (a segment) with edges, eventually. A pixel is defined as a planar rectangular of arbitrary orientation. The polygon created from the intersection belongs to the subspace opposite of the one pointed by the plane's normal.

Co-planarity of input pixel and plane will produce no intersection. Also, no intersection is considered if the plane passes from a pixel's vertex, being their only common point.

Parameters
[in]Pppoint belonging to the plane
[in]nPnormal to plane
[in]Vis a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules
[out]intersectionIf intersects, return the cutting segment
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersects

Definition at line 2203 of file CG_elem.cpp.

◆ intersectPlanePixel() [2/3]

bool bitpit::CGElem::intersectPlanePixel ( array3D const & Pp,
array3D const & nP,
array3D const * V,
std::array< array3D, 2 > & intersection,
std::array< int, 2 > & edges_of_intersection,
const double distanceTolerance )

Check if a pixel is crossing a given plane and fully calculate the intersection (a segment) with edges, eventually. A pixel is defined as a planar rectangular of arbitrary orientation. The polygon created from the intersection belongs to the subspace opposite to the one pointed by the plane's normal.

Co-planarity of input pixel and plane will produce no intersection. Also, no intersection is considered if the plane passes from a pixel's vertex, being their only common point.

Parameters
[in]Pppoint belonging to the plane
[in]nPunit normal to plane
[in]Vis a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules
[out]intersectionIf intersects, return the cutting segment
[out]edges_of_intersectionIf intersects, return the pixel edge local indices, of the intersected edges. If no intersection occurs return a -1 label. Attention, edges are numbered based on the pixel face ordering.
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersects

Definition at line 2138 of file CG_elem.cpp.

◆ intersectPlanePixel() [3/3]

bool bitpit::CGElem::intersectPlanePixel ( array3D const & Pp,
array3D const & nP,
array3D const * V,
std::array< array3D, 2 > & intersection,
std::vector< array3D > & poly,
const double distanceTolerance )

Check if a pixel is crossing a given plane and fully calculate the intersection (a segment) with edges, eventually. A pixel is defined as a planar rectangular of arbitrary orientation. The polygon created from the intersection belongs to the subspace opposite of the one pointed by the plane's normal.

Co-planarity of input pixel and plane will produce no intersection. Also, no intersection is considered if the plane passes from a pixel's vertex, being their only common point.

Parameters
[in]Pppoint belonging to the plane
[in]nPnormal to plane
[in]Vis a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules
[out]intersectionIf intersects, return the cutting segment
[out]polyis the polygon constructed by the pixel intersection placed on the
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersects

Definition at line 2229 of file CG_elem.cpp.

◆ intersectPlanePlane()

bool bitpit::CGElem::intersectPlanePlane ( array3D const & P1,
array3D const & n1,
array3D const & P2,
array3D const & n2,
array3D & Pl,
array3D & nl,
const double coplanarityTolerance )

Computes intersection between two planes

Parameters
[in]P1point on first plane
[in]n1normal to first plane
[in]P2point on second plane
[in]n2normal to second plane
[out]Plpoint on intersection line
[out]nldirection of intersection line
[in]coplanarityToleranceif angle between planes is less than this value, they are considered as coplanar and not intersecting
Returns
if intersect

Definition at line 1902 of file CG_elem.cpp.

◆ intersectPlanePolygon() [1/3]

bool bitpit::CGElem::intersectPlanePolygon ( array3D const & P,
array3D const & nP,
std::size_t nV,
array3D const * V,
std::vector< std::array< array3D, 2 > > & Qs,
const double distanceTolerance )

Computes intersection between a plane and a polygon. The polygon can be planar or not, convex or concave.

Parameters
[in]Ppoint belonging to the plane
[in]nPnormal to the plane
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]Qsa collection of edges defined by the intersection points
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2582 of file CG_elem.cpp.

◆ intersectPlanePolygon() [2/3]

bool bitpit::CGElem::intersectPlanePolygon ( array3D const & P,
array3D const & nP,
std::size_t nV,
array3D const * V,
std::vector< std::array< array3D, 2 > > & Qs,
std::vector< std::array< int, 2 > > & edges_of_Qs,
const double distanceTolerance )

Computes polygon intersections with a plane. The polygon is triangulated and intersections between the triangles and the plane are computed. Intersections are considered only between the polygonal edges and the plane and not between an edge serving the polygon triangulation. If intersection occurrs, it can be a single segment (convex, planar polygon) or a collection of segments. Co-planarity of polygon and plane will be treated as a no-intersection case. If no intersections occurr, an empty intersection list will be returned.

Parameters
[in]PPoint belonging to the plane
[in]nPNormal to the plane
[in]nVNumber of vertices of the polygon
[in]VPointer to vertices list array. Must have size nV.
[out]QsIf intersects, return a non-empty list of intersecting Segments.
[out]edges_of_QsIf intersects, return the list of polygon edges couple "touched" by the intersecting segment, one for each intersecting segment.
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2460 of file CG_elem.cpp.

◆ intersectPlanePolygon() [3/3]

bool bitpit::CGElem::intersectPlanePolygon ( array3D const & P,
array3D const & nP,
std::size_t nV,
array3D const * V,
std::vector< std::array< array3D, 2 > > & Qs,
std::vector< std::vector< array3D > > & polys,
const double distanceTolerance )

Computes intersection between a plane and a polygon. The polygon can be planar or not, convex or concave. The part of the polygon belonging to the subspace defined by the given plane is constructed. Its part belonging to the subspace pointed by the given normal is neglected.

Parameters
[in]Ppoint belonging to the plane
[in]nPnormal to the plane
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]Qsa collection of edges defined by the intersection points
[out]polyspolygons created by the intersection
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2602 of file CG_elem.cpp.

◆ intersectPlaneTriangle() [1/3]

bool bitpit::CGElem::intersectPlaneTriangle ( array3D const & P0,
array3D const & P1,
array3D const & P2,
array3D const & Pp,
array3D const & nP,
std::array< array3D, 2 > & intersection,
const double distanceTolerance )

Check if a triangle is crossing a given plane and fully calculate the intersections a segment. Co-planarity of input triangle and plane will produce no intersection.

Parameters
[in]P0First triangle vertex
[in]P1Second triangle vertex
[in]P2Third triangle vertex
[in]PpPoint belonging to the plane
[in]nPNormal to the plane
[out]intersectionIf intersects, return the cutting segment.
[in]distanceTolerancedefine a distance tolerance so that if a polygon and the plane are at distance below such threshold they are considered intersecting.
Returns
True if intersection occurs, false if not

Definition at line 2359 of file CG_elem.cpp.

◆ intersectPlaneTriangle() [2/3]

bool bitpit::CGElem::intersectPlaneTriangle ( array3D const & P0,
array3D const & P1,
array3D const & P2,
array3D const & Pp,
array3D const & nP,
std::array< array3D, 2 > & intersection,
std::array< int, 2 > & edges_of_intersection,
const double distanceTolerance )

Check if a triangle is crossing a given plane and fully calculate the intersection (a segment) with edges, eventually. A pixel is defined as a planar rectangular, vertical to a cartesian axis. Co-planarity of input pixel and plane will produce no intersection.

Parameters
[in]P0First triangle vertex
[in]P1Second triangle vertex
[in]P2Third triangle vertex
[in]PpPoint belonging to the plane
[in]nPNormal to the plane
[out]intersectionIf intersects, return the cutting segment.
[out]edges_of_intersectionIf intersects, return the triangle edge local indices, touched by the intersection segment, one for each extremal point. If no intersection occurs return a -1 label.
[in]distanceTolerancedefine a distance tolerance so that if a polygon and the plane are at distance below such threshold they are considered intersecting.
Returns
True if intersection occurs, false if not

Definition at line 2309 of file CG_elem.cpp.

◆ intersectPlaneTriangle() [3/3]

bool bitpit::CGElem::intersectPlaneTriangle ( array3D const & P0,
array3D const & P1,
array3D const & P2,
array3D const & Pp,
array3D const & nP,
std::array< array3D, 2 > & intersection,
std::vector< array3D > & poly,
const double distanceTolerance )

Check if a triangle is crossing a given plane and fully calculate the intersection (a segment) with edges, eventually. Co-planarity of input triangle and plane will produce no intersection. Polygons on both sides of the plane are returned.

Parameters
[in]P0First triangle vertex
[in]P1Second triangle vertex
[in]P2Third triangle vertex
[in]PpPoint belonging to the plane
[in]nPNormal to the plane
[out]intersectionIf intersects, return the cutting segment.
[out]polyis the polygon constructed by the triangle intersection placed on the opposite subspace of the one pointed by the plane's normal
[in]distanceTolerancedefine a distance tolerance so that if a polygon and the plane are at distance below such threshold they are considered intersecting.
Returns
True if intersection occurs, false if not

Definition at line 2386 of file CG_elem.cpp.

◆ intersectPointBox()

bool bitpit::CGElem::intersectPointBox ( array3D const & P,
array3D const & B1,
array3D const & B2,
int dim,
const double distanceTolerance )

checks if points lies within axis aligned box

Parameters
[in]Ppoint coordinates
[in]B1min coodinates of box
[in]B2max coodinates of box
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if point in box

Definition at line 3215 of file CG_elem.cpp.

◆ intersectPointLine()

bool bitpit::CGElem::intersectPointLine ( array3D const & P,
array3D const & Q,
array3D const & n,
const double distanceTolerance )

checks if points lies on line defined by two given points in 3D

Parameters
[in]Ppoint coordinates
[in]Qpoint on line
[in]nline direction
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if point lies on segment

Definition at line 3157 of file CG_elem.cpp.

◆ intersectPointSegment()

bool bitpit::CGElem::intersectPointSegment ( array3D const & P,
array3D const & P1,
array3D const & P2,
const double distanceTolerance )

checks if points lies on segment in 3D

Parameters
[in]Ppoint coordinates
[in]P1start point of segment
[in]P2end point of segment
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if point lies on segment

Definition at line 3177 of file CG_elem.cpp.

◆ intersectPointTriangle()

bool bitpit::CGElem::intersectPointTriangle ( array3D const & P,
array3D const & A,
array3D const & B,
array3D const & C,
const double distanceTolerance )

checks if points lies on triangle

Parameters
[in]Ppoint coordinates
[in]Afirst vertex of triangle
[in]Bsecond vertex of triangle
[in]Cthird vertex of triangle
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if point lies on triangle

Definition at line 3196 of file CG_elem.cpp.

◆ intersectSegmentBox() [1/3]

bool bitpit::CGElem::intersectSegmentBox ( array3D const & V0,
array3D const & V1,
array3D const & A0,
array3D const & A1,
bool interiorSegmentVertice,
bool segmentBoxHullIntersection,
std::vector< array3D > & P,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a segment

Parameters
[in]V0start point of segment
[in]V1end point of segment
[in]A0min point of box
[in]A1max point of box
[in]interiorSegmentVerticeif the segment vertices within the box should be added to the list of intersection points
[in]segmentBoxHullIntersectionif the intersections between the segment and the outer hull of the box should be added to the list of intersection points
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Plist of intersection points. If no intersetion points should be calculated nullptr can be passed as argument
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2898 of file CG_elem.cpp.

◆ intersectSegmentBox() [2/3]

bool bitpit::CGElem::intersectSegmentBox ( array3D const & V0,
array3D const & V1,
array3D const & A0,
array3D const & A1,
bool interiorSegmentVertice,
bool segmentBoxHullIntersection,
std::vector< array3D > & P,
std::vector< int > & flag,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a segment

Parameters
[in]V0start point of segment
[in]V1end point of segment
[in]A0min point of box
[in]A1max point of box
[in]interiorSegmentVerticeif the segment vertices within the box should be added to the list of intersection points
[in]segmentBoxHullIntersectionif the intersections between the segment and the outer hull of the box should be added to the list of intersection points
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Plist of intersection points. If no intersetion points should be calculated nullptr can be passed as argument
[out]flagindicates for each intersection if it belongs to interiorSegmentVertice (flag=0) or segmentHullIntersection (flag=1)
[in]dimnumber of dimensions to be checked
Returns
if intersect

Definition at line 2917 of file CG_elem.cpp.

◆ intersectSegmentBox() [3/3]

bool bitpit::CGElem::intersectSegmentBox ( array3D const & V0,
array3D const & V1,
array3D const & A0,
array3D const & A1,
int dim,
const double distanceTolerance )

Computes intersection between an axis aligned bounding box and a segment

Parameters
[in]V0start point of segment
[in]V1end point of segment
[in]A0min point of box
[in]A1max point of box
[in]dimnumber of dimensions to be checked
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
Returns
if intersect

Definition at line 2880 of file CG_elem.cpp.

◆ intersectSegmentPlane()

bool bitpit::CGElem::intersectSegmentPlane ( array3D const & Q1,
array3D const & Q2,
array3D const & P2,
array3D const & n2,
array3D & P,
const double distanceTolerance )

Computes intersection between segment and plane

Parameters
[in]Q1start point of segment
[in]Q2end point of segment
[in]P2point on plane
[in]n2normal to plane
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Pintersection point if intersect, else unaltered
Returns
if intersect

Definition at line 1872 of file CG_elem.cpp.

◆ intersectSegmentPolygon() [1/2]

bool bitpit::CGElem::intersectSegmentPolygon ( array3D const & P0,
array3D const & P1,
std::size_t nV,
array3D const * V,
array3D & Q,
const double distanceTolerance )

Computes intersection between a segment and a polygon

Parameters
[in]P0start point of segment
[in]P1end point of segment
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 2099 of file CG_elem.cpp.

◆ intersectSegmentPolygon() [2/2]

bool bitpit::CGElem::intersectSegmentPolygon ( array3D const & P0,
array3D const & P1,
std::vector< array3D > const & V,
array3D & Q,
const double distanceTolerance )

Computes intersection between a segment and a polygon

Parameters
[in]P0start point of segment
[in]P1end point of segment
[in]Vpolygon vertices coordinates
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 2084 of file CG_elem.cpp.

◆ intersectSegmentSegment()

bool bitpit::CGElem::intersectSegmentSegment ( array3D const & P1,
array3D const & P2,
array3D const & Q1,
array3D const & Q2,
array3D & x,
double distanceTolerance )

Computes intersection between two segments in 3D

Parameters
[in]P1start point of first segment
[in]P2end point of first segment
[in]Q1start point of second segment
[in]Q2end point of second segment
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]xintersection point if intersect, else unaltered
Returns
if intersect

Definition at line 1808 of file CG_elem.cpp.

◆ intersectSegmentTriangle()

bool bitpit::CGElem::intersectSegmentTriangle ( array3D const & P0,
array3D const & P1,
array3D const & A,
array3D const & B,
array3D const & C,
array3D & Q,
const double distanceTolerance )

Computes intersection between triangle and a segment

Parameters
[in]P0start point of segment
[in]P1end point of segment
[in]Afirst vertex of triangle
[in]Bsecond vertex of triangle
[in]Cthird vertex of triangle
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting
[out]Qintersection point
Returns
if intersect

Definition at line 2016 of file CG_elem.cpp.

◆ polygonEdgesCount() [1/2]

int bitpit::CGElem::polygonEdgesCount ( std::size_t nV,
array3D const * V )

Gets the number of edges of a polygon

Parameters
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
Returns
number of edges

Definition at line 3654 of file CG_elem.cpp.

◆ polygonEdgesCount() [2/2]

int bitpit::CGElem::polygonEdgesCount ( std::vector< array3D > const & V)

Gets the number of edges of a polygon

Returns
number of edges

Definition at line 3643 of file CG_elem.cpp.

◆ polygonSubtriangleCount() [1/2]

int bitpit::CGElem::polygonSubtriangleCount ( std::size_t nV,
array3D const * V )

Gets the number of subtriangles of a polygon

See subtriangleOfPolygon(int triangle, std::size_t nV, array3D const *V, array3D &V0, array3D &V1, array3D &V2) for an explanation of how a polygon is divided in triangles.

Parameters
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
Returns
number of subtriangles

Definition at line 3684 of file CG_elem.cpp.

◆ polygonSubtriangleCount() [2/2]

int bitpit::CGElem::polygonSubtriangleCount ( std::vector< array3D > const & V)

Gets the number of subtriangles of a polygon

See subtriangleOfPolygon(int triangle, std::vector<array3D> const &V, array3D &V0, array3D &V1, array3D &V2) for an explanation of how a polygon is divided in triangles.

Returns
number of subtriangles

Definition at line 3669 of file CG_elem.cpp.

◆ projectCloudTriangle()

std::vector< array3D > bitpit::CGElem::projectCloudTriangle ( std::vector< array3D > const & cloud,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
std::vector< array3D > & lambda )

Projects a point cloud onto a triangle. Projection points are the closest points to the original points within the triangle.

Parameters
[in]cloudpoint cloud coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[in,out]lambdabarycentric coordinates of projection points
Returns
distances

Definition at line 1194 of file CG_elem.cpp.

◆ projectPointCone()

array3D bitpit::CGElem::projectPointCone ( array3D const & point,
array3D const & apex,
array3D const & axis,
double alpha )

Computes projection point on semi-infinite cone surface

Parameters
[in]pointpoint coordinates
[in]apexcone apex
[in]axiscone axis
[in]alphacone half angle
Returns
projection point

Definition at line 1315 of file CG_elem.cpp.

◆ projectPointLine()

array3D bitpit::CGElem::projectPointLine ( array3D const & P,
array3D const & Q,
array3D const & n )

Computes projection of point on line in 3D

Parameters
[in]Ppoint coordinates
[in]Qpoint on line
[in]nline direction
Returns
projection point

Definition at line 971 of file CG_elem.cpp.

◆ projectPointPlane()

array3D bitpit::CGElem::projectPointPlane ( array3D const & P,
array3D const & Q,
array3D const & n )

Computes projection of point on line in 3D

Parameters
[in]Ppoint coordinates
[in]Qpoint on plane
[in]nplane normal
Returns
projection point

Definition at line 984 of file CG_elem.cpp.

◆ projectPointPolygon() [1/5]

array3D bitpit::CGElem::projectPointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V )

Computes projection of point onto a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
Returns
coordinates of projection point

Definition at line 1227 of file CG_elem.cpp.

◆ projectPointPolygon() [2/5]

array3D bitpit::CGElem::projectPointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V,
double * lambda )

Computes projection of point onto a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]lambdabaycentric coordinates of projection point
Returns
coordinates of projection point

Definition at line 1268 of file CG_elem.cpp.

◆ projectPointPolygon() [3/5]

array3D bitpit::CGElem::projectPointPolygon ( array3D const & P,
std::size_t nV,
array3D const * V,
std::vector< double > & lambda )

Computes projection of point onto a convex polygon

Parameters
[in]Ppoint coordinates
[in]nVnumber of polygon vertices
[in]Vpolygon vertices coordinates
[out]lambdabaycentric coordinates of projection point
Returns
coordinates of projection point

Definition at line 1253 of file CG_elem.cpp.

◆ projectPointPolygon() [4/5]

array3D bitpit::CGElem::projectPointPolygon ( array3D const & P,
std::vector< array3D > const & V )

Computes projection of point onto a convex polygon

Parameters
[in]Ppoint coordinates
[in]Vpolygon vertices coordinates
Returns
coordinates of projection point

Definition at line 1215 of file CG_elem.cpp.

◆ projectPointPolygon() [5/5]

array3D bitpit::CGElem::projectPointPolygon ( array3D const & P,
std::vector< array3D > const & V,
std::vector< double > & lambda )

Computes projection of point onto a convex polygon

Parameters
[in]Ppoint coordinates
[in]Vpolygon vertices coordinates
[out]lambdabaycentric coordinates of projection point
Returns
coordinates of projection point

Definition at line 1240 of file CG_elem.cpp.

◆ projectPointSegment() [1/3]

array3D bitpit::CGElem::projectPointSegment ( array3D const & P,
array3D const & Q0,
array3D const & Q1 )

Computes projection of point on line in 3D

Parameters
[in]Ppoint coordinates
[in]Q0first line vertex
[in]Q1second line vertex
Returns
projection point

Definition at line 997 of file CG_elem.cpp.

◆ projectPointSegment() [2/3]

array3D bitpit::CGElem::projectPointSegment ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
double * lambda )

Computes projection of point on line in 3D

Parameters
[in]Ppoint coordinates
[in]Q0first line vertex
[in]Q1second line vertex
[out]lambdabarycentric coordinates of projection point
Returns
projection point

Definition at line 1025 of file CG_elem.cpp.

◆ projectPointSegment() [3/3]

array3D bitpit::CGElem::projectPointSegment ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
std::array< double, 2 > & lambda )

Computes projection of point on line in 3D

Parameters
[in]Ppoint coordinates
[in]Q0first line vertex
[in]Q1second line vertex
[out]lambdabarycentric coordinates of projection point
Returns
projection point

Definition at line 1012 of file CG_elem.cpp.

◆ projectPointTriangle() [1/3]

array3D bitpit::CGElem::projectPointTriangle ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2 )

Computes projection of point on triangle

Parameters
[in]Ppoint coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
Returns
coordinates of projection point

Definition at line 1050 of file CG_elem.cpp.

◆ projectPointTriangle() [2/3]

array3D bitpit::CGElem::projectPointTriangle ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
array3D & lambda )

Computes projection of point on triangle

Parameters
[in]Ppoint coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[out]lambdabarycentric coordinates of projection point
Returns
coordinates of projection point

Definition at line 1067 of file CG_elem.cpp.

◆ projectPointTriangle() [3/3]

array3D bitpit::CGElem::projectPointTriangle ( array3D const & P,
array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
double * lambda )

Computes projection of point on triangle

Parameters
[in]Ppoint coordinates
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[out]lambdabarycentric coordinates of projection point
Returns
coordinates of projection point

Definition at line 1081 of file CG_elem.cpp.

◆ reconstructPlaneIntersectedPolygons()

void bitpit::CGElem::reconstructPlaneIntersectedPolygons ( std::size_t nV,
array3D const * V,
std::vector< std::array< array3D, 2 > > const & Qs,
std::vector< std::array< int, 2 > > const & edges_of_Qs,
std::vector< std::vector< array3D > > & polys,
const double distanceTolerance )

Once a polygon intersects a plane and the intersection segments info are available, return the N polygons created by the intersections on both sides of the plane.

Parameters
[in]nVNumber of vertices of the polygon
[in]VPointer to vertices list array. Must have size nV.
[in]QsList of cutting segments identified by the plane.
[in]edges_of_QsList of polygon edges couple "touched" by each cutting segment. Negative indices or edge local indices greater than number for actual polygon edges, will make the method skip the info.
[out]polysList of resulting polygons. Each new polygon will be reported as a list of constitutive points. In case of invalid input, return a empty list.
[in]distanceToleranceif distance among features exceed this value they are considered as not intersecting

Definition at line 2680 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricPolygon() [1/3]

array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon ( std::size_t nV,
array3D const * V,
double const * lambda )

Reconstructs a point from barycentric coordinates of a polygon

Parameters
[in]nVnumber of polygon vertices
[in]Vvertices of simplex
[in]lambdabarycentric coordinates
Returns
reconstructed Point

Definition at line 952 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricPolygon() [2/3]

array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon ( std::size_t nV,
array3D const * V,
std::vector< double > const & lambda )

Reconstructs a point from barycentric coordinates of a polygon

Parameters
[in]nVnumber of polygon vertices
[in]Vvertices of simplex
[in]lambdabarycentric coordinates
Returns
reconstructed Point

Definition at line 940 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricPolygon() [3/3]

array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon ( std::vector< array3D > const & V,
std::vector< double > const & lambda )

Reconstructs a point from barycentric coordinates of a polygon

Parameters
[in]Vvertices of simplex
[in]lambdabarycentric coordinates
Returns
reconstructed Point

Definition at line 928 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricSegment() [1/2]

array3D bitpit::CGElem::reconstructPointFromBarycentricSegment ( array3D const & Q0,
array3D const & Q1,
double const * lambda )

Reconstructs a point from barycentric coordinates of a segment

Parameters
[in]Q0first vertex of segment
[in]Q1second vertex of segment
[in]lambdabarycentric coordinates
Returns
The reconstructed point

Definition at line 843 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricSegment() [2/2]

array3D bitpit::CGElem::reconstructPointFromBarycentricSegment ( array3D const & Q0,
array3D const & Q1,
std::array< double, 2 > const & lambda )

Reconstructs a point from barycentric coordinates of a segment

Parameters
[in]Q0first vertex of segment
[in]Q1second vertex of segment
[in]lambdabarycentric coordinates
Returns
The reconstructed point

Definition at line 829 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricTriangle() [1/2]

array3D bitpit::CGElem::reconstructPointFromBarycentricTriangle ( array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
double const * lambda )

Reconstructs a point from barycentric coordinates of a triangle

Parameters
[in]Q0first vertex of triangle
[in]Q1second vertex of triangle
[in]Q2third vertex of triangle
[in]lambdabarycentric coordinates
Returns
The reconstructed point

Definition at line 873 of file CG_elem.cpp.

◆ reconstructPointFromBarycentricTriangle() [2/2]

array3D bitpit::CGElem::reconstructPointFromBarycentricTriangle ( array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
array3D const & lambda )

Reconstructs a point from barycentric coordinates of a triangle

Parameters
[in]Q0first vertex of triangle
[in]Q1second vertex of triangle
[in]Q2third vertex of triangle
[in]lambdabarycentric coordinates
Returns
The reconstructed point

Definition at line 858 of file CG_elem.cpp.

◆ restrictPointTriangle() [1/2]

array3D bitpit::CGElem::restrictPointTriangle ( array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
array3D & lambda )

Restricts a point given in barycentric coordinates on the triangle

Parameters
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[in,out]lambdabarycentric coordinates before and after restriction
Returns
coordinates of restricted point

Definition at line 1097 of file CG_elem.cpp.

◆ restrictPointTriangle() [2/2]

array3D bitpit::CGElem::restrictPointTriangle ( array3D const & Q0,
array3D const & Q1,
array3D const & Q2,
double * lambda )

Restricts a point given in barycentric coordinates on the triangle

Parameters
[in]Q0first triangle vertex
[in]Q1second triangle vertex
[in]Q2third triangle vertex
[in,out]lambdabarycentric coordinates before and after restriction
Returns
coordinates of restricted point

Definition at line 1110 of file CG_elem.cpp.

◆ rotatePoint()

array3D bitpit::CGElem::rotatePoint ( const array3D & P,
const array3D & n0,
const array3D & n1,
double angle )

Rotates the point.

If the axis points are coincident, the function will return the given point with no rotation applied.

Parameters
[in]Pis the point that will be rotated
[in]n0is a first point on the rotation axis
[in]n1is a second point on the rotation axis
[in]angleis the rotation angle, expressed in radiants and positive for counterclockwise rotations
Returns
The rotated point.

Definition at line 893 of file CG_elem.cpp.

◆ rotateVector()

array3D bitpit::CGElem::rotateVector ( array3D const & vector,
array3D const & axis,
double theta )

rotates a vector in 3D using Rodrigues' formula.

Parameters
[in]vectorvector to be rotated
[in]axisrotation axis
[in]thetarotation angle
Returns
rotated vector

Definition at line 3615 of file CG_elem.cpp.

◆ subtractionAABB()

void bitpit::CGElem::subtractionAABB ( array3D const & A0,
array3D const & A1,
array3D const & B0,
array3D const & B1,
array3D & C0,
array3D & C1 )

computes the bounding box of the relative complement two axis aligned bounding boxes

Parameters
[in]A0min point of first bounding box
[in]A1max point of first bounding box
[in]B0min point of second bounding box
[in]B1max point of second bounding box
[out]C0min point of relative complement
[out]C1max point of relative complement

Definition at line 3372 of file CG_elem.cpp.

◆ subtriangleOfPolygon() [1/2]

void bitpit::CGElem::subtriangleOfPolygon ( int triangle,
std::size_t nV,
array3D const * V,
array3D & V0,
array3D & V1,
array3D & V2 )

Gets the subtriangle vertices' coordinates of a convex polygon

The vertices of the n-th subtriangle will be defined as follows: V0: is the centroid of the polygon; V1: is the n-th vertex of the polygon; V2: is the vertex following the n-th vertex of the polygon.

Parameters
[in]triangleindex of triangle
[in]nVnumber of polygon vertices
[in]Vpolgon vertices
[in]V0coordinates of first triangle's vertex
[in]V1coordinates of second triangle's vertex
[in]V2coordinates of third triangle's vertex

Definition at line 3754 of file CG_elem.cpp.

◆ subtriangleOfPolygon() [2/2]

void bitpit::CGElem::subtriangleOfPolygon ( int triangle,
std::vector< array3D > const & V,
array3D & V0,
array3D & V1,
array3D & V2 )

Gets the subtriangle vertices' coordinates of a convex polygon

The vertices of the n-th subtriangle are be defined as follows: V0: is the centroid of the polygon; V1: is the n-th vertex of the polygon; V2: is the vertex following the n-th vertex of the polygon.

Parameters
[in]triangleindex of triangle
[in]Vpolgon vertices
[in]V0coordinates of first triangle's vertex
[in]V1coordinates of second triangle's vertex
[in]V2coordinates of third triangle's vertex

Definition at line 3734 of file CG_elem.cpp.

◆ unionAABB() [1/2]

void bitpit::CGElem::unionAABB ( array3D const & A0,
array3D const & A1,
array3D const & B0,
array3D const & B1,
array3D & C0,
array3D & C1 )

computes the bounding box of the union of two axis aligned bounding boxes

Parameters
[in]A0min point of first bounding box
[in]A1max point of first bounding box
[in]B0min point of second bounding box
[in]B1max point of second bounding box
[out]C0min point of union bounding box
[out]C1max point of union bounding box

Definition at line 3314 of file CG_elem.cpp.

◆ unionAABB() [2/2]

void bitpit::CGElem::unionAABB ( std::vector< array3D > const & A0,
std::vector< array3D > const & A1,
array3D & C0,
array3D & C1 )

computes the bounding box of the union of several axis aligned bounding boxes

Parameters
[in]A0min points of bounding boxes
[in]A1max points of bounding boxes
[out]C0min point of union bounding box
[out]C1max point of union bounding box

Definition at line 3331 of file CG_elem.cpp.

◆ validBarycentric()

bool bitpit::CGElem::validBarycentric ( double const * lambdaPtr,
int n )

Checks if barycentric coordinates is valid

Parameters
[in]lambdaPtrpointer to barycentric coordinates
[in]nnumber of points
Returns
true if valid

Definition at line 586 of file CG_elem.cpp.

◆ validLine()

bool bitpit::CGElem::validLine ( const array3D & P,
const array3D & n )

Checks if a line is valid

Parameters
[in]Ppoint on line;
[in]nline direction
Returns
true if valid

Definition at line 529 of file CG_elem.cpp.

◆ validPlane()

bool bitpit::CGElem::validPlane ( const array3D & P,
const array3D & n )

Checks if a plane is valid

Parameters
[in]Ppoint on plane
[in]nplane normal
Returns
true if valid

Definition at line 541 of file CG_elem.cpp.

◆ validSegment()

bool bitpit::CGElem::validSegment ( const array3D & P0,
const array3D & P1 )

Checks if a segment is valid

Parameters
[in]P0start point of segment
[in]P1end point of segment
Returns
true if valid

Definition at line 518 of file CG_elem.cpp.

◆ validTriangle()

bool bitpit::CGElem::validTriangle ( const array3D & P0,
const array3D & P1,
const array3D & P2 )

Checks if a triangle is valid

Parameters
[in]P0first triangle vertex
[in]P1second triangle vertex
[in]P2third triangle vertex
Returns
true if valid

Definition at line 554 of file CG_elem.cpp.

◆ vertexOfBox()

void bitpit::CGElem::vertexOfBox ( int i,
array3D const & A0,
array3D const & A1,
array3D & P )

computes the vertex coordiantes of a box

Parameters
[in]ivertex index
[in]A0min point of bounding box
[in]A1max point of bounding box
[out]Pvertex coordinates

Definition at line 3546 of file CG_elem.cpp.

◆ vertexOfSegment()

void bitpit::CGElem::vertexOfSegment ( int i,
array3D const & V0,
array3D const & V1,
array3D & P )

returns the vertex coordiantes of a segment given its index

Parameters
[in]iedge index
[in]V0first vertex of segment
[in]V1second vertex of segment
[out]Pvertex

Definition at line 3402 of file CG_elem.cpp.

◆ vertexOfTriangle()

void bitpit::CGElem::vertexOfTriangle ( int i,
array3D const & V0,
array3D const & V1,
array3D const & V2,
array3D & P )

returns the vertex coordiantes of a triangle given its index

Parameters
[in]iedge index
[in]V0first vertex of triangle
[in]V1second vertex of triangle
[in]V2third vertex of triangle
[out]Pvertex

Definition at line 3430 of file CG_elem.cpp.

Variable Documentation

◆ boxEdgeVertexConnectivity

const std::array< std::array<int,2>,12> bitpit::CGElem::boxEdgeVertexConnectivity
Initial value:
=
{{
std::array<int,2>{ {0,2} },
std::array<int,2>{ {1,3} },
std::array<int,2>{ {0,1} },
std::array<int,2>{ {2,3} },
std::array<int,2>{ {4,6} },
std::array<int,2>{ {5,7} },
std::array<int,2>{ {4,5} },
std::array<int,2>{ {6,7} },
std::array<int,2>{ {0,4} },
std::array<int,2>{ {1,5} },
std::array<int,2>{ {2,6} },
std::array<int,2>{ {3,7} }
}}

The edge vertex connectivty of a box

Definition at line 53 of file CG.hpp.

◆ boxFaceVertexConnectivity

const std::array< std::array<int,4>, 6> bitpit::CGElem::boxFaceVertexConnectivity
Initial value:
=
{{
std::array<int,4>{ {0,2,6,4} },
std::array<int,4>{ {1,3,7,5} },
std::array<int,4>{ {0,4,5,1} },
std::array<int,4>{ {2,6,7,3} },
std::array<int,4>{ {0,1,3,2} },
std::array<int,4>{ {4,5,7,6} }
}}

The face vertex connectivty of a box

Definition at line 73 of file CG.hpp.

◆ DEFAULT_COPLANARITY_TOLERANCE

const double bitpit::CGElem::DEFAULT_COPLANARITY_TOLERANCE = 1.e-12

Definition at line 48 of file CG.hpp.

◆ DEFAULT_DISTANCE_TOLERANCE

const double bitpit::CGElem::DEFAULT_DISTANCE_TOLERANCE = 1.e-12

Definition at line 47 of file CG.hpp.