Beispiel #1
0
        public ThreeDPoint GetCenter()
        {
            ThreeDPoint p = new ThreeDPoint(0, 0, 0, "0");

            for (int i = 0; i < Polygons.Count; i++)
            {
                p = p + ((ThreeDPolygon)Polygons[i]).GetCenter();
            }

            p.DivideThePoint(Polygons.Count);

            return(p);
        }
Beispiel #2
0
        public ThreeDPoint GetCenter()
        {
            ThreeDPoint p = new ThreeDPoint(0, 0, 0, null);

            for (int i = 0; i < Vertices.Count; i++)
            {
                p = p + (ThreeDPoint)Vertices[i];
            }

            p.DivideThePoint(Vertices.Count);

            return(p);
        }