Classes to represent geometric primitives like lines or polygons, as well as functions dealing exclusively with such objects.
More...
Classes to represent geometric primitives like lines or polygons, as well as functions dealing exclusively with such objects.
- Note
- This namespace contains improved versions of what is in the original and now deprecated GeometryLegacy namespace.
- See also
- ImFusionGeometry
|
|
std::ostream & | operator<< (std::ostream &o, const AlignedBox &b) |
| |
| int | fitCircle (const std::vector< vec2 > &pts, vec2 ¢er, double &radius, bool fixed[3], double *res=0, bool outlierRejection=false) |
| | Fit circle to points, using the Levenberg-Marquardt algorithm.
|
| |
|
double | fitCircleRANSAC (const std::vector< vec2 > &pts, vec3 &circleOut, std::vector< vec2 > &inliersOut, double inlierThreshold=1.0, double diameter=-1) |
| |
| double | fitCircleLeastSquares (const std::vector< vec2 > &pts, vec2 ¢er, double &radius) |
| | Fit circle to points, using a linear least squares fit.
|
| |
| int | fitCircle3D (const std::vector< vec3 > &pts, vec3 &outCenter, double &outRadius, mat3 &outR, double *outRes=0, bool rejectOutliers=false) |
| | Fit circle in 3D to points.
|
| |
| int | fitSphere (const std::vector< vec3 > &pts, vec3 ¢er, double &radius, bool fixed[4], double *res=0) |
| | Fit sphere to points.
|
| |
|
double | fitSphereRANSAC (const std::vector< vec3 > &pts, vec4 &circleOut, std::vector< vec3 > &inliersOut, double inlierThreshold, double diameter=-1) |
| |
|
SpherePivotResult | fitSpherePivotingPoses (const std::vector< mat4 > &pivotPoses) |
| |
| int | fitConic (const std::vector< vec2 > &pts, mat3 &C, double *res=0) |
| | Fit conic to points.
|
| |
| int | fitCylinder (const std::vector< vec3 > &pts, vec3 ¢er, double &radius, mat3 &R, double *res=0) |
| | Fit cylinder to points.
|
| |
| int | fitPlane (const std::vector< vec3 > &pts_, vec4 *plane, double *res=0, bool rejectOutliers=false) |
| | Fit plane to points.
|
| |
|
double | fitPlaneRANSAC (const std::vector< vec3 > &pts, vec4 &planeOut, std::vector< vec3 > &inliersOut, double inlierThreshold, int maxIter=100) |
| |
| void | fitAxesPCA (const std::vector< vec3 > &pts_, vec3 &outCentroid_, vec4(&outPlanes_)[3], bool scalePoints=true, vec3 *outEigenvalues=nullptr) |
| | Performs a PCA to fit the principal component axes to points.
|
| |
| int | fitLine (const std::vector< vec2 > &pts_, vec3 *line, double *res=0) |
| | Fit line to points.
|
| |
|
double | fitLineRANSAC (const std::vector< vec2 > &pts, vec3 &lineOut, std::vector< vec2 > &inliersOut, double inlierThreshold) |
| |
| double | fitLineRANSAC (const std::vector< vec3 > &pts, vec3 &lineOutOrigin, vec3 &lineOutDir, std::vector< vec3 > &inliersOut, double inlierThreshold) |
| | Fit line to inlier points.
|
| |
|
int | fitLine (const std::vector< vec3 > &pts_, vec3 &lineOutOrigin, vec3 &lineOutDir, double *res=0) |
| |
| std::optional< Geometry::Ellipse2D > | fitEllipse (const std::vector< vec2 > &pts) |
| | Fit ellipse to points using least squares.
|
| |
| std::vector< vec3 > | uniformDistributedPointsOnSphere (const int N) |
| | Picks uniform distributed points on the sphere, i.e.
|
| |
| std::vector< vec2 > | uniformDistributedPointsOnCircle (const int N) |
| | Picks uniform distributed points on the circle, i.e.
|
| |
|
- If the result has the same type as one of the arguments, it is a copy of the first such argument. In all other cases, the choice of variables that do not change the represented object (e.g. sign of normal) is arbitrary. Objects involving NAN or infinity will never intersect.
|
|
Utils::Variant< Line, vec3, std::nullptr_t > | intersection (const Line &l1, const Line &l2) |
| | Compute the intersection between two Lines or LineSegments.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Line &l1, const LineSegment &l2) |
| | Compute the intersection between two Lines or LineSegments.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l1, const Line &l2) |
| | Compute the intersection between two Lines or LineSegments.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l1, const LineSegment &l2) |
| | Compute the intersection between two Lines or LineSegments.
|
| |
|
Utils::Variant< Line, vec3, std::nullptr_t > | intersection (const Line &l, const Plane &p) |
| | Compute the intersection between a Line or LineSegment and a Plane.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l, const Plane &p) |
| | Compute the intersection between a Line or LineSegment and a Plane.
|
| |
| Utils::Variant< Line, vec3, std::nullptr_t > | intersection (const Plane &p, const Line &l) |
| | Compute the intersection between a Line or LineSegment and a Plane.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Plane &p, const LineSegment &l) |
| | Compute the intersection between a Line or LineSegment and a Plane.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Line &l, const Triangle &p) |
| | Compute the intersection between a Line or LineSegment and a Triangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l, const Triangle &p) |
| | Compute the intersection between a Line or LineSegment and a Triangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Triangle &t, const Line &l) |
| | Compute the intersection between a Line or LineSegment and a Triangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Triangle &t, const LineSegment &l) |
| | Compute the intersection between a Line or LineSegment and a Triangle.
|
| |
|
Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Line &l, const AlignedBox &c) |
| | Compute the intersection between a Line or LineSegment and a AlignedBox.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l, const AlignedBox &c) |
| | Compute the intersection between a Line or LineSegment and a AlignedBox.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const AlignedBox &c, const Line &l) |
| | Compute the intersection between a Line or LineSegment and a AlignedBox.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const AlignedBox &c, const LineSegment &l) |
| | Compute the intersection between a Line or LineSegment and a AlignedBox.
|
| |
| std::vector< vec3 > | intersection (const AlignedBox &cuboid, const Plane &plane) |
| | Compute the intersection between a AlignedBox and a Plane.
|
| |
| std::vector< vec3 > | intersection (const Plane &plane, const AlignedBox &cuboid) |
| | Compute the intersection between a AlignedBox and a Plane.
|
| |
|
Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Rectangle &p, const LineSegment &l) |
| | Compute the intersection between a LineSegment and a Rectangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const LineSegment &l, const Rectangle &p) |
| | Compute the intersection between a LineSegment and a Rectangle.
|
| |
|
Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Rectangle &p, const Line &l) |
| | Compute the intersection between a Line and a Rectangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersection (const Line &l, const Rectangle &p) |
| | Compute the intersection between a Line and a Rectangle.
|
| |
|
Utils::Variant< std::vector< vec3 >, LineSegment, vec3, std::nullptr_t > | intersection (const Rectangle &l, const Rectangle &p) |
| | Compute the intersection between two Rectangles.
|
| |
| Utils::Variant< AlignedBox, LineSegment, vec3, std::nullptr_t > | intersection (const AlignedBox &c, const AlignedBox &c2) |
| | Returns intersection between 2 boxes or nullptr in case of no intersection.
|
| |
|
Utils::Variant< Plane, Line, std::nullptr_t > | intersection (const Plane &p1, const Plane &p2) |
| | Compute the intersection between multiple planes.
|
| |
| Utils::Variant< Plane, Line, vec3, std::nullptr_t > | intersection (const Plane &p1, const Plane &p2, const Plane &p3) |
| | Compute the intersection between multiple planes.
|
| |
|
Utils::Variant< Triangle, LineSegment, vec3, std::nullptr_t > | intersection (const Plane &p, const Triangle &t) |
| | Compute the intersection between a Plane and a Triangle.
|
| |
| Utils::Variant< Triangle, LineSegment, vec3, std::nullptr_t > | intersection (const Triangle &t, const Plane &p) |
| | Compute the intersection between a Plane and a Triangle.
|
| |
| Utils::Variant< AlignedRectangle2D, vec3, std::nullptr_t > | intersection (const AlignedRectangle2D &r1, const AlignedRectangle2D &r2) |
| | Returns the intersection of 2 rectangles.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersectionFast (const Line &l, const Triangle &t) |
| | Compute the intersection between a Line and a Triangle.
|
| |
| Utils::Variant< LineSegment, vec3, std::nullptr_t > | intersectionFast (const Triangle &t, const Line &l) |
| | Compute the intersection between a Line and a Triangle.
|
| |