Beispiel #1
0
        /// <summary>
        /// 図形の総面積を求める
        /// </summary>
        public float GetTotalSize()
        {
            float total = 0;
            float size  = 0;

            for (int i = 0; i < triangles.Length; i += 3)
            {
                size = FuncBox.TriangleSize(vertices[triangles[i + 0]].vertex,
                                            vertices[triangles[i + 1]].vertex,
                                            vertices[triangles[i + 2]].vertex);
                total += size;
            }
            //裏表貼っているので半分にする
            return(totalSize = total * 0.5f);
        }