private void DrawCube(Cube cube, float transparency = 1.0f) { Vector3 cubeScenePosition = Nocubeless.CubeWorld.GetGraphicsCubePosition(cube.Coordinates); EffectMatrices effectMatrices = new EffectMatrices(Nocubeless.Camera.GetProjection(), Nocubeless.Camera.GetView(), Matrix.Identity); cubeDrawer.Draw(cubeScenePosition, cube.Color.ToVector3(), effectMatrices, transparency); }
public void Draw(Vector2 position) // DOLATER: Put position as a constructior member instead! // And Moreover, the position is not coherent to the 2d representation { float cubeRatio = 1.0f / Height / 2.0f;; for (int x = 0; x < 0b1000; x++) { for (int y = 0; y < 0b1000; y++) { for (int z = 0; z < 0b1000; z++) { cubeDrawer.Draw( // DESIGN:! Why should I remake cubeRatio concept? new Vector3(position.X + ((x - 3.5f) / cubeRatio), position.Y + ((y - 3.5f) / cubeRatio), (z - 3.5f) / cubeRatio), cubeColors[x + (y * 0b1000) + (z * 0b1000000)].ToVector3(),