Beispiel #1
0
        /// <summary>
        /// Gets all the query-able overlays that contain xz pos.
        /// </summary>
        public void GetQueryableContaining(float x, float z, bool overrideIqnoreQuerys, bool clipOnly)
        {
            m_containingOverlays.Clear();

            for (int i = 0; i < m_queryableOverlays.Count; i++)
            {
                WaveOverlay overlay = m_queryableOverlays[i];

                if (overlay.Hide)
                {
                    continue;
                }

                bool b1 = !clipOnly && (overrideIqnoreQuerys || !overlay.HeightTex.ignoreQuerys) && overlay.HeightTex.IsDrawable;
                bool b2 = (overrideIqnoreQuerys || !overlay.ClipTex.ignoreQuerys) && overlay.ClipTex.IsDrawable;

                if (!b1 && !b2)
                {
                    continue;
                }

                float u, v;
                if (overlay.Contains(x, z, out u, out v))
                {
                    QueryableOverlayResult result;
                    result.overlay = overlay;
                    result.u       = u;
                    result.v       = v;

                    m_containingOverlays.Add(result);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if any overlay in manager contains the xz pos.
        /// </summary>
        public bool QueryableContains(float x, float z, bool overrideIqnoreQuerys)
        {
            for (int i = 0; i < m_queryableOverlays.Count; i++)
            {
                WaveOverlay overlay = m_queryableOverlays[i];

                if (overlay.Hide)
                {
                    continue;
                }

                bool b1 = (overrideIqnoreQuerys || !overlay.HeightTex.ignoreQuerys) && overlay.HeightTex.IsDrawable;
                bool b2 = (overrideIqnoreQuerys || !overlay.ClipTex.ignoreQuerys) && overlay.ClipTex.IsDrawable;

                if (!b1 && !b2)
                {
                    continue;
                }

                if (overlay.Contains(x, z))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #3
0
        /// <summary>
        /// Gets all the query-able overlays that contain xz pos.
        /// </summary>
        public void GetQueryableContaining(float x, float z, bool overrideIqnoreQuerys, bool clipOnly)
        {
            m_containingOverlays.Clear();

            var e = m_queryableOverlays.GetEnumerator();

            while (e.MoveNext())
            {
                WaveOverlay overlay = e.Current;

                if (overlay.Hide)
                {
                    continue;
                }

                bool b1 = !clipOnly && (overrideIqnoreQuerys || !overlay.HeightTex.ignoreQuerys) && overlay.HeightTex.IsDrawable;
                bool b2 = (overrideIqnoreQuerys || !overlay.ClipTex.ignoreQuerys) && overlay.ClipTex.IsDrawable;

                if (!b1 && !b2)
                {
                    continue;
                }

                float u, v;
                if (overlay.Contains(x, z, out u, out v))
                {
                    QueryableOverlayResult result;
                    result.overlay = overlay;
                    result.u       = u;
                    result.v       = v;

                    m_containingOverlays.Add(result);
                }
            }
        }
Beispiel #4
0
        /// <summary>
        /// Returns true if any overlay in manager contains the xz pos.
        /// </summary>
        public bool QueryableContains(float x, float z, bool overrideIqnoreQuerys)
        {
            var e = m_queryableOverlays.GetEnumerator();

            while (e.MoveNext())
            {
                WaveOverlay overlay = e.Current;

                if (overlay.Hide)
                {
                    continue;
                }

                bool b1 = (overrideIqnoreQuerys || !overlay.HeightTex.ignoreQuerys) && overlay.HeightTex.IsDrawable;
                bool b2 = (overrideIqnoreQuerys || !overlay.ClipTex.ignoreQuerys) && overlay.ClipTex.IsDrawable;

                if (!b1 && !b2)
                {
                    continue;
                }

                if (overlay.Contains(x, z))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #5
0
 public void GetQueryableContaining(float x, float z, bool overrideIqnoreQuerys, bool clipOnly)
 {
     this.m_containingOverlays.Clear();
     List <WaveOverlay> .Enumerator enumerator = this.m_queryableOverlays.GetEnumerator();
     while (enumerator.MoveNext())
     {
         WaveOverlay current = enumerator.Current;
         if (!current.Hide)
         {
             bool flag  = !clipOnly && (overrideIqnoreQuerys || !current.HeightTex.ignoreQuerys) && current.HeightTex.IsDrawable;
             bool flag2 = (overrideIqnoreQuerys || !current.ClipTex.ignoreQuerys) && current.ClipTex.IsDrawable;
             if (flag || flag2)
             {
                 float u;
                 float v;
                 if (current.Contains(x, z, out u, out v))
                 {
                     QueryableOverlayResult item;
                     item.overlay = current;
                     item.u       = u;
                     item.v       = v;
                     this.m_containingOverlays.Add(item);
                 }
             }
         }
     }
 }
Beispiel #6
0
 public bool QueryableContains(float x, float z, bool overrideIqnoreQuerys)
 {
     List <WaveOverlay> .Enumerator enumerator = this.m_queryableOverlays.GetEnumerator();
     while (enumerator.MoveNext())
     {
         WaveOverlay current = enumerator.Current;
         if (!current.Hide)
         {
             bool flag  = (overrideIqnoreQuerys || !current.HeightTex.ignoreQuerys) && current.HeightTex.IsDrawable;
             bool flag2 = (overrideIqnoreQuerys || !current.ClipTex.ignoreQuerys) && current.ClipTex.IsDrawable;
             if (flag || flag2)
             {
                 if (current.Contains(x, z))
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }