Comment on page
public static class MeshTools
Found in namespace:
We recomend using aliases to reduce typing and simplify names. and reduce possible collisions with similarly named objects.
using API = HeathenEngineering.PhysKit.API;
doing this you can fully qualify the name of this class as
Mesh tools is used to create convex hulls, calculate the volume of a mesh, find surface area and various other geometry functions handy when your working on physics problems.
The most common use of mesh tools is to create a convex hull. You can get a convex hull for a single mesh, multiple mesh or for any collection of points in space.
var mesh = MeshTools.ConvexHull(meshfilters);
var mesh = MeshTools.ConvexHull(meshes);
var mesh = MeshTools.ConvexHull(vertexList);
You can find the volume of a mesh, or find the convex hull of a mesh then find the volume of that
var volume = MeshTools.VolumeOfConvexMesh(mesh, scale);
var volume = MeshTools.VolumeOfMesh(mesh, scale);
var surface = MeshTools.SurfaceArea(mesh);
var surface = MeshTools.FacingSurfaceArea(mesh, direction);
A quick short cut to do both
MeshTools.GetAreaAndVolume(mesh, scale, out surface, out volume);