コード例 #1
0
        public void OnBegunInterval(UInt64 ctxId, Interval iv)
        {
            StreamingTextureInterval siv = (StreamingTextureInterval)iv;
            TextureCtx ctx = GetRailIdForPath(ctxId, siv.Filename);

            ctx.MinMipAvailable = siv.MinMipAvailable;
            ctx.MinMipWanted    = siv.MinMipWanted;
            ctx.IsVisible       = siv.InUse;

            if (!m_seenInterval)
            {
                m_seenInterval = true;

                lock (m_log)
                {
                    m_log.SetItemMetaData("/StreamingTextures/mipDelta", EItemType.Float);
                    m_log.SetItemMetaData("/StreamingTextures/mipDeltaSD", EItemType.Float);
                    m_log.SetItemMetaData("/StreamingTextures/mipDeltaMean", EItemType.Float);
                }
            }

            lock (m_log.IntervalTree)
            {
                m_log.IntervalTree.AddInterval(ctx.RailId, iv);
            }
        }
コード例 #2
0
 public StreamingTextureInterval(StreamingTextureInterval clone)
     : base(clone)
 {
     this.filename        = clone.filename;
     this.minMipWanted    = clone.minMipWanted;
     this.minMipAvailable = clone.minMipAvailable;
     this.inUse           = clone.inUse;
 }
コード例 #3
0
        public Color GetIntervalColor(Interval iv)
        {
            StreamingTextureInterval siv = (StreamingTextureInterval)iv;

            if (!siv.InUse)
            {
                return(Color.Red);
            }
            else
            {
                return(Color.Green);
            }
        }
コード例 #4
0
        public void OnFinalisedInterval(UInt64 ctxId, Interval iv, bool isModification)
        {
            StreamingTextureInterval siv = (StreamingTextureInterval)iv;
            TextureCtx ctx = GetRailIdForPath(ctxId, siv.Filename);

            lock (m_log.IntervalTree)
            {
                m_log.IntervalTree.AddInterval(ctx.RailId, iv);
            }

            if (!isModification)
            {
                m_rails.Remove(ctxId);
            }
        }