/// <summary> /// Creates a new voxture of solid color. /// </summary> public Voxture(OutpostColor color) { texture = new OutpostColor[Sizes.VoxelsPerEdge, Sizes.VoxelsPerEdge, Sizes.VoxelsPerEdge]; for(int x=0; x<Sizes.VoxelsPerEdge; x++) { for (int y = 0; y < Sizes.VoxelsPerEdge; y++) { for (int z = 0; z < Sizes.VoxelsPerEdge; z++) { texture[x, y, z] = color; } } } }
public EditingVoxture(string _name, OutpostColor baseColor, GraphicsDevice graphics) { name = new StringBuilder(_name); vox = new Voxture(baseColor); vBuff = new DynamicVertexBuffer(graphics, typeof(VertexPositionColorNormal), numVerts, BufferUsage.WriteOnly); iBuff = new IndexBuffer(graphics, IndexElementSize.SixteenBits, numInds, BufferUsage.WriteOnly); wfVBuff = new DynamicVertexBuffer(graphics, typeof(VertexPositionColor), numWfVerts, BufferUsage.WriteOnly); wfIBuff = new IndexBuffer(graphics, IndexElementSize.SixteenBits, numWfInds, BufferUsage.WriteOnly); makeIndices(); _rotation = Matrix.Identity; }