using UnityEngine; using System.Collections; namespace LunarCatsStudio.SuperCombiner { /// /// The combine instance indexes of vertex and triangles /// [System.Serializable] public class CombineInstanceIndexes { // Index of the first vertex in mesh.vertices public int firstVertexIndex; // The vertexcount public int vertexCount; // Index of the first triangle in mesh.triangles public int firstTriangleIndex; // The trianglecount public int triangleCount; // Editor display parameter public bool showCombinedInstanceIndex; /// /// Constructor /// /// /// /// public CombineInstanceIndexes(Mesh mesh, int vertexIndex, int trianglesIndex) { vertexCount = mesh.vertexCount; firstVertexIndex = vertexIndex; triangleCount = mesh.triangles.Length; firstTriangleIndex = trianglesIndex; } /// /// Offset first indexes for vertices and triangles /// /// /// public void MoveIndexes(int vertexOffset_p, int triangleOffset_p) { firstVertexIndex -= vertexOffset_p; firstTriangleIndex -= triangleOffset_p; } } }