Class MeshMeasurements
Inheritance
MeshMeasurements
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public static class MeshMeasurements
Methods
AreaT(DMesh3, IEnumerable<Int32>)
Declaration
public static double AreaT(DMesh3 mesh, IEnumerable<int> triangleIndices)
Parameters
Returns
Bounds(DMesh3, Func<Vector3d, Vector3d>)
Declaration
public static AxisAlignedBox3d Bounds(DMesh3 mesh, Func<Vector3d, Vector3d> TransformF)
Parameters
Returns
Bounds(IMesh, Func<Vector3d, Vector3d>)
Declaration
public static AxisAlignedBox3d Bounds(IMesh mesh, Func<Vector3d, Vector3d> TransformF)
Parameters
Returns
BoundsInFrame(DMesh3, Frame3f, Func<Vector3d, Vector3d>)
calculate extents of mesh along axes of frame, with optional transform
Declaration
public static AxisAlignedBox3d BoundsInFrame(DMesh3 mesh, Frame3f frame, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
BoundsT(IMesh, IEnumerable<Int32>, Func<Vector3d, Vector3d>)
Declaration
public static AxisAlignedBox3d BoundsT(IMesh mesh, IEnumerable<int> triangleIndices, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
BoundsV(IMesh, IEnumerable<Int32>, Func<Vector3d, Vector3d>)
Declaration
public static AxisAlignedBox3d BoundsV(IMesh mesh, IEnumerable<int> vertexIndices, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
Centroid(DMesh3, Boolean)
Declaration
public static Vector3d Centroid(DMesh3 mesh, bool bOnlyTriVertices = true)
Parameters
Returns
Centroid(IEnumerable<Vector3d>)
Declaration
public static Vector3d Centroid(IEnumerable<Vector3d> vertices)
Parameters
Returns
Centroid<T>(IEnumerable<T>, Func<T, Vector3d>)
Declaration
public static Vector3d Centroid<T>(IEnumerable<T> values, Func<T, Vector3d> PositionF)
Parameters
Returns
Type Parameters
ExtentsOnAxis(DMesh3, Vector3d, Func<Vector3d, Vector3d>)
Calculate extents of mesh along an axis, with optional transform
Declaration
public static Interval1d ExtentsOnAxis(DMesh3 mesh, Vector3d axis, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
ExtentsOnAxis(IMesh, Vector3d, Func<Vector3d, Vector3d>)
Calculate extents of mesh along an axis, with optional transform
Declaration
public static Interval1d ExtentsOnAxis(IMesh mesh, Vector3d axis, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
ExtremeVertices(DMesh3, Vector3d, Func<Vector3d, Vector3d>)
Calculate the two most extreme vertices along an axis, with optional transform
Declaration
public static Interval1i ExtremeVertices(DMesh3 mesh, Vector3d axis, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
Genus(DMesh3)
Declaration
public static MeshMeasurements.GenusResult Genus(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
MassProperties(DMesh3, out Double, out Vector3d, out Double[,], Boolean)
Declaration
public static void MassProperties(DMesh3 mesh, out double mass, out Vector3d center, out double[, ] inertia3x3, bool bodyCoords = false)
Parameters
MassProperties(IEnumerable<Index3i>, Func<Int32, Vector3d>, out Double, out Vector3d, out Double[,], Boolean)
Declaration
public static void MassProperties(IEnumerable<Index3i> triangle_indices, Func<int, Vector3d> getVertexF, out double mass, out Vector3d center, out double[, ] inertia3x3, bool bodyCoords = false)
Parameters
VertexOneRingArea(DMesh3, Int32, Boolean)
Compute area of one-ring of mesh vertex by summing triangle areas.
If bDisjoint = true, we multiple each triangle area by 1/3
Declaration
public static double VertexOneRingArea(DMesh3 mesh, int vid, bool bDisjoint = true)
Parameters
Returns
VolumeArea(DMesh3, IEnumerable<Int32>, Func<Int32, Vector3d>)
Compute volume and surface area of triangles of mesh.
Return value is (volume,area)
Note that if triangles don't define closed region, volume is probably nonsense...
Declaration
public static Vector2d VolumeArea(DMesh3 mesh, IEnumerable<int> triangles, Func<int, Vector3d> getVertexF)
Parameters
Returns