コード例 #1
0
        /// <summary>
        /// Face centered orientation.
        /// </summary>
        internal static void FCOrient(H3.Cell cell)
        {
            // First, need to scale so the lowest triangles are the same size,
            // then reorient so that one triangle is oriented along z axis,
            // then scale so that the triangle is flat.

            // Calculate how much we need to offset to make the cell facet flat.
            Mobius m = FCOrientMobius(cell.Facets[0].Sphere);

            foreach (H3.Cell.Facet f in cell.Facets)
            {
                H3Models.TransformInBall2(f.Sphere, m);
            }
            cell.Center = H3Models.TransformHelper(cell.Center, m);
        }