コード例 #1
0
ファイル: Effect.cs プロジェクト: RUSshy/ultraviolet
        /// <summary>
        /// Initializes a new instance of the <see cref="Effect"/> class.
        /// </summary>
        /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
        protected Effect(EffectImplementation impl)
            : base(impl.Ultraviolet)
        {
            Contract.Require(impl, nameof(impl));

            this.impl = impl;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Effect"/> class.
        /// </summary>
        /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
        protected Effect(EffectImplementation impl)
            : base(impl.Ultraviolet)
        {
            Contract.Require(impl, nameof(impl));

            this.impl = impl;
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BasicEffect"/> class.
 /// </summary>
 /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
 protected BasicEffect(EffectImplementation impl)
     : base(impl)
 {
     this.epWorld        = Parameters["World"];
     this.epView         = Parameters["View"];
     this.epProjection   = Parameters["Projection"];
     this.epDiffuseColor = Parameters["DiffuseColor"];
     this.epDiffuseColor.SetValue(Color.White);
     this.epTexture = Parameters["Texture"];
 }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BlurEffect"/> class.
        /// </summary>
        /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
        protected BlurEffect(EffectImplementation impl)
            : base(impl)
        {
            this.epWorld      = Parameters["World"];
            this.epView       = Parameters["View"];
            this.epProjection = Parameters["Projection"];
            this.epMix        = Parameters["Mix"];

            this.Radius = 5f;
        }
コード例 #5
0
ファイル: BasicEffect.cs プロジェクト: RUSshy/ultraviolet
 /// <summary>
 /// Initializes a new instance of the <see cref="BasicEffect"/> class.
 /// </summary>
 /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
 protected BasicEffect(EffectImplementation impl)
     : base(impl)
 {
     this.epWorld        = Parameters["World"];
     this.epView         = Parameters["View"];
     this.epProjection   = Parameters["Projection"];
     this.epDiffuseColor = Parameters["DiffuseColor"];
     this.epDiffuseColor.SetValue(Color.White);
     this.epTexture      = Parameters["Texture"];
 }
コード例 #6
0
ファイル: BlurEffect.cs プロジェクト: RUSshy/ultraviolet
        /// <summary>
        /// Initializes a new instance of the <see cref="BlurEffect"/> class.
        /// </summary>
        /// <param name="impl">The <see cref="EffectImplementation"/> that implements this effect.</param>
        protected BlurEffect(EffectImplementation impl)
            : base(impl)
        {
            this.epWorld      = Parameters["World"];
            this.epView       = Parameters["View"];
            this.epProjection = Parameters["Projection"];
            this.epMix        = Parameters["Mix"];

            this.Radius = 5f;
        }
コード例 #7
0
ファイル: Effect.cs プロジェクト: RUSshy/ultraviolet
        /// <summary>
        /// Creates a new instance of the <see cref="Effect"/> class.
        /// </summary>
        /// <param name="impl">The effect implementation that the effect encapsulates.</param>
        /// <returns>The instance of <see cref="Effect"/> that was created.</returns>
        public static Effect Create(EffectImplementation impl)
        {
            Contract.Require(impl, nameof(impl));

            return new Effect(impl);
        }
コード例 #8
0
        /// <summary>
        /// Creates a new instance of the <see cref="Effect"/> class.
        /// </summary>
        /// <param name="impl">The effect implementation that the effect encapsulates.</param>
        /// <returns>The instance of <see cref="Effect"/> that was created.</returns>
        public static Effect Create(EffectImplementation impl)
        {
            Contract.Require(impl, nameof(impl));

            return(new Effect(impl));
        }