Krabl Mesh Library
A C# library to process meshes in Unity3D
 All Classes Namespaces Functions Variables Pages
List of all members
KrablMesh.ImportExport Class Reference

Description

Static methods to convert between Unity meshes and Krabl Mesh Library meshes.

Functions

static void KrablMesh.ImportExport.UnityMeshToMeshEdges ( UnityEngine.Mesh  unityMesh,
KrablMesh.MeshEdges  meshEdges,
float  tolerance = 0.0f 
)
static

Copies a Unity Mesh to a KrablMesh.MeshEdges.

Parameters
unityMeshThe Unity Mesh to use as input.
meshEdgesThe KrablMesh.meshEdges to fill with the data from the input mesh. Needs to be empty.
toleranceThe maximum difference between two values (vertex coordinates, normal coordinates) to treat as begin equal. Some modelling software outputs float values that are only almost the same when they should be the same. In this case using a tolerance of about 1e-5f can fix problems.
static void KrablMesh.ImportExport.MeshEdgesToUnityMesh ( KrablMesh.MeshEdges  meshEdges,
UnityEngine.Mesh  unityMesh 
)
static

Copy mesh data from a KrablMesh meshEdges to a Unity Mesh.

Parameters
meshEdgesThe input mesh.
unityMeshThe output Unity Mesh. Any data it contains will be overwritten.