Beispiel #1
0
        public IEnumerable <ILineSegment> GetEdges()
        {
            // Inclusive bound that is still part of the cube
            var inclBlound = TopRight.TranslateBy(-1, -1, -1);

            yield return(new LineSegmentX(BottomLeft.X, inclBlound.X, BottomLeft.Y, BottomLeft.Z));

            yield return(new LineSegmentX(BottomLeft.X, inclBlound.X, BottomLeft.Y, inclBlound.Z));

            yield return(new LineSegmentX(BottomLeft.X, inclBlound.X, inclBlound.Y, BottomLeft.Z));

            yield return(new LineSegmentX(BottomLeft.X, inclBlound.X, inclBlound.Y, inclBlound.Z));

            yield return(new LineSegmentY(BottomLeft.X, BottomLeft.Y, inclBlound.Y, BottomLeft.Z));

            yield return(new LineSegmentY(BottomLeft.X, BottomLeft.Y, inclBlound.Y, inclBlound.Z));

            yield return(new LineSegmentY(inclBlound.X, BottomLeft.Y, inclBlound.Y, BottomLeft.Z));

            yield return(new LineSegmentY(inclBlound.X, BottomLeft.Y, inclBlound.Y, inclBlound.Z));

            yield return(new LineSegmentZ(BottomLeft.X, BottomLeft.Y, BottomLeft.Z, inclBlound.Z));

            yield return(new LineSegmentZ(BottomLeft.X, inclBlound.Y, BottomLeft.Z, inclBlound.Z));

            yield return(new LineSegmentZ(inclBlound.X, BottomLeft.Y, BottomLeft.Z, inclBlound.Z));

            yield return(new LineSegmentZ(inclBlound.X, inclBlound.Y, BottomLeft.Z, inclBlound.Z));
        }