Пример #1
0
        // This triangulates the sector geometry
        internal void Triangulate()
        {
            if (updateneeded)
            {
                // Triangulate again?
                if (triangulationneeded || (triangles == null))
                {
                    // Triangulate sector
                    triangles           = Triangulation.Create(this);
                    triangulationneeded = false;
                    updateneeded        = true;

                    // Make label positions
                    labels = Array.AsReadOnly(Tools.FindLabelPositions(this).ToArray());

                    // Number of vertices changed?
                    if (triangles.Vertices.Count != surfaceentries.totalvertices)
                    {
                        General.Map.CRenderer2D.Surfaces.FreeSurfaces(surfaceentries);
                    }
                }
            }
        }
Пример #2
0
        // This triangulates the sector geometry
        internal void Triangulate()
        {
            if (updateneeded)
            {
                // Triangulate again?
                if (triangulationneeded || (triangles == null))
                {
                    // Triangulate sector
                    triangles           = Triangulation.Create(this);
                    triangulationneeded = false;
                    updateneeded        = true;

                    //mxd. Update label position
                    label = FindLabelPosition(this);

                    // Number of vertices changed?
                    if (triangles.Vertices.Count != surfaceentries.TotalVertices)
                    {
                        General.Map.CRenderer2D.Surfaces.FreeSurfaces(surfaceentries);
                    }
                }
            }
        }