Beispiel #1
0
        //--------------------------------------------------------------
        #region Methods
        //--------------------------------------------------------------

        /// <overloads>
        /// <summary>
        /// Invalidates the data cached by the renderer.
        /// </summary>
        /// </overloads>
        ///
        /// <summary>
        /// Invalidates all data cached by the renderer.
        /// </summary>
        /// <remarks>
        /// <para>
        /// This method notifies the renderers that cached data (e.g. terrain clipmaps) needs to be
        /// updated.
        /// </para>
        /// <para>
        /// The <see cref="Invalidate()"/> method or its overloads are called automatically when terrain
        /// tiles or layers are added to/removed from the terrain. If any other data that affects the
        /// appearance of the terrain is changed, the method <see cref="Invalidate()"/> needs to be
        /// called manually.
        /// </para>
        /// </remarks>
        public void Invalidate()
        {
            UpdateAabb();

            InvalidBaseRegions.Clear();
            InvalidBaseRegions.Add(Aabb);
            AreInvalidBaseRegionsClipped = true;

            InvalidDetailRegions.Clear();
            InvalidDetailRegions.Add(Aabb);
            AreInvalidDetailRegionsClipped = true;
        }