public void HardNormal(int vertecsIndex) { int triangleByVertecsIndex = VertexPainter.GetTriangleByVertecsIndex(vertecsIndex); Vector3 vector = Vector3.Cross(this.verteces[triangleByVertecsIndex], this.verteces[triangleByVertecsIndex + 1]); this.normals[vertecsIndex] = vector; }
public void LoadDataFromAnother(VertexPainter vp) { this.subMeshs.Clear(); foreach (VertexPainter.SubMesh item in vp.subMeshs) { this.subMeshs.Add(item); } this.verteces = (Vector3[])vp.verteces.Clone(); this.colors = (Color32[])vp.colors.Clone(); this.normals = (Vector3[])vp.normals.Clone(); if (vp.hasUV) { this.hasUV = true; this.uv = vp.uv; } this.referensMesh = vp.referensMesh; this.bounds = vp.bounds; }
public ModifyInfo(VertexPainter vertexPainter, Transform transform) { this.transform = transform; this.vertexPainter = vertexPainter; }