Comment on page
Mesh Tools
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.
These articles are made possible by our GitHub Sponsors ... become a sponsor today!
public static class MeshTools
Found in namespace:
using HeathenEngineering.PhysKit.API;
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
API.MeshTools
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);
or
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);
Last modified 5mo ago