public LightMap(ModelInstance mi, Mesh m) { model = mi; mesh = m; width = mesh.texels.GetLength(0); height = mesh.texels.GetLength(1); texels = new Texel[width,height]; patches = new List<Patch>(); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { texels[i,j] = new Texel(); foreach (Patch p in mesh.texels[i,j].patches) { Patch temp = new Patch(p,model.transform); texels[i,j].add(temp); patches.Add(temp); } } } name = "lm" + model.layoutName + "_" + convertToBase36(model.id) + "_0" + mesh.id; }
public LightMap(ModelInstance mi, Mesh m, String lightmapName) : this(mi, m) { name = lightmapName; }