
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 ¢re, double radius, const double distanceTolerance=DEFAULT_DISTANCE_TOLERANCE) |
bool | bitpit::CGElem::intersectBoxSphere (array3D const &A0, array3D const &A1, array3D const ¢re, 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] a first vertex coordinates [in] b second vertex coordinates [in] c third 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] nVS number of polygon vertices [in] VS polygon vertices coordinates [out] P0 min point of bounding box [out] P1 max 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] VS polygon vertices coordinates [out] P0 min point of bounding box [out] P1 max 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] A start point of segment [in] B end point of segment [out] P0 min point of bounding box [out] P1 max 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] A first vertex of triangle [in] B second vertex of triangle [in] C third vertex of triangle [out] P0 min point of bounding box [out] P1 max 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] p point [in] nVertices number of polygon vertices [in] vertex vertex coordinates of polygon [out] lambda generalized 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] p point [in] nVertices number of polygon vertices [in] vertex vertex coordinates of polygon [out] lambda generalized 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] p point [in] vertex vertex coordinates of polygon [out] lambda generalized 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] nV Number of Vertices of the polygon [in] V Pointer 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] nLambda number of barycentric coordinates of point [in] lambda barycentric coordinates of point [in] tolerance tolerance 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] lambda barycentric coordinates of point [in] tolerance tolerance 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] lambda barycentric coordinates of point [in] tolerance tolerance 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] lambda barycentric coordinates of point [in] tolerance tolerance 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] lambda barycentric coordinates of point [in] tolerance tolerance 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] lambda barycentric coordinates of point [in] tolerance tolerance 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] P point cloud coordinates [in] nV number of polygon vertices [in] V polygon 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] cloud point cloud coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] xP closest points on simplex [out] flag point 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] cloud point cloud coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] lambda barycentric 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] P point cloud coordinates [in] V polygon 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] cloud point cloud coordinates [in] V polygon vertices coordinates [out] xP closest points on simplex [out] flag point 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] cloud point cloud coordinates [in] V polygon vertices coordinates [out] lambda barycentric 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] cloud point cloud coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third 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] cloud point cloud coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [out] lambda barycentric 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] n0 direction of first line [in] P0 point on first line [in] n1 direction of second line [in] P1 point 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] n0 direction of first line [in] P0 point on first line [in] n1 direction of second line [in] P1 point on second line [out] xP0 projection of line1 on line0 [out] xP1 projection 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] point point coordinates [in] apex cone apex [in] axis cone axis [in] alpha cone 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] P point coordinates [in] Q point on line [in] n line direction [out] xP closest 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] P point coordinates [in] Q point on plane [in] n plane normal [out] xP closest 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] P point coordinates [in] nV number of polygon vertices [in] V simplex 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] P point coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] xP closest points on polygon [out] flag point 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] P point coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] lambda barycentric 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] P point coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] lambda barycentric 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] P point coordinates [in] V simplex 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] P point coordinates [in] V polygon vertices coordinates [out] xP closest points on polygon [out] flag point 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] P point coordinates [in] V polygon vertices coordinates [out] lambda barycentric 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] P point coordinates [in] Q0 segment starting point [in] Q1 segment 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] P point coordinates [in] Q0 segment starting point [in] Q1 segment ending point [out] lambda barycentric 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] P point coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third 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] P point coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [out] lambda barycentric 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] i edge index [in] A0 min point of bounding box [in] A1 max point of bounding box [out] P0 first vertex of edge [out] P1 first 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] edge index [in] nV number of polygon vertices [in] V polgon vertices [in] V0 first vertice coordinates of edge [in] V1 second 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] edge index [in] V polgon vertices [in] V0 first vertice coordinates of edge [in] V1 second 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] i edge index [in] V0 first vertex of triangle [in] V1 second vertex of triangle [in] V2 third vertex of triangle [out] P0 first vertex of edge [out] P1 first 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] i face index [in] A0 min point of bounding box [in] A1 max point of bounding box [out] P0 first vertex of face [out] P1 first vertex of face [out] P2 first vertex of face [out] P3 first 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] A1 min point of first box [in] A2 max point of first box [in] B1 min point of second box [in] B2 max point of second box [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] I1 min point of intersection box [out] I2 max point of intersection box [in] dim number 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] A1 min point of first box [in] A2 max point of first box [in] B1 min point of second box [in] B2 max point of second box [in] dim number of dimensions to be checked [in] distanceTolerance if 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] A0 min point of box [in] A1 max point of box [in] centre is the centre of the circle [in] radius is the radius of the circle [in] distanceTolerance is 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] A0 min point of first box [in] A1 max point of first box [in] nVS number of polygon vertices [in] VS polygon vertices coordinates [in] innerPolygonPoints simplex vertices within the box should be added to the intersection list [in] polygonEdgeBoxFaceIntersections intersection between the edges of the polygon and the hull of the box should be added to the intersection list [in] polygonBoxEdgeIntersections intersection between the polygon and the edges of the box should be added to the intersection list [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [in] dim number 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] A0 min point of first box [in] A1 max point of first box [in] nVS number of polygon vertices [in] VS simplex vertices coordinates [in] innerPolygonPoints simplex vertices within the box should be added to the intersection list [in] polygonEdgeBoxFaceIntersections intersection between the edges of the polygon and the hull of the box should be added to the intersection list [in] polygonBoxEdgeIntersections intersection between the polygon and the edges of the box should be added to the intersection list [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [out] flag has 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] dim number 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] A0 min point of first box [in] A1 max point of first box [in] nVS number of polygon vertices [in] VS simplex vertices coordinates [in] dim number of dimensions to be checked [in] distanceTolerance if 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] A0 min point of first box [in] A1 max point of first box [in] VS polygon vertices coordinates [in] innerPolygonPoints simplex vertices within the box should be added to the intersection list [in] polygonEdgeBoxFaceIntersections intersection between the edges of the polygon and the hull of the box should be added to the intersection list [in] polygonBoxEdgeIntersections intersection between the polygon and the edges of the box should be added to the intersection list [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [in] dim number 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] A0 min point of first box [in] A1 max point of first box [in] VS simplex vertices coordinates [in] innerPolygonPoints simplex vertices within the box should be added to the intersection list [in] polygonEdgeBoxFaceIntersections intersection between the edges of the polygon and the hull of the box should be added to the intersection list [in] polygonBoxEdgeIntersections intersection between the polygon and the edges of the box should be added to the intersection list [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [out] flag has 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] dim number 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] A0 min point of first box [in] A1 max point of first box [in] VS simplex vertices coordinates [in] dim number of dimensions to be checked [in] distanceTolerance if 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] A0 min point of box [in] A1 max point of box [in] centre is the centre of the sphere [in] radius is the radius of the sphere [in] distanceTolerance is 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] A0 min point of box [in] A1 max point of box [in] V0 first vertex of triangle [in] V1 second vertex of triangle [in] V2 third vertex of triangle [in] interiorTriangleVertices if true, all triangle vertices within the box will be added to the intersection points P [in] triangleEdgeBoxFaceIntersections if true, the intersections between the edges of the triangle and the hull of the box will be added to the intersection points P [in] triangleBoxEdgeIntersections if 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] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [in] dim number 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] A0 min point of box [in] A1 max point of box [in] V0 first vertex of triangle [in] V1 second vertex of triangle [in] V2 third vertex of triangle [in] interiorTriangleVertices if true, all triangle vertices within the box will be added to the intersection points P [in] triangleEdgeBoxHullIntersections if 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] triangleBoxEdgeIntersections if 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] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P calculated intersection points [out] flag has 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] dim number 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] A0 min point of box [in] A1 max point of box [in] V0 first vertex of triangle [in] V1 second vertex of triangle [in] V2 third vertex of triangle [in] dim number of dimensions to be checked [in] distanceTolerance if 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] A0 min point of first bounding box [in] A1 max point of first bounding box [in] B0 min point of second bounding box [in] B1 max point of second bounding box [out] C0 min point of intersection of boxes [out] C1 max 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] n1 direction of first line [in] P1 point on first line [in] n2 direction of second line [in] P2 point on second line [out] P intersection point if intersect, else unaltered [in] distanceTolerance if 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] P1 point on line [in] n1 direction of line [in] P2 point on plane [in] n2 normal to plane [in] coplanarityTolerance if angle between the line and plane is less than this value, they are considered as coplanar and not intersecting [out] P intersection 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] P point on line [in] n direction of line [in] nV number of polygon vertices [in] V polygon vertices coordinates [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] P point on line [in] n direction of line [in] V polygon vertices coordinates [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] P point on plane [in] n normal to plane [in] A first vertex of triangle [in] B second vertex of triangle [in] C third vertex of triangle [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] P1 point on first plane [in] n1 normal to first plane [in] A0 min point of box [in] A1 max point of box [in] dim number of dimensions [in] distanceTolerance if 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] P1 point on first plane [in] n1 normal to first plane [in] A0 min point of box [in] A1 max point of box [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] intersects intersection points [in] dim number 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] Pp point belonging to the plane [in] nP normal to plane [in] V is a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules [out] intersection If intersects, return the cutting segment [in] distanceTolerance if 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] Pp point belonging to the plane [in] nP unit normal to plane [in] V is a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules [out] intersection If intersects, return the cutting segment [out] edges_of_intersection If 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] distanceTolerance if 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] Pp point belonging to the plane [in] nP normal to plane [in] V is a vector containing the vertex coordinates of the pixel, number with respect to the pixel enumeration rules [out] intersection If intersects, return the cutting segment [out] poly is the polygon constructed by the pixel intersection placed on the [in] distanceTolerance if 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] P1 point on first plane [in] n1 normal to first plane [in] P2 point on second plane [in] n2 normal to second plane [out] Pl point on intersection line [out] nl direction of intersection line [in] coplanarityTolerance if 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] P point belonging to the plane [in] nP normal to the plane [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] Qs a collection of edges defined by the intersection points [in] distanceTolerance if 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] P Point belonging to the plane [in] nP Normal to the plane [in] nV Number of vertices of the polygon [in] V Pointer to vertices list array. Must have size nV. [out] Qs If intersects, return a non-empty list of intersecting Segments. [out] edges_of_Qs If intersects, return the list of polygon edges couple "touched" by the intersecting segment, one for each intersecting segment. [in] distanceTolerance if 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] P point belonging to the plane [in] nP normal to the plane [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] Qs a collection of edges defined by the intersection points [out] polys polygons created by the intersection [in] distanceTolerance if 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] P0 First triangle vertex [in] P1 Second triangle vertex [in] P2 Third triangle vertex [in] Pp Point belonging to the plane [in] nP Normal to the plane [out] intersection If intersects, return the cutting segment. [in] distanceTolerance define 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] P0 First triangle vertex [in] P1 Second triangle vertex [in] P2 Third triangle vertex [in] Pp Point belonging to the plane [in] nP Normal to the plane [out] intersection If intersects, return the cutting segment. [out] edges_of_intersection If 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] distanceTolerance define 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] P0 First triangle vertex [in] P1 Second triangle vertex [in] P2 Third triangle vertex [in] Pp Point belonging to the plane [in] nP Normal to the plane [out] intersection If intersects, return the cutting segment. [out] poly is the polygon constructed by the triangle intersection placed on the opposite subspace of the one pointed by the plane's normal [in] distanceTolerance define 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] P point coordinates [in] B1 min coodinates of box [in] B2 max coodinates of box [in] dim number of dimensions to be checked [in] distanceTolerance if 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] P point coordinates [in] Q point on line [in] n line direction [in] distanceTolerance if 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] P point coordinates [in] P1 start point of segment [in] P2 end point of segment [in] distanceTolerance if 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] P point coordinates [in] A first vertex of triangle [in] B second vertex of triangle [in] C third vertex of triangle [in] distanceTolerance if 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] V0 start point of segment [in] V1 end point of segment [in] A0 min point of box [in] A1 max point of box [in] interiorSegmentVertice if the segment vertices within the box should be added to the list of intersection points [in] segmentBoxHullIntersection if the intersections between the segment and the outer hull of the box should be added to the list of intersection points [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P list of intersection points. If no intersetion points should be calculated nullptr can be passed as argument [in] dim number 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] V0 start point of segment [in] V1 end point of segment [in] A0 min point of box [in] A1 max point of box [in] interiorSegmentVertice if the segment vertices within the box should be added to the list of intersection points [in] segmentBoxHullIntersection if the intersections between the segment and the outer hull of the box should be added to the list of intersection points [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P list of intersection points. If no intersetion points should be calculated nullptr can be passed as argument [out] flag indicates for each intersection if it belongs to interiorSegmentVertice (flag=0) or segmentHullIntersection (flag=1) [in] dim number 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] V0 start point of segment [in] V1 end point of segment [in] A0 min point of box [in] A1 max point of box [in] dim number of dimensions to be checked [in] distanceTolerance if 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] Q1 start point of segment [in] Q2 end point of segment [in] P2 point on plane [in] n2 normal to plane [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] P intersection 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] P0 start point of segment [in] P1 end point of segment [in] nV number of polygon vertices [in] V polygon vertices coordinates [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] P0 start point of segment [in] P1 end point of segment [in] V polygon vertices coordinates [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] P1 start point of first segment [in] P2 end point of first segment [in] Q1 start point of second segment [in] Q2 end point of second segment [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] x intersection 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] P0 start point of segment [in] P1 end point of segment [in] A first vertex of triangle [in] B second vertex of triangle [in] C third vertex of triangle [in] distanceTolerance if distance among features exceed this value they are considered as not intersecting [out] Q intersection 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] nV number of polygon vertices [in] V polygon 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] nV number of polygon vertices [in] V polygon 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] cloud point cloud coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [in,out] lambda barycentric 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] point point coordinates [in] apex cone apex [in] axis cone axis [in] alpha cone 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] P point coordinates [in] Q point on line [in] n line 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] P point coordinates [in] Q point on plane [in] n plane 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] P point coordinates [in] nV number of polygon vertices [in] V polygon 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] P point coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] lambda baycentric 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] P point coordinates [in] nV number of polygon vertices [in] V polygon vertices coordinates [out] lambda baycentric 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] P point coordinates [in] V polygon 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] P point coordinates [in] V polygon vertices coordinates [out] lambda baycentric 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] P point coordinates [in] Q0 first line vertex [in] Q1 second 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] P point coordinates [in] Q0 first line vertex [in] Q1 second line vertex [out] lambda barycentric 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] P point coordinates [in] Q0 first line vertex [in] Q1 second line vertex [out] lambda barycentric 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] P point coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third 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] P point coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [out] lambda barycentric 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] P point coordinates [in] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [out] lambda barycentric 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] nV Number of vertices of the polygon [in] V Pointer to vertices list array. Must have size nV. [in] Qs List of cutting segments identified by the plane. [in] edges_of_Qs List 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] polys List 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] distanceTolerance if 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] nV number of polygon vertices [in] V vertices of simplex [in] lambda barycentric 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] nV number of polygon vertices [in] V vertices of simplex [in] lambda barycentric 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] V vertices of simplex [in] lambda barycentric 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] Q0 first vertex of segment [in] Q1 second vertex of segment [in] lambda barycentric 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] Q0 first vertex of segment [in] Q1 second vertex of segment [in] lambda barycentric 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] Q0 first vertex of triangle [in] Q1 second vertex of triangle [in] Q2 third vertex of triangle [in] lambda barycentric 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] Q0 first vertex of triangle [in] Q1 second vertex of triangle [in] Q2 third vertex of triangle [in] lambda barycentric 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] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [in,out] lambda barycentric 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] Q0 first triangle vertex [in] Q1 second triangle vertex [in] Q2 third triangle vertex [in,out] lambda barycentric 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] P is the point that will be rotated [in] n0 is a first point on the rotation axis [in] n1 is a second point on the rotation axis [in] angle is 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] vector vector to be rotated [in] axis rotation axis [in] theta rotation 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] A0 min point of first bounding box [in] A1 max point of first bounding box [in] B0 min point of second bounding box [in] B1 max point of second bounding box [out] C0 min point of relative complement [out] C1 max 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] triangle index of triangle [in] nV number of polygon vertices [in] V polgon vertices [in] V0 coordinates of first triangle's vertex [in] V1 coordinates of second triangle's vertex [in] V2 coordinates 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] triangle index of triangle [in] V polgon vertices [in] V0 coordinates of first triangle's vertex [in] V1 coordinates of second triangle's vertex [in] V2 coordinates 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] A0 min point of first bounding box [in] A1 max point of first bounding box [in] B0 min point of second bounding box [in] B1 max point of second bounding box [out] C0 min point of union bounding box [out] C1 max 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] A0 min points of bounding boxes [in] A1 max points of bounding boxes [out] C0 min point of union bounding box [out] C1 max 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] lambdaPtr pointer to barycentric coordinates [in] n number 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] P point on line; [in] n line 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] P point on plane [in] n plane 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] P0 start point of segment [in] P1 end 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] P0 first triangle vertex [in] P1 second triangle vertex [in] P2 third 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] i vertex index [in] A0 min point of bounding box [in] A1 max point of bounding box [out] P vertex 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] i edge index [in] V0 first vertex of segment [in] V1 second vertex of segment [out] P vertex
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] i edge index [in] V0 first vertex of triangle [in] V1 second vertex of triangle [in] V2 third vertex of triangle [out] P vertex
Definition at line 3430 of file CG_elem.cpp.
Variable Documentation
◆ boxEdgeVertexConnectivity
const std::array< std::array<int,2>,12> bitpit::CGElem::boxEdgeVertexConnectivity |
The edge vertex connectivty of a box
◆ boxFaceVertexConnectivity
const std::array< std::array<int,4>, 6> bitpit::CGElem::boxFaceVertexConnectivity |
◆ DEFAULT_COPLANARITY_TOLERANCE
const double bitpit::CGElem::DEFAULT_COPLANARITY_TOLERANCE = 1.e-12 |
◆ DEFAULT_DISTANCE_TOLERANCE
