Functions | |
template<typename T > | |
Vector2< T > | MR::unfoldOnPlane (const Vector3< T > &b, const Vector3< T > &c, const Vector2< T > &d, bool toLeftFrom0d) |
template<typename T > | |
T | MR::shortestPathInQuadrangle (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d) |
template<typename T > | |
bool | MR::isUnfoldQuadrangleConvex (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, const Vector3< T > &d) |
MRMESH_API bool | MR::reducePathViaVertex (const Mesh &mesh, const MeshTriPoint &start, VertId v, const MeshTriPoint &end, SurfacePath &outPath, std::vector< Vector2f > &tmp, SurfacePath &cachePath) |
MRMESH_API int | MR::reducePath (const Mesh &mesh, const MeshTriPoint &start, SurfacePath &path, const MeshTriPoint &end, int maxIter=5) |
bool MR::isUnfoldQuadrangleConvex | ( | const Vector3< T > & | a, |
const Vector3< T > & | b, | ||
const Vector3< T > & | c, | ||
const Vector3< T > & | d ) |
given two 3D triangles ABC and ACD with shared edge AC, returns true if after unfolding into plane they form a convex quadrangle
MRMESH_API int MR::reducePath | ( | const Mesh & | mesh, |
const MeshTriPoint & | start, | ||
SurfacePath & | path, | ||
const MeshTriPoint & | end, | ||
int | maxIter = 5 ) |
converts any input surface path into geodesic path (so reduces its length): start-path-end; returns actual number of iterations performed
MRMESH_API bool MR::reducePathViaVertex | ( | const Mesh & | mesh, |
const MeshTriPoint & | start, | ||
VertId | v, | ||
const MeshTriPoint & | end, | ||
SurfacePath & | outPath, | ||
std::vector< Vector2f > & | tmp, | ||
SurfacePath & | cachePath ) |
given path s-v-e, tries to decrease its length by moving away from v
outPath | intermediate locations between s and e will be added here |
tmp | elements will be temporary allocated here |
cachePath | as far as we need two sides unfold, cache one to reduce allocations |
T MR::shortestPathInQuadrangle | ( | const Vector3< T > & | a, |
const Vector3< T > & | b, | ||
const Vector3< T > & | c, | ||
const Vector3< T > & | d ) |
given two 3D triangles ABC and ACD with shared edge AC, returns the relative position x in [0,1] on edge AC (x=0 means A and x=1 means C), where the shortest path from B to D crosses edge AC