Inheritance: RenderableComponent
示例#1
0
 void renderLight(DeferredLight light)
 {
     // check SpotLight first because it is a subclass of PointLight!
     if (light is SpotLight)
     {
         renderLight(light as SpotLight);
     }
     else if (light is PointLight)
     {
         renderLight(light as PointLight);
     }
     else if (light is AreaLight)
     {
         renderLight(light as AreaLight);
     }
     else if (light is DirLight)
     {
         renderLight(light as DirLight);
     }
 }
示例#2
0
 /// <summary>
 /// updates the shader values for the light and sets the appropriate CurrentTechnique
 /// </summary>
 /// <param name="light">Light.</param>
 public void UpdateForLight(DeferredLight light)
 {
     // check SpotLight first because it is a subclass of PointLight!
     if (light is SpotLight)
     {
         UpdateForLight(light as SpotLight);
     }
     else if (light is PointLight)
     {
         UpdateForLight(light as PointLight);
     }
     else if (light is AreaLight)
     {
         UpdateForLight(light as AreaLight);
     }
     else if (light is DirLight)
     {
         UpdateForLight(light as DirLight);
     }
 }
示例#3
0
		void renderLight( DeferredLight light )
		{
			// check SpotLight first because it is a subclass of PointLight!
			if( light is SpotLight )
				renderLight( light as SpotLight );
			else if( light is PointLight )
				renderLight( light as PointLight );
			else if( light is AreaLight )
				renderLight( light as AreaLight );
			else if( light is DirLight )
				renderLight( light as DirLight );
		}
示例#4
0
 /// <summary>
 /// updates the shader values for the light and sets the appropriate CurrentTechnique
 /// </summary>
 /// <param name="light">Light.</param>
 public void updateForLight( DeferredLight light )
 {
     // check SpotLight first because it is a subclass of PointLight!
     if( light is SpotLight )
         updateForLight( light as SpotLight );
     else if( light is PointLight )
         updateForLight( light as PointLight );
     else if( light is AreaLight )
         updateForLight( light as AreaLight );
     else if( light is DirLight )
         updateForLight( light as DirLight );
 }