Axiom.Graphics.TextureUnitState.SetProjectiveTexturing C# (CSharp) Метод

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

Enables or disables projective texturing on this texture unit.

Projective texturing allows you to generate texture coordinates based on a Frustum, which gives the impression that a texture is being projected onto the surface. Note that once you have called this method, the texture unit continues to monitor the Frustum you passed in and the projection will change if you can alter it. It also means that the Frustum object you pass remains in existence for as long as this TextureUnitState does.

This effect cannot be combined with other texture generation effects, such as environment mapping. It also has no effect on passes which have a vertex program enabled - projective texturing has to be done in the vertex program instead.

public SetProjectiveTexturing ( bool enable, Frustum projectionSettings ) : void
enable bool /// Whether to enable / disable ///
projectionSettings Axiom.Core.Frustum /// The Frustum which will be used to derive the projection parameters. ///
Результат void
		public void SetProjectiveTexturing( bool enable, Frustum projectionSettings )
		{
			if ( enable )
			{
				TextureEffect effect = new TextureEffect();
				effect.type = TextureEffectType.ProjectiveTexture;
				effect.frustum = projectionSettings;
				AddEffect( effect );
			}
			else
			{
				RemoveEffect( TextureEffectType.ProjectiveTexture );
			}
		}