Axiom.Graphics.Technique.GetIlluminationPass C# (CSharp) Метод

GetIlluminationPass() публичный Метод

Retreives the IlluminationPass at the specified index.
public GetIlluminationPass ( int index ) : IlluminationPass
index int Index of the IlluminationPass to retreive.
Результат IlluminationPass
		public IlluminationPass GetIlluminationPass( int index )
		{

			if ( !_compiledIlluminationPasses )
			{
				CompileIlluminationPasses();
			}

			Debug.Assert( index < _illuminationPasses.Count, "index < illuminationPasses.Count" );

			return (IlluminationPass)_illuminationPasses[ index ];
		}

Usage Example

Пример #1
0
        /// <summary>
        ///		Internal method for adding a solid renderable ot the group based on lighting stage.
        /// </summary>
        /// <param name="technique">Technique to use for this renderable.</param>
        /// <param name="renderable">Renderable to add to the queue.</param>
        protected void AddSolidRenderableSplitByLightType(Technique technique, IRenderable renderable)
        {
            // Divide the passes into the 3 categories
            for (var i = 0; i < technique.IlluminationPassCount; i++)
            {
                // Insert into solid list
                var        illpass = technique.GetIlluminationPass(i);
                SortedList passMap = null;

                switch (illpass.Stage)
                {
                case IlluminationStage.Ambient:
                    passMap = this.solidPasses;
                    break;

                case IlluminationStage.PerLight:
                    passMap = this.solidPassesDiffuseSpecular;
                    break;

                case IlluminationStage.Decal:
                    passMap = this.solidPassesDecal;
                    break;
                }

                var solidList = (RenderableList)passMap[illpass.Pass];

                if (solidList == null)
                {
                    // add a new list to hold renderables for this pass
                    solidList = new RenderableList();
                    passMap.Add(illpass.Pass, solidList);
                }

                solidList.Add(renderable);
            }
        }
All Usage Examples Of Axiom.Graphics.Technique::GetIlluminationPass