Beispiel #1
0
        private static TriangleIndexed[] GetModel_Composite_SquareSides(Rhombicuboctahedron ball, double depth)
        {
            List <TriangleIndexed> retVal = new List <TriangleIndexed>();

            foreach (int[] square in UtilityCore.Iterate(ball.SquarePolys_Orth, ball.SquarePolys_Diag))
            {
                Point3D[] initialPoints = square.Select(o => ball.AllPoints[o]).ToArray();

                Vector3D offset = Math2D.GetPolygonNormal(initialPoints, PolygonNormalLength.Unit) * -depth;

                for (int cntr = 0; cntr < square.Length - 1; cntr++)
                {
                    retVal.AddRange(GetModel_Composite_SquareSides_Side(initialPoints[cntr], initialPoints[cntr + 1], offset, depth));
                }

                retVal.AddRange(GetModel_Composite_SquareSides_Side(initialPoints[square.Length - 1], initialPoints[0], offset, depth));
            }

            return(retVal.ToArray());
        }