void AddWestWall(MeshMaker maker, int x, int z, int y, Texture2D texture) { VertexPositionNormalTexture v1, v2, v3, v4; v1.Position = new Vector3(x, z, y) * laby.CellSize; v2.Position = new Vector3(x, z + 1, y) * laby.CellSize; v3.Position = new Vector3(x, z + 1, y + 1) * laby.CellSize; v4.Position = new Vector3(x, z, y + 1) * laby.CellSize; v1.Normal = v2.Normal = v3.Normal = v4.Normal = Vector3.Left; v1.TextureCoordinate = new Vector2(0, 1); v2.TextureCoordinate = new Vector2(0, 0); v3.TextureCoordinate = new Vector2(1, 0); v4.TextureCoordinate = new Vector2(1, 1); maker.AddQuad(v1, v2, v3, v4, texture, false); }
void AddFloor(MeshMaker maker, int x, int z, int y, Texture2D texture, bool resolution) { VertexPositionNormalTexture v1, v2, v3, v4; v1.Position = new Vector3(x, z, y) * laby.CellSize; v2.Position = new Vector3(x, z, y + 1) * laby.CellSize; v3.Position = new Vector3(x + 1, z, y + 1) * laby.CellSize; v4.Position = new Vector3(x + 1, z, y) * laby.CellSize; v1.Normal = v2.Normal = v3.Normal = v4.Normal = Vector3.Up; v1.TextureCoordinate = new Vector2(0, 1); v2.TextureCoordinate = new Vector2(0, 0); v3.TextureCoordinate = new Vector2(1, 0); v4.TextureCoordinate = new Vector2(1, 1); maker.AddQuad(v1, v2, v3, v4, texture, resolution); }