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::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 &) |
double bitpit::CGElem::areaTriangle | ( | array3D const & | a, |
array3D const & | b, | ||
array3D const & | c ) |
computes the area of an triangle
[in] | a | first vertex coordinates |
[in] | b | second vertex coordinates |
[in] | c | third vertex coordinates |
Definition at line 2987 of file CG_elem.cpp.
void bitpit::CGElem::computeAABBPolygon | ( | std::size_t | nVS, |
array3D const * | VS, | ||
array3D & | P0, | ||
array3D & | P1 ) |
computes axis aligned boundig box of a polygon
[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 2643 of file CG_elem.cpp.
void bitpit::CGElem::computeAABBPolygon | ( | std::vector< array3D > const & | VS, |
array3D & | P0, | ||
array3D & | P1 ) |
computes axis aligned boundig box of a polygon
[in] | VS | polygon vertices coordinates |
[out] | P0 | min point of bounding box |
[out] | P1 | max point of bounding box |
Definition at line 2631 of file CG_elem.cpp.
void bitpit::CGElem::computeAABBSegment | ( | array3D const & | A, |
array3D const & | B, | ||
array3D & | P0, | ||
array3D & | P1 ) |
computes axis aligned boundig box of a segment
[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 2587 of file CG_elem.cpp.
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
[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 2609 of file CG_elem.cpp.
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.
[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 788 of file CG_elem.cpp.
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.
[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 768 of file CG_elem.cpp.
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.
[in] | p | point |
[in] | vertex | vertex coordinates of polygon |
[out] | lambda | generalized barycentric coordinates of p |
Definition at line 750 of file CG_elem.cpp.
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
[in] | nLambda | number of barycentric coordinates of point |
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 701 of file CG_elem.cpp.
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
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 686 of file CG_elem.cpp.
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
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 633 of file CG_elem.cpp.
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
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 618 of file CG_elem.cpp.
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
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 672 of file CG_elem.cpp.
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
[in] | lambda | barycentric coordinates of point |
[in] | tolerance | tolerance used for comparisons |
Definition at line 658 of file CG_elem.cpp.
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
[in] | P | point cloud coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
Definition at line 1653 of file CG_elem.cpp.
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
[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, -...) |
Definition at line 1611 of file CG_elem.cpp.
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
[in] | cloud | point cloud coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
[out] | lambda | barycentric coordinates of the projection points |
Definition at line 1692 of file CG_elem.cpp.
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
[in] | P | point cloud coordinates |
[in] | V | polygon vertices coordinates |
Definition at line 1641 of file CG_elem.cpp.
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
[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, -...) |
Definition at line 1597 of file CG_elem.cpp.
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
[in] | cloud | point cloud coordinates |
[in] | V | polygon vertices coordinates |
[out] | lambda | barycentric coordinates of the projection points |
Definition at line 1679 of file CG_elem.cpp.
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
[in] | cloud | point cloud coordinates |
[in] | Q0 | first triangle vertex |
[in] | Q1 | second triangle vertex |
[in] | Q2 | third triangle vertex |
Definition at line 1452 of file CG_elem.cpp.
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
[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 |
Definition at line 1467 of file CG_elem.cpp.
double bitpit::CGElem::distanceLineLine | ( | array3D const & | P0, |
array3D const & | n0, | ||
array3D const & | P1, | ||
array3D const & | n1 ) |
Computes distance between two lines in 3D
[in] | n0 | direction of first line |
[in] | P0 | point on first line |
[in] | n1 | direction of second line |
[in] | P1 | point on second line |
Definition at line 1727 of file CG_elem.cpp.
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
[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 |
Definition at line 1743 of file CG_elem.cpp.
double bitpit::CGElem::distancePointCone | ( | array3D const & | point, |
array3D const & | apex, | ||
array3D const & | axis, | ||
double | alpha ) |
Computes distance point to semi-infinite cone surface
[in] | point | point coordinates |
[in] | apex | cone apex |
[in] | axis | cone axis |
[in] | alpha | cone half angle |
Definition at line 1438 of file CG_elem.cpp.
double bitpit::CGElem::distancePointLine | ( | array3D const & | P, |
array3D const & | Q, | ||
array3D const & | n, | ||
array3D & | xP ) |
Computes distance point to line in 3D
[in] | P | point coordinates |
[in] | Q | point on line |
[in] | n | line direction |
[out] | xP | closest point on line |
Definition at line 1354 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPlane | ( | array3D const & | P, |
array3D const & | Q, | ||
array3D const & | n, | ||
array3D & | xP ) |
Computes distance point to plane
[in] | P | point coordinates |
[in] | Q | point on plane |
[in] | n | plane normal |
[out] | xP | closest point on line |
Definition at line 1368 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPolygon | ( | array3D const & | P, |
std::size_t | nV, | ||
array3D const * | V ) |
Computes distances of point to a convex polygon
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | simplex vertices coordinates |
Definition at line 1542 of file CG_elem.cpp.
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
[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, -...) |
Definition at line 1512 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPolygon | ( | array3D const & | P, |
std::size_t | nV, | ||
array3D const * | V, | ||
double * | lambda ) |
Computes distances of point to a convex polygon
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
[out] | lambda | barycentric coordinates |
Definition at line 1583 of file CG_elem.cpp.
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
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
[out] | lambda | barycentric coordinates |
Definition at line 1568 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPolygon | ( | array3D const & | P, |
std::vector< array3D > const & | V ) |
Computes distances of point to a convex polygon
[in] | P | point coordinates |
[in] | V | simplex vertices coordinates |
Definition at line 1530 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPolygon | ( | array3D const & | P, |
std::vector< array3D > const & | V, | ||
array3D & | xP, | ||
int & | flag ) |
Computes distances of point to a convex polygon
[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, -...) |
Definition at line 1498 of file CG_elem.cpp.
double bitpit::CGElem::distancePointPolygon | ( | array3D const & | P, |
std::vector< array3D > const & | V, | ||
std::vector< double > & | lambda ) |
Computes distances of point to a convex polygon
[in] | P | point coordinates |
[in] | V | polygon vertices coordinates |
[out] | lambda | barycentric coordinates |
Definition at line 1555 of file CG_elem.cpp.
double bitpit::CGElem::distancePointSegment | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1 ) |
Computes distance point to segment
[in] | P | point coordinates |
[in] | Q0 | segment starting point |
[in] | Q1 | segment ending point |
Definition at line 1381 of file CG_elem.cpp.
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
[in] | P | point coordinates |
[in] | Q0 | segment starting point |
[in] | Q1 | segment ending point |
[out] | lambda | barycentric coordinates |
Definition at line 1395 of file CG_elem.cpp.
double bitpit::CGElem::distancePointTriangle | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
array3D const & | Q2 ) |
Computes distance point to triangle
[in] | P | point coordinates |
[in] | Q0 | first triangle vertex |
[in] | Q1 | second triangle vertex |
[in] | Q2 | third triangle vertex |
Definition at line 1409 of file CG_elem.cpp.
double bitpit::CGElem::distancePointTriangle | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
array3D const & | Q2, | ||
array3D & | lambda ) |
Computes distance point to triangle
[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 |
Definition at line 1424 of file CG_elem.cpp.
void bitpit::CGElem::edgeOfBox | ( | int | i, |
array3D const & | A0, | ||
array3D const & | A1, | ||
array3D & | P0, | ||
array3D & | P1 ) |
computes the edge coordiantes of a box
[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 2879 of file CG_elem.cpp.
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
[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 3064 of file CG_elem.cpp.
void bitpit::CGElem::edgeOfPolygon | ( | int | edge, |
std::vector< array3D > const & | V, | ||
array3D & | V0, | ||
array3D & | V1 ) |
Gets the edge coordinates of a convex polygon
[in] | edge | index |
[in] | V | polgon vertices |
[in] | V0 | first vertice coordinates of edge |
[in] | V1 | second vertice coordinates of edge |
Definition at line 3051 of file CG_elem.cpp.
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
[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 2816 of file CG_elem.cpp.
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
[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 2853 of file CG_elem.cpp.
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
[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 |
Definition at line 2148 of file CG_elem.cpp.
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
[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 |
Definition at line 2125 of file CG_elem.cpp.
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.
[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 |
Definition at line 2390 of file CG_elem.cpp.
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
[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 |
Definition at line 2336 of file CG_elem.cpp.
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
[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 |
Definition at line 2375 of file CG_elem.cpp.
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
[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 |
Definition at line 2298 of file CG_elem.cpp.
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
[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 |
Definition at line 2316 of file CG_elem.cpp.
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
[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 |
Definition at line 2355 of file CG_elem.cpp.
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
[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 |
Definition at line 2284 of file CG_elem.cpp.
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.
[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 |
Definition at line 2416 of file CG_elem.cpp.
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
[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 |
Definition at line 2197 of file CG_elem.cpp.
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
[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 |
Definition at line 2218 of file CG_elem.cpp.
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
[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 |
Definition at line 2177 of file CG_elem.cpp.
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
[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 2710 of file CG_elem.cpp.
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
[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 |
Definition at line 1785 of file CG_elem.cpp.
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
[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 |
Definition at line 1837 of file CG_elem.cpp.
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
[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 |
Definition at line 2055 of file CG_elem.cpp.
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
[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 |
Definition at line 2040 of file CG_elem.cpp.
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
[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 |
Definition at line 1986 of file CG_elem.cpp.
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
[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 |
Definition at line 1952 of file CG_elem.cpp.
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
[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 |
Definition at line 1969 of file CG_elem.cpp.
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
[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 |
Definition at line 1900 of file CG_elem.cpp.
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
[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 |
Definition at line 2568 of file CG_elem.cpp.
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
[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 |
Definition at line 2510 of file CG_elem.cpp.
bool bitpit::CGElem::intersectPointSegment | ( | array3D const & | P, |
array3D const & | P1, | ||
array3D const & | P2, | ||
const double | distanceTolerance ) |
checks if points lies on segment in 3D
[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 |
Definition at line 2530 of file CG_elem.cpp.
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
[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 |
Definition at line 2549 of file CG_elem.cpp.
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
[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 |
Definition at line 2251 of file CG_elem.cpp.
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
[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 |
Definition at line 2270 of file CG_elem.cpp.
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
[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 |
Definition at line 2233 of file CG_elem.cpp.
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
[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 |
Definition at line 1870 of file CG_elem.cpp.
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
[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 |
Definition at line 2097 of file CG_elem.cpp.
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
[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 |
Definition at line 2082 of file CG_elem.cpp.
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
[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 |
Definition at line 1806 of file CG_elem.cpp.
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
[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 |
Definition at line 2014 of file CG_elem.cpp.
int bitpit::CGElem::polygonEdgesCount | ( | std::size_t | nV, |
array3D const * | V ) |
Gets the number of edges of a polygon
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
Definition at line 3007 of file CG_elem.cpp.
int bitpit::CGElem::polygonEdgesCount | ( | std::vector< array3D > const & | V | ) |
Gets the number of edges of a polygon
Definition at line 2996 of file CG_elem.cpp.
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.
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
Definition at line 3037 of file CG_elem.cpp.
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.
Definition at line 3022 of file CG_elem.cpp.
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.
[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 |
Definition at line 1193 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointCone | ( | array3D const & | point, |
array3D const & | apex, | ||
array3D const & | axis, | ||
double | alpha ) |
Computes projection point on semi-infinite cone surface
[in] | point | point coordinates |
[in] | apex | cone apex |
[in] | axis | cone axis |
[in] | alpha | cone half angle |
Definition at line 1313 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointLine | ( | array3D const & | P, |
array3D const & | Q, | ||
array3D const & | n ) |
Computes projection of point on line in 3D
[in] | P | point coordinates |
[in] | Q | point on line |
[in] | n | line direction |
Definition at line 970 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointPlane | ( | array3D const & | P, |
array3D const & | Q, | ||
array3D const & | n ) |
Computes projection of point on line in 3D
[in] | P | point coordinates |
[in] | Q | point on plane |
[in] | n | plane normal |
Definition at line 983 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointPolygon | ( | array3D const & | P, |
std::size_t | nV, | ||
array3D const * | V ) |
Computes projection of point onto a convex polygon
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
Definition at line 1226 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointPolygon | ( | array3D const & | P, |
std::size_t | nV, | ||
array3D const * | V, | ||
double * | lambda ) |
Computes projection of point onto a convex polygon
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
[out] | lambda | baycentric coordinates of projection point |
Definition at line 1267 of file CG_elem.cpp.
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
[in] | P | point coordinates |
[in] | nV | number of polygon vertices |
[in] | V | polygon vertices coordinates |
[out] | lambda | baycentric coordinates of projection point |
Definition at line 1252 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointPolygon | ( | array3D const & | P, |
std::vector< array3D > const & | V ) |
Computes projection of point onto a convex polygon
[in] | P | point coordinates |
[in] | V | polygon vertices coordinates |
Definition at line 1214 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointPolygon | ( | array3D const & | P, |
std::vector< array3D > const & | V, | ||
std::vector< double > & | lambda ) |
Computes projection of point onto a convex polygon
[in] | P | point coordinates |
[in] | V | polygon vertices coordinates |
[out] | lambda | baycentric coordinates of projection point |
Definition at line 1239 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointSegment | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1 ) |
Computes projection of point on line in 3D
[in] | P | point coordinates |
[in] | Q0 | first line vertex |
[in] | Q1 | second line vertex |
Definition at line 996 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointSegment | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
double * | lambda ) |
Computes projection of point on line in 3D
[in] | P | point coordinates |
[in] | Q0 | first line vertex |
[in] | Q1 | second line vertex |
[out] | lambda | barycentric coordinates of projection point |
Definition at line 1024 of file CG_elem.cpp.
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
[in] | P | point coordinates |
[in] | Q0 | first line vertex |
[in] | Q1 | second line vertex |
[out] | lambda | barycentric coordinates of projection point |
Definition at line 1011 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointTriangle | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
array3D const & | Q2 ) |
Computes projection of point on triangle
[in] | P | point coordinates |
[in] | Q0 | first triangle vertex |
[in] | Q1 | second triangle vertex |
[in] | Q2 | third triangle vertex |
Definition at line 1049 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointTriangle | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
array3D const & | Q2, | ||
array3D & | lambda ) |
Computes projection of point on triangle
[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 |
Definition at line 1066 of file CG_elem.cpp.
array3D bitpit::CGElem::projectPointTriangle | ( | array3D const & | P, |
array3D const & | Q0, | ||
array3D const & | Q1, | ||
array3D const & | Q2, | ||
double * | lambda ) |
Computes projection of point on triangle
[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 |
Definition at line 1080 of file CG_elem.cpp.
array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon | ( | std::size_t | nV, |
array3D const * | V, | ||
double const * | lambda ) |
Reconstructs a point from barycentric coordinates of a polygon
[in] | nV | number of polygon vertices |
[in] | V | vertices of simplex |
[in] | lambda | barycentric coordinates |
Definition at line 951 of file CG_elem.cpp.
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
[in] | nV | number of polygon vertices |
[in] | V | vertices of simplex |
[in] | lambda | barycentric coordinates |
Definition at line 939 of file CG_elem.cpp.
array3D bitpit::CGElem::reconstructPointFromBarycentricPolygon | ( | std::vector< array3D > const & | V, |
std::vector< double > const & | lambda ) |
Reconstructs a point from barycentric coordinates of a polygon
[in] | V | vertices of simplex |
[in] | lambda | barycentric coordinates |
Definition at line 927 of file CG_elem.cpp.
array3D bitpit::CGElem::reconstructPointFromBarycentricSegment | ( | array3D const & | Q0, |
array3D const & | Q1, | ||
double const * | lambda ) |
Reconstructs a point from barycentric coordinates of a segment
[in] | Q0 | first vertex of segment |
[in] | Q1 | second vertex of segment |
[in] | lambda | barycentric coordinates |
Definition at line 842 of file CG_elem.cpp.
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
[in] | Q0 | first vertex of segment |
[in] | Q1 | second vertex of segment |
[in] | lambda | barycentric coordinates |
Definition at line 828 of file CG_elem.cpp.
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
[in] | Q0 | first vertex of triangle |
[in] | Q1 | second vertex of triangle |
[in] | Q2 | third vertex of triangle |
[in] | lambda | barycentric coordinates |
Definition at line 872 of file CG_elem.cpp.
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
[in] | Q0 | first vertex of triangle |
[in] | Q1 | second vertex of triangle |
[in] | Q2 | third vertex of triangle |
[in] | lambda | barycentric coordinates |
Definition at line 857 of file CG_elem.cpp.
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
[in] | Q0 | first triangle vertex |
[in] | Q1 | second triangle vertex |
[in] | Q2 | third triangle vertex |
[in,out] | lambda | barycentric coordinates before and after restriction |
Definition at line 1096 of file CG_elem.cpp.
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
[in] | Q0 | first triangle vertex |
[in] | Q1 | second triangle vertex |
[in] | Q2 | third triangle vertex |
[in,out] | lambda | barycentric coordinates before and after restriction |
Definition at line 1109 of file CG_elem.cpp.
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.
[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 |
Definition at line 892 of file CG_elem.cpp.
array3D bitpit::CGElem::rotateVector | ( | array3D const & | vector, |
array3D const & | axis, | ||
double | theta ) |
rotates a vector in 3D using Rodrigues' formula.
[in] | vector | vector to be rotated |
[in] | axis | rotation axis |
[in] | theta | rotation angle |
Definition at line 2968 of file CG_elem.cpp.
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
[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 2725 of file CG_elem.cpp.
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.
[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 3107 of file CG_elem.cpp.
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.
[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 3087 of file CG_elem.cpp.
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
[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 2667 of file CG_elem.cpp.
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
[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 2684 of file CG_elem.cpp.
bool bitpit::CGElem::validBarycentric | ( | double const * | lambdaPtr, |
int | n ) |
Checks if barycentric coordinates is valid
[in] | lambdaPtr | pointer to barycentric coordinates |
[in] | n | number of points |
Definition at line 585 of file CG_elem.cpp.
bool bitpit::CGElem::validLine | ( | const array3D & | P, |
const array3D & | n ) |
Checks if a line is valid
[in] | P | point on line; |
[in] | n | line direction |
Definition at line 528 of file CG_elem.cpp.
bool bitpit::CGElem::validPlane | ( | const array3D & | P, |
const array3D & | n ) |
Checks if a plane is valid
[in] | P | point on plane |
[in] | n | plane normal |
Definition at line 540 of file CG_elem.cpp.
bool bitpit::CGElem::validSegment | ( | const array3D & | P0, |
const array3D & | P1 ) |
Checks if a segment is valid
[in] | P0 | start point of segment |
[in] | P1 | end point of segment |
Definition at line 517 of file CG_elem.cpp.
bool bitpit::CGElem::validTriangle | ( | const array3D & | P0, |
const array3D & | P1, | ||
const array3D & | P2 ) |
Checks if a triangle is valid
[in] | P0 | first triangle vertex |
[in] | P1 | second triangle vertex |
[in] | P2 | third triangle vertex |
Definition at line 553 of file CG_elem.cpp.
void bitpit::CGElem::vertexOfBox | ( | int | i, |
array3D const & | A0, | ||
array3D const & | A1, | ||
array3D & | P ) |
computes the vertex coordiantes of a box
[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 2899 of file CG_elem.cpp.
void bitpit::CGElem::vertexOfSegment | ( | int | i, |
array3D const & | V0, | ||
array3D const & | V1, | ||
array3D & | P ) |
returns the vertex coordiantes of a segment given its index
[in] | i | edge index |
[in] | V0 | first vertex of segment |
[in] | V1 | second vertex of segment |
[out] | P | vertex |
Definition at line 2755 of file CG_elem.cpp.
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
[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 2783 of file CG_elem.cpp.
const std::array< std::array<int,2>,12> bitpit::CGElem::boxEdgeVertexConnectivity |
The edge vertex connectivty of a box
const std::array< std::array<int,4>, 6> bitpit::CGElem::boxFaceVertexConnectivity |
const double bitpit::CGElem::DEFAULT_COPLANARITY_TOLERANCE = 1.e-12 |