Last active
December 5, 2018 01:19
-
-
Save baobao/f00df08d2b400c93d579fc13b0fe3c5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 開始Index | |
startIndex = indices[1]; | |
for (int i = 0; i < sideIndexLen; i++) | |
{ | |
if (i % 6 == 0 || i % 6 == 3) | |
{ | |
indices[cnt++] = startIndex; | |
} | |
else if (i % 6 == 1) | |
{ | |
indices[cnt++] = startIndex + divideX; | |
} | |
else if (i % 6 == 2 || i % 6 == 4) | |
{ | |
indices[cnt++] = startIndex + divideX + 1; | |
} | |
else if (i % 6 == 5) | |
{ | |
indices[cnt++] = startIndex + 1; | |
// 四角形を作り終えたら開始Indexをインクリメントする | |
startIndex++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment