Class MeshUtil
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public static class MeshUtil
Methods
CheckIfCollapseCreatesFlip(DMesh3, Int32, Vector3d)
Check if collapsing edge edgeID to point newv will flip normal of any attached face
Declaration
public static bool CheckIfCollapseCreatesFlip(DMesh3 mesh, int edgeID, Vector3d newv)
Parameters
Returns
CheckIfEdgeFlipCreatesFlip(DMesh3, Int32, Double)
if before a flip we have normals (n1,n2) and after we have (m1,m2), check if
the dot between any of the 4 pairs changes sign after the flip, or is
less than the dot-product tolerance (ie angle tolerance)
Declaration
public static bool CheckIfEdgeFlipCreatesFlip(DMesh3 mesh, int eID, double flip_dot_tol = 0)
Parameters
Returns
CotanSmooth(DMesh3, Int32, Double)
Declaration
public static Vector3d CotanSmooth(DMesh3 mesh, int vID, double t)
Parameters
Returns
DiscreteGaussCurvature(DMesh3, Int32)
computes sum of opening-angles in triangles around vid, minus 2pi.
This is zero on flat areas.
Declaration
public static double DiscreteGaussCurvature(DMesh3 mesh, int vid)
Parameters
Returns
Declaration
public static DCurve3 ExtractLoopV(IMesh mesh, IEnumerable<int> vertices)
Parameters
Returns
Declaration
public static DCurve3 ExtractLoopV(IMesh mesh, int[] vertices)
Parameters
Returns
GetEdgeFlipNormals(DMesh3, Int32, out Vector3d, out Vector3d, out Vector3d, out Vector3d)
For given edge, return normals of it's two triangles, and normals
of the triangles created if edge is flipped (used in edge-flip optimizers)
Declaration
public static void GetEdgeFlipNormals(DMesh3 mesh, int eID, out Vector3d n1, out Vector3d n2, out Vector3d on1, out Vector3d on2)
Parameters
GetEdgeFlipTris(DMesh3, Int32, out Index3i, out Index3i, out Index3i, out Index3i)
For given edge, return it's triangles and the triangles that would
be created if it was flipped (used in edge-flip optimizers)
Declaration
public static void GetEdgeFlipTris(DMesh3 mesh, int eID, out Index3i orig_t0, out Index3i orig_t1, out Index3i flip_t0, out Index3i flip_t1)
Parameters
MeanValueSmooth(DMesh3, Int32, Double)
Declaration
public static Vector3d MeanValueSmooth(DMesh3 mesh, int vID, double t)
Parameters
Returns
OpeningAngleD(DMesh3, Int32)
computes opening angle between the two triangles connected to edge
Declaration
public static double OpeningAngleD(DMesh3 mesh, int eid)
Parameters
Returns
ScaleMesh(DMesh3, Frame3f, Vector3f)
Declaration
public static void ScaleMesh(DMesh3 mesh, Frame3f f, Vector3f vScale)
Parameters
Declaration
public static Vector3d UniformSmooth(DMesh3 mesh, int vID, double t)
Parameters
Returns