BomberUnits
...a Unity learning project
MeshWelder Class Reference
+ Collaboration diagram for MeshWelder:

Public Member Functions

Mesh Weld (List< GameObject > objectsWithMeshColliders)
 

Private Member Functions

void ExtractVerticesAndTris (List< GameObject > objectsWithMeshColliders)
 A vertex is referenced by other mesh code via its position in the vertex array. More...
 
void RoundVertices (float roundDist)
 
void WeldColocatedVertices ()
 

Private Attributes

List< Vector3 > allVertices = new List<Vector3>()
 Collects all given mesh vertices.
 
List< int > allTris = new List<int>()
 Collects all given mesh triangles.
 

Detailed Description

Definition at line 9 of file MeshWelder.cs.

Member Function Documentation

◆ ExtractVerticesAndTris()

void ExtractVerticesAndTris ( List< GameObject >  objectsWithMeshColliders)
inlineprivate

A vertex is referenced by other mesh code via its position in the vertex array.

In writing all Vertices into a common list, we need to update the indices triangles refer to. We thus keep a counter which offsets a new set of incoming vertices with the nr of already present entries.

Definition at line 32 of file MeshWelder.cs.


The documentation for this class was generated from the following file: