Exemplo n.º 1
0
 /// <summary>
 /// Removes an effect from the post-processing effect chain.
 /// </summary>
 /// <param name="effect">Effect which is to be removed.</param>
 public void RemoveEffect(PostProcessEffect effect)
 {
     if (!mEffects.Remove(effect))
     {
         throw new Exception("PostProcessEffectChain.RemoveEffect(): effect not found.");
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Adds an effect to the end of the post-processing effect chain.
        /// </summary>
        /// <param name="effect">Effect which is to be added.</param>
        public void AddEffect(PostProcessEffect effect)
        {
            if (effect == null)
            {
                throw new Exception("PostProcessEffectChain.AddEffect(): null effect.");
            }

            mEffects.Add(effect);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Inserts an effect into the post-processing effect chain.
        /// </summary>
        /// <param name="effect">Effect which is to be inserted.</param>
        /// <param name="pos">Position into which the effect is to be inserted.</param>
        public void InsertEffect(PostProcessEffect effect, int pos)
        {
            if (effect == null)
            {
                throw new Exception("PostProcessEffectChain.InsertEffect(): null effect");
            }

            if (pos < 0 || pos >= mEffects.Count)
            {
                throw new Exception("PostProcessEffectChain.InsertEffect(): invalid index");
            }

            mEffects.Insert(pos, effect);
        }