Mise à jour du dépôt en fonction du .gitignore

This commit is contained in:
Troispoils 2024-02-25 22:03:08 +01:00
parent 1f0f033fad
commit 4a59748e67
224 changed files with 6785 additions and 0 deletions

View file

@ -0,0 +1,30 @@
namespace LandblockExtraction.LandBlockExtractor {
public class BlockStruct {
public readonly static int BlockSize = 17;
public VerticesStruct verticesStruct;
public int[] indices;
public BlockStruct() {
verticesStruct = new VerticesStruct(BlockSize);
indices = new int[(BlockSize - 1) * (BlockSize - 1) * 6];
}
public void GenerateIndices() {
int index = 0;
for (int y = 0; y < BlockSize - 1; y++) {
for (int x = 0; x < BlockSize - 1; x++) {
// Indices des sommets du premier triangle
indices[index++] = y * BlockSize + x;
indices[index++] = (y + 1) * BlockSize + x;
indices[index++] = y * BlockSize + x + 1;
// Indices des sommets du deuxième triangle
indices[index++] = y * BlockSize + x + 1;
indices[index++] = (y + 1) * BlockSize + x;
indices[index++] = (y + 1) * BlockSize + x + 1;
}
}
}
}
}