Functions | |
| bool | isPointGreaterThan (const CscPoint3d *a, const CscPoint3d *b) |
| bool | equalCscPoint3d (const CscPoint3d *a, const CscPoint3d *b) |
| void | removeDuplicatePositionsPerf (vector< CscPoint3d * > *positions) |
| double | degToRad (const double °ree) |
| float | degToRad (const float °ree) |
| double | radToDeg (const double &radian) |
| double | getShortestAngleSigned (const double &fromAngle, const double &toAngle) |
| double | averageOfAngleInRad (const vector< double > &angles) |
| double | averageOfAngleInDeg (const vector< double > &angles) |
| double | angleAdjustment (const double &angle) |
| double | angleAdjustmentRadsPiToMinusPi (const double &angle) |
| CscQuaternion | toQuaternion (double yaw, double pitch, double roll) |
| Quaternion is a matrix representation of a rotation in a 3D space. Used to simplify some calculs. More... | |
| double | calculateAngleBetweenTwoPosition (CscPoint3d *secondPosition, CscPoint3d *firstPosition) |
| double | distanceBetween (double x1, double y1, double x2, double y2) |
| CscQuaternion | multiplyQuaternion (const CscQuaternion &quaternion1, const CscQuaternion &quaternion2) |
| CscPoint3d * | rotatePointWithQuaternion (CscPoint3d *point, const CscQuaternion &quaternion) |
| CscPoint3d * | transformPointFromMatrix (const CscPoint3d *point, const vector< double > &matrix) |
| vector< double > | multiplyMatrices (const vector< double > &matrix1, vector< double > &matrix2) |
| Vec4 | multiplyMatrixVec4 (const double matrix[4][4], const Vec4 &vec) |
| void | multiplyMat4 (const double a[4][4], const double b[4][4], double result[4][4]) |
| string | mat4ToString (const double matrix[4][4]) |
| string | vec3ToString (const Vec3 &vec) |
| void | copyMat4 (const double source[4][4], double target[4][4]) |
| bool | comparePoint3d (const CscPoint3d *p1, const CscPoint3d *p2) |
| Compares two 3D points for equality, if a point is nullptr , return true only if the second is nullptr. More... | |
| double | getPointsHighestX (const std::vector< const CscPoint3d * > &areaVertices, optional< double > precision) |
| double | getPointsLowestX (const std::vector< const CscPoint3d * > &areaVertices, optional< double > precision) |
| double | getPointsHighestZ (const std::vector< const CscPoint3d * > &areaVertices, optional< double > precision) |
| double | getPointsLowestZ (const std::vector< const CscPoint3d * > &areaVertices, optional< double > precision) |
| bool | isPointInsideArea (const std::vector< const CscPoint3d * > &areaVertices, CscPoint3d *pointToCheck) |
| float | getMinXForUpStep (float upMin, float upMax, const vector< CscPoint3d * > *positions) |
| float | getMaxXForUpStep (float upMin, float upMax, const vector< CscPoint3d * > *positions) |
| float | getMinYForUpStep (float upMin, float upMax, const vector< CscPoint3d * > *positions) |
| float | getMaxYForUpStep (float upMin, float upMax, const vector< CscPoint3d * > *positions) |
| CscPoint3d * | zUpToYup (CscPoint3d *position) |
| CscPoint3d * | getMinPoint (vector< CscPoint3d * > *positions) |
| CscPoint3d * | getMaxPoint (vector< CscPoint3d * > *positions) |
| void | removeDuplicatePositions (vector< CscPoint3d * > *positions) |
| double | dotXZ (const CscPoint3d &a, const CscPoint3d &b) |
| double | normXZ (const CscPoint3d &v) |
| CscPoint3d | normalizeXZ (const CscPoint3d &v) |
| CscPoint3d | perpendicularXZ (const CscPoint3d &v) |
| double | signedDistanceToLineXZ (const CscPoint3d &p, const CscPoint3d &origin, const CscPoint3d &normal) |
| bool | pointInTriangleXZWithEpsilon (const CscPoint3d &pt, const CscPoint3d &a, const CscPoint3d &b, const CscPoint3d &c, double epsilon) |
| bool | pointInQuadXZWithEpsilon (const CscPoint3d &pt, const CscPoint3d &p1, const CscPoint3d &p2, const CscPoint3d &p3, const CscPoint3d &p4, double epsilon) |
| vector< CscPoint3d * > | slicePolygonsAtY (const vector< CscPolygon * > &polygons, double ySlice, double precisionCm=5.0) |
| Computes the 2D slice (plan cut) at Y = ySlice and returns a flat list of unique points. Internally builds closed contours and welds nearby vertices (tolerance = precisionCm). The result is a clean set of points that form continuous walls when drawn with nearest-neighbour or contour lines. More... | |
| CscPoint3d * | rotatePointWithQuaternion (const CscPoint3d *point, const CscQuaternion &quaternion) |
| vector< double > | multiplyMatrices (const vector< double > &matrix1, const vector< double > &matrix2) |
| CscPoint3d * | getMinPoint (std::vector< CscPoint3d * > *positions) |
| CscPoint3d * | getMaxPoint (std::vector< CscPoint3d * > *positions) |
| void | removeDuplicatePositions (std::vector< CscPoint3d * > *positions) |
| void | removeDuplicatePositionsPerf (std::vector< CscPoint3d * > *positions) |
| double | getIntersectionOverUnion (const cv::Rect2d &bb1, const cv::Rect2d &bb2) |
| bool | isRotationMatrix (const cv::Mat &R) |
| void | rotateMatrix (const cv::Mat &src, double angleDegrees, cv::Mat &target, cv::Scalar fillColor) |
| cv::Vec3f | rotationMatrixToEulerAngles (const cv::Mat &R) |
| bool | matIsEqual (const cv::Mat &img1, const cv::Mat &img2) |
| template<typename T > | |
| bool | isIncludedInOther (const cv::Rect_< T > &rect1, const cv::Rect_< T > &rect2) |
| template<typename T > | |
| cv::Point_< T > | rectangleCenter (const cv::Rect_< T > &rect) |
| template<typename T > | |
| T | distanceBetween (const cv::Point_< T > &point, const cv::Point_< T > &point2) |
| template<typename T > | |
| cv::Point_< T > | pointsCenter (const cv::Point_< T > &point, const cv::Point_< T > &point2) |
| template<typename T > | |
| T | distanceBetween (const cv::Rect_< T > &rectangle1, const cv::Rect_< T > &rectangle2) |
| template<typename T > | |
| string | rectToString (const cv::Rect_< T > &rect) |
| template<typename T > | |
| string | pointToString (const cv::Point_< T > &point) |
| template<typename T > | |
| string | sizeToString (const cv::Size_< T > &size) |
| template<typename T > | |
| cv::Rect_< T > | averageRectangle (const vector< cv::Rect_< T >> &rectangles) |
| template<typename T > | |
| bool | equals (const cv::Size_< T > &size1, const cv::Size_< T > &size2) |
| template<typename T > | |
| double | anglePointsInRad (const cv::Point_< T > &point, const cv::Point_< T > &point2) |
| double conscience_utils::geom::angleAdjustment | ( | const double & | angle | ) |
Reduces the results in-between [-180;180] interval counterclock-wise. parameter in degree
| double conscience_utils::geom::angleAdjustmentRadsPiToMinusPi | ( | const double & | angle | ) |
Reduces the results in-between [PI;-PI] interval
| double conscience_utils::geom::anglePointsInRad | ( | const cv::Point_< T > & | point, |
| const cv::Point_< T > & | point2 | ||
| ) |
computes angle between two points. point is the reference, point 2 is the other drawing the line of the angle
| double conscience_utils::geom::averageOfAngleInDeg | ( | const vector< double > & | angles | ) |
parameters in degrees and returns in degrees. interval [-180;180]
| double conscience_utils::geom::averageOfAngleInRad | ( | const vector< double > & | angles | ) |
parameters in radians and returns in radians. interval [-π;π]
| cv::Rect_<T> conscience_utils::geom::averageRectangle | ( | const vector< cv::Rect_< T >> & | rectangles | ) |
| double conscience_utils::geom::calculateAngleBetweenTwoPosition | ( | CscPoint3d * | secondPosition, |
| CscPoint3d * | firstPosition | ||
| ) |
Angle calculation in a -180 to 180 degree trigonometry. Warning : the importance of order in parameter, switching the 2 position will change the resuls.
| bool conscience_utils::geom::comparePoint3d | ( | const CscPoint3d * | p1, |
| const CscPoint3d * | p2 | ||
| ) |
Compares two 3D points for equality, if a point is nullptr , return true only if the second is nullptr.
| void conscience_utils::geom::copyMat4 | ( | const double | source[4][4], |
| double | target[4][4] | ||
| ) |
| double conscience_utils::geom::degToRad | ( | const double & | degree | ) |
Results will be defined in-between [-π;π] counterclock-wise
| float conscience_utils::geom::degToRad | ( | const float & | degree | ) |
| T conscience_utils::geom::distanceBetween | ( | const cv::Point_< T > & | point, |
| const cv::Point_< T > & | point2 | ||
| ) |
| T conscience_utils::geom::distanceBetween | ( | const cv::Rect_< T > & | rectangle1, |
| const cv::Rect_< T > & | rectangle2 | ||
| ) |
Distance between rectangles centers
| double conscience_utils::geom::distanceBetween | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2 | ||
| ) |
| double conscience_utils::geom::dotXZ | ( | const CscPoint3d & | a, |
| const CscPoint3d & | b | ||
| ) |
Returns the scalar product of two 3D vectors, considering only their X and Z components.
| bool conscience_utils::geom::equalCscPoint3d | ( | const CscPoint3d * | a, |
| const CscPoint3d * | b | ||
| ) |
| bool conscience_utils::geom::equals | ( | const cv::Size_< T > & | size1, |
| const cv::Size_< T > & | size2 | ||
| ) |
| double conscience_utils::geom::getIntersectionOverUnion | ( | const cv::Rect2d & | bb1, |
| const cv::Rect2d & | bb2 | ||
| ) |
| CscPoint3d* conscience_utils::geom::getMaxPoint | ( | std::vector< CscPoint3d * > * | positions | ) |
| CscPoint3d* conscience_utils::geom::getMaxPoint | ( | vector< CscPoint3d * > * | positions | ) |
| float conscience_utils::geom::getMaxXForUpStep | ( | float | upMin, |
| float | upMax, | ||
| const vector< CscPoint3d * > * | positions | ||
| ) |
| float conscience_utils::geom::getMaxYForUpStep | ( | float | upMin, |
| float | upMax, | ||
| const vector< CscPoint3d * > * | positions | ||
| ) |
| CscPoint3d* conscience_utils::geom::getMinPoint | ( | std::vector< CscPoint3d * > * | positions | ) |
| CscPoint3d* conscience_utils::geom::getMinPoint | ( | vector< CscPoint3d * > * | positions | ) |
| float conscience_utils::geom::getMinXForUpStep | ( | float | upMin, |
| float | upMax, | ||
| const vector< CscPoint3d * > * | positions | ||
| ) |
| float conscience_utils::geom::getMinYForUpStep | ( | float | upMin, |
| float | upMax, | ||
| const vector< CscPoint3d * > * | positions | ||
| ) |
| double conscience_utils::geom::getPointsHighestX | ( | const std::vector< const CscPoint3d * > & | areaVertices, |
| optional< double > | precision | ||
| ) |
| double conscience_utils::geom::getPointsHighestZ | ( | const std::vector< const CscPoint3d * > & | areaVertices, |
| optional< double > | precision | ||
| ) |
| double conscience_utils::geom::getPointsLowestX | ( | const std::vector< const CscPoint3d * > & | areaVertices, |
| optional< double > | precision | ||
| ) |
| double conscience_utils::geom::getPointsLowestZ | ( | const std::vector< const CscPoint3d * > & | areaVertices, |
| optional< double > | precision | ||
| ) |
| double conscience_utils::geom::getShortestAngleSigned | ( | const double & | fromAngle, |
| const double & | toAngle | ||
| ) |
Angle calculation in a -180 to 180 degree trigonometry. Warning : the importance of order in parameter, switching the 2 angles will change the resuls.
| bool conscience_utils::geom::isIncludedInOther | ( | const cv::Rect_< T > & | rect1, |
| const cv::Rect_< T > & | rect2 | ||
| ) |
Returns true if first rectangle is inside second, and vice & versa
| bool conscience_utils::geom::isPointGreaterThan | ( | const CscPoint3d * | a, |
| const CscPoint3d * | b | ||
| ) |
| bool conscience_utils::geom::isPointInsideArea | ( | const std::vector< const CscPoint3d * > & | areaVertices, |
| CscPoint3d * | pointToCheck | ||
| ) |
| bool conscience_utils::geom::isRotationMatrix | ( | const cv::Mat & | R | ) |
| string conscience_utils::geom::mat4ToString | ( | const double | matrix[4][4] | ) |
| bool conscience_utils::geom::matIsEqual | ( | const cv::Mat & | img1, |
| const cv::Mat & | img2 | ||
| ) |
| void conscience_utils::geom::multiplyMat4 | ( | const double | a[4][4], |
| const double | b[4][4], | ||
| double | result[4][4] | ||
| ) |
| vector<double> conscience_utils::geom::multiplyMatrices | ( | const vector< double > & | matrix1, |
| const vector< double > & | matrix2 | ||
| ) |
| vector<double> conscience_utils::geom::multiplyMatrices | ( | const vector< double > & | matrix1, |
| vector< double > & | matrix2 | ||
| ) |
| CscQuaternion conscience_utils::geom::multiplyQuaternion | ( | const CscQuaternion & | quaternion1, |
| const CscQuaternion & | quaternion2 | ||
| ) |
return a NEW quaternion corresponding to the multiplication of the 2 quaternions given
| CscPoint3d conscience_utils::geom::normalizeXZ | ( | const CscPoint3d & | v | ) |
Returns a unit vector (length = 1) in the same XZ direction as the input vector. If the vector is zero-length in the XZ plane, returns a zero vector.
| double conscience_utils::geom::normXZ | ( | const CscPoint3d & | v | ) |
Computes the Euclidean norm (length) of a vector using only its X and Z components.
| CscPoint3d conscience_utils::geom::perpendicularXZ | ( | const CscPoint3d & | v | ) |
Returns a vector rotated 90 degrees to the left (counter-clockwise) in the XZ plane. The Y component is always set to zero.
| bool conscience_utils::geom::pointInQuadXZWithEpsilon | ( | const CscPoint3d & | pt, |
| const CscPoint3d & | p1, | ||
| const CscPoint3d & | p2, | ||
| const CscPoint3d & | p3, | ||
| const CscPoint3d & | p4, | ||
| double | epsilon | ||
| ) |
Checks if a point is inside a quadrilateral (p1->p2->p3->p4, XZ plane) with an epsilon tolerance
| bool conscience_utils::geom::pointInTriangleXZWithEpsilon | ( | const CscPoint3d & | pt, |
| const CscPoint3d & | a, | ||
| const CscPoint3d & | b, | ||
| const CscPoint3d & | c, | ||
| double | epsilon | ||
| ) |
Checks if a point is inside a triangle (XZ plane) with an epsilon tolerance
|
inline |
| string conscience_utils::geom::pointToString | ( | const cv::Point_< T > & | point | ) |
| double conscience_utils::geom::radToDeg | ( | const double & | radian | ) |
Results will be defined in-between [-180;180] counterclock-wise
| cv::Point_<T> conscience_utils::geom::rectangleCenter | ( | const cv::Rect_< T > & | rect | ) |
| string conscience_utils::geom::rectToString | ( | const cv::Rect_< T > & | rect | ) |
| void conscience_utils::geom::removeDuplicatePositions | ( | std::vector< CscPoint3d * > * | positions | ) |
| void conscience_utils::geom::removeDuplicatePositions | ( | vector< CscPoint3d * > * | positions | ) |
| void conscience_utils::geom::removeDuplicatePositionsPerf | ( | std::vector< CscPoint3d * > * | positions | ) |
| void conscience_utils::geom::removeDuplicatePositionsPerf | ( | vector< CscPoint3d * > * | positions | ) |
| void conscience_utils::geom::rotateMatrix | ( | const cv::Mat & | src, |
| double | angleDegrees, | ||
| cv::Mat & | target, | ||
| cv::Scalar | fillColor | ||
| ) |
| CscPoint3d* conscience_utils::geom::rotatePointWithQuaternion | ( | const CscPoint3d * | point, |
| const CscQuaternion & | quaternion | ||
| ) |
return a NEW point corresponding to point rotate with the quaternion
| CscPoint3d* conscience_utils::geom::rotatePointWithQuaternion | ( | CscPoint3d * | point, |
| const CscQuaternion & | quaternion | ||
| ) |
| cv::Vec3f conscience_utils::geom::rotationMatrixToEulerAngles | ( | const cv::Mat & | R | ) |
| double conscience_utils::geom::signedDistanceToLineXZ | ( | const CscPoint3d & | p, |
| const CscPoint3d & | origin, | ||
| const CscPoint3d & | normal | ||
| ) |
Computes the signed distance from point p to a line defined by an origin and a unit normal vector in the XZ plane. The sign indicates which side of the line the point is on.
| string conscience_utils::geom::sizeToString | ( | const cv::Size_< T > & | size | ) |
| vector< CscPoint3d * > conscience_utils::geom::slicePolygonsAtY | ( | const vector< CscPolygon * > & | polygons, |
| double | ySlice, | ||
| double | precisionCm = 5.0 |
||
| ) |
Computes the 2D slice (plan cut) at Y = ySlice and returns a flat list of unique points. Internally builds closed contours and welds nearby vertices (tolerance = precisionCm). The result is a clean set of points that form continuous walls when drawn with nearest-neighbour or contour lines.
| polygons | Input triangle mesh (coordinates in centimeters) |
| ySlice | Y level of the cutting plane (in centimeters) |
| precisionCm | Tolerance in centimeters for welding nearby intersection points Default = 5.0 cm |
| CscQuaternion conscience_utils::geom::toQuaternion | ( | double | yaw, |
| double | pitch, | ||
| double | roll | ||
| ) |
Quaternion is a matrix representation of a rotation in a 3D space. Used to simplify some calculs.
| CscPoint3d * conscience_utils::geom::transformPointFromMatrix | ( | const CscPoint3d * | point, |
| const vector< double > & | matrix | ||
| ) |
| string conscience_utils::geom::vec3ToString | ( | const Vec3 & | vec | ) |
| CscPoint3d * conscience_utils::geom::zUpToYup | ( | CscPoint3d * | position | ) |