void GenerateIsometric(WallGrid grid, IHeightMap floorHeightMap, IHeightMap ceilingHeightMap)
 {
     ceilingMesh = MeshBuilder.BuildCeiling(grid, ceilingHeightMap);
     outlines    = OutlineGenerator.Generate(ceilingMesh);
     wallMesh    = MeshBuilder.BuildWalls(outlines, floorHeightMap, ceilingHeightMap);
     floorMesh   = MeshBuilder.BuildFloor(grid, floorHeightMap);
 }
 void GenerateEnclosed(WallGrid grid, IHeightMap floorHeightMap, IHeightMap enclosureHeightMap)
 {
     floorMesh   = MeshBuilder.BuildFloor(grid, floorHeightMap);
     outlines    = OutlineGenerator.Generate(floorMesh, reverseOutlines: true);
     ceilingMesh = MeshBuilder.BuildEnclosure(floorMesh, enclosureHeightMap);
     wallMesh    = MeshBuilder.BuildWalls(outlines, floorHeightMap, enclosureHeightMap);
     PruneWallsAtGlobalSeams(grid.Scale);
 }
        /// <summary>
        /// Build an array of 2D polygonal outlines of the mesh projected onto the y = 0 plane.
        /// By default, will generate outlines going in the clockwise direction:
        /// e.g. given a triangle (a = (0,0,0), b = (1,0,0), c = (0,0,1)), will return an outline in the order
        /// (a, c, b).
        /// </summary>
        /// <param name="reverseOutlines">Build outlines in the opposite (counter-clockwise) direction.</param>
        public static Outline[] Generate(MeshData mesh, bool reverseOutlines = false)
        {
            Assert.IsNotNull(mesh);
            var            outlineGenerator = new OutlineGenerator(mesh);
            List <Outline> outlines         = outlineGenerator.GenerateOutlines();

            if (reverseOutlines)
            {
                outlines.ForEach(outline => outline.Reverse());
            }
            return(outlines.ToArray());
        }
        void ComputeMeshOutlines(MeshData mesh)
        {
            OutlineGenerator outlineGenerator = new OutlineGenerator(mesh);

            outlines = outlineGenerator.GenerateOutlines();
        }