Mise à jour du dépôt en fonction du .gitignore
This commit is contained in:
parent
1f0f033fad
commit
4a59748e67
224 changed files with 6785 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue