void AddPolygon(DecalPolygon poly, Vector3 normal) { if (poly.vertices.Count == 0) { return; } int ind1 = AddVertex(poly.vertices[0], normal); for (int i = 1; i < poly.vertices.Count - 1; i++) { int ind2 = AddVertex(poly.vertices[i], normal); int ind3 = AddVertex(poly.vertices[i + 1], normal); bufIndices.Add(ind1); bufIndices.Add(ind2); bufIndices.Add(ind3); } }
void AddPolygon(DecalPolygon poly, Vector3 normal) { if (poly.vertices.Count == 0) return; int ind1 = AddVertex(poly.vertices[0], normal); for (int i = 1; i < poly.vertices.Count - 1; i++) { int ind2 = AddVertex(poly.vertices[i], normal); int ind3 = AddVertex(poly.vertices[i + 1], normal); bufIndices.Add(ind1); bufIndices.Add(ind2); bufIndices.Add(ind3); } }
public Decal(VertexPool pool) { mPool = pool; buffPolygon = new DecalPolygon(); }