Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Aura
- {
- public class MeshGeneration
- {
- VertexPositionColor[] vertices;
- int[] indices;
- int x = 0;
- int y = 0;
- int z = 0;
- public void renderCube(int numVerts)
- {
- vertices = new VertexPositionColor[numVerts];
- int x = 0;
- int y = numVerts;
- int z = 0;
- for(int i=0; i<=numVerts*numVerts*6; i++)
- {
- if (z < numVerts)
- {
- if (x < numVerts)
- {
- vertices[i].Position.X = 10/x;
- vertices[i].Position.Y = 10/y;
- vertices[i].Position.Z = 10/z;
- x++;
- if (x == numVerts)
- {
- z++;
- x = 0;
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement