![]() |
ImFusion SDK 4.3
|
Mesh processing algorithms related to geometrical operations. More...
Mesh processing algorithms related to geometrical operations.
Classes | |
| struct | DominantPlaneOptimizerSettings |
| Structure representing the settings for the optimizor used to compute dominant plane of the mesh. More... | |
Functions | |
| std::vector< std::vector< vec3 > > | intersection (const Mesh &mesh, const ImFusion::Geometry::Plane &plane) |
| Computes an intersection of a mesh and a plane. | |
| bool | intersects (const Mesh &mesh, const ImFusion::Geometry::Plane &plane, double tolerance=0.0, double *outDistance=nullptr) |
| Computes an intersection of a mesh and a plane. | |
| std::vector< vec3 > | intersection (const Mesh &mesh, const ImFusion::Geometry::Line &line) |
| Computes all intersections between the given mesh and a line. | |
| std::vector< vec3 > | intersection (const Mesh &mesh, const ImFusion::Geometry::LineSegment &line) |
| bool | meshDistance (const Mesh &meshSrc, const Mesh &meshDst, std::vector< double > &dist, bool computeSurfaceDistance=true, bool signedDistance=false) |
| Compute the nearest neighbor distance to the source mesh for every destination mesh vertex. | |
| bool | pointToSurfaceDistance (const Mesh &meshSrc, const std::vector< vec3 > &pointsDst, std::vector< double > &dist, bool signedDistance=false, std::vector< int > *closestFaceId=nullptr, Progress *p=nullptr) |
| Compute the nearest neighbor distance to the source mesh for every destination point. | |
| bool | pointToPointDistance (const std::vector< vec3 > &pointsSrc, const std::vector< vec3 > &pointsDst, std::vector< double > &dist, std::vector< int > *srcToDstMapping=nullptr) |
| Compute the nearest neighbor distance to the source points for every destination point. | |
| bool | isPointInsideMesh (const Mesh &mesh, const vec3 &p) |
| Estimate location of the point with respect to mesh. | |
| ImFusion::Geometry::Line | findMajorAxis (const Mesh &mesh) |
| Estimate the major axis of the mesh. | |
| ImFusion::Geometry::Plane | findDominantPlane (const Mesh &mesh, double *inlierRatio=nullptr, const ImFusion::MeshProcessing::Geometry::DominantPlaneOptimizerSettings &settings=ImFusion::MeshProcessing::Geometry::DominantPlaneOptimizerSettings()) |
| Estimate a dominant plane of the mesh. | |
| std::vector< std::vector< vec3 > > intersection | ( | const Mesh & | mesh, |
| const ImFusion::Geometry::Plane & | plane ) |
Computes an intersection of a mesh and a plane.
| [in] | mesh | mesh |
| [in] | plane | plane |
| bool intersects | ( | const Mesh & | mesh, |
| const ImFusion::Geometry::Plane & | plane, | ||
| double | tolerance = 0.0, | ||
| double * | outDistance = nullptr ) |
Computes an intersection of a mesh and a plane.
| [in] | mesh | mesh |
| [in] | plane | plane |
| [in] | tolerance | Optional tolerance in world units for the intersection computation |
| [out] | outDistance | Optional output parameter to return unsigned distance from the closest vertex to plane. Will be set to 0 if the plane intersects the mesh within the specified tolerance |
| std::vector< vec3 > intersection | ( | const Mesh & | mesh, |
| const ImFusion::Geometry::Line & | line ) |
Computes all intersections between the given mesh and a line.
| [in] | mesh | mesh |
| [in] | line | line |
| bool meshDistance | ( | const Mesh & | meshSrc, |
| const Mesh & | meshDst, | ||
| std::vector< double > & | dist, | ||
| bool | computeSurfaceDistance = true, | ||
| bool | signedDistance = false ) |
Compute the nearest neighbor distance to the source mesh for every destination mesh vertex.
| [in] | meshSrc | source mesh |
| [in] | meshDst | destination mesh |
| [out] | dist | vector of distances between vertices of meshDst and meshSrc, its size is the number of vertices in meshDst |
| [in] | computeSurfaceDistance | if false, the distance from each vertex of MeshDst to closest vertex of MeshSrc will be computed, otherwise the distance from each vertex of MeshDst to the surface of MeshSrc will be computed |
| [in] | signedDistance | if true, the signed distance will be computed, otherwise an absolute distance will be computed. Note that signed distances only work when computeSurfaceDistance is true |
| bool pointToSurfaceDistance | ( | const Mesh & | meshSrc, |
| const std::vector< vec3 > & | pointsDst, | ||
| std::vector< double > & | dist, | ||
| bool | signedDistance = false, | ||
| std::vector< int > * | closestFaceId = nullptr, | ||
| Progress * | p = nullptr ) |
Compute the nearest neighbor distance to the source mesh for every destination point.
| [in] | meshSrc | source mesh |
| [in] | pointsDst | destination points |
| [out] | dist | vector of distances between meshSrc and pointsDst, its size is the size of pointsDst |
| [in] | signedDistance | if true, the signed distance will be computed, otherwise an absolute distance will be computed |
| [out] | closestFaceId | optional vector containing the ids of the closest faces from meshSrc |
| bool pointToPointDistance | ( | const std::vector< vec3 > & | pointsSrc, |
| const std::vector< vec3 > & | pointsDst, | ||
| std::vector< double > & | dist, | ||
| std::vector< int > * | srcToDstMapping = nullptr ) |
Compute the nearest neighbor distance to the source points for every destination point.
| [in] | pointsSrc | source points |
| [in] | pointsDst | destination points |
| [out] | dist | vector of distances between pointsSrc and pointsDst, its size is the size of pointsDst |
| [out] | srcToDstMapping | optional vector representing the mapping between pointsSrc to pointsDst, has the size of pointsDst |
| bool isPointInsideMesh | ( | const Mesh & | mesh, |
| const vec3 & | p ) |
Estimate location of the point with respect to mesh.
Points on the mesh will be considered as inside
| [in] | mesh | |
| [in] | p | point |
| ImFusion::Geometry::Line findMajorAxis | ( | const Mesh & | mesh | ) |
Estimate the major axis of the mesh.
| [in] | mesh | mesh |
| ImFusion::Geometry::Plane findDominantPlane | ( | const Mesh & | mesh, |
| double * | inlierRatio = nullptr, | ||
| const ImFusion::MeshProcessing::Geometry::DominantPlaneOptimizerSettings & | settings = ImFusion::MeshProcessing::Geometry::DominantPlaneOptimizerSettings() ) |
Estimate a dominant plane of the mesh.
| [in] | mesh | mesh |
| [out] | inlierRatio | (optional) ratio of inlier faces wrt to total number of faces |
| [in] | settings | (optional) settings for the optimizor |