C# Class Axiom.Controllers.ControllerManager

Summary description for ControllerManager.
Inheritance: DisposableObject
Show file Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
CreateController ( IControllerValue destination, IControllerFunction function ) : Controller

Overloaded method. Creates a new controller, using a reference to a FrameTimeControllerValue as the source.

CreateController ( IControllerValue source, IControllerValue destination, IControllerFunction function ) : Controller

Factory method for creating an instance of a controller based on the input provided.

CreateFrameTimePassthroughController ( IControllerValue dest ) : Controller
CreateGpuProgramTimerParam ( GpuProgramParameters parms, int index, float timeFactor ) : Controller

Predefined controller value for setting a single floating- point value in a constant paramter of a vertex or fragment program.

Any value is accepted, it is propagated into the 'x' component of the constant register identified by the index. If you need to use named parameters, retrieve the index from the param object before setting this controller up.

CreateTextureAnimator ( TextureUnitState texUnit, float sequenceTime ) : Controller

Creates a texture layer animator controller.

This helper method creates the Controller, IControllerValue and IControllerFunction classes required to animate a texture.

CreateTextureRotator ( TextureUnitState layer, float speed ) : Controller

Creates a basic time-based texture coordinate modifier designed for creating rotating textures.

This simple method allows you to easily create constant-speed rotating textures. If you want more control, look up the ControllerManager.CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.

CreateTextureUScroller ( TextureUnitState layer, float speed ) : Controller

Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.

This simple method allows you to easily create constant-speed scrolling textures. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.

CreateTextureUVScroller ( TextureUnitState layer, float speed ) : Controller

Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.

This simple method allows you to easily create constant-speed scrolling textures. If you want to specify differnt speed values for horizontil and vertical scroll, use the specific methods CreateTextureUScroller and CreateTextureVScroller. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.

CreateTextureVScroller ( TextureUnitState layer, float speed ) : Controller

Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.

This simple method allows you to easily create constant-speed scrolling textures. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.

CreateTextureWaveTransformer ( TextureUnitState layer, TextureTransform type, WaveformType waveType, float baseVal, float frequency, float phase, float amplitude ) : Controller

Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function.

DestroyController ( Controller controller ) : void
GetElapsedTime ( ) : float
UpdateAll ( ) : void

Causes all registered controllers to execute. This will depend on RenderSystem.BeginScene already being called so that the time since last frame can be obtained for calculations.

Protected Methods

Method Description
dispose ( bool disposeManagedResources ) : void

Called when the engine is shutting down.

Private Methods

Method Description
ControllerManager ( ) : System

Internal constructor. This class cannot be instantiated externally.

Method Details

CreateController() public method

Overloaded method. Creates a new controller, using a reference to a FrameTimeControllerValue as the source.
public CreateController ( IControllerValue destination, IControllerFunction function ) : Controller
destination IControllerValue Controller value to use as the destination.
function IControllerFunction Controller funcion that will use the source value to set the destination.
return Controller

CreateController() public method

Factory method for creating an instance of a controller based on the input provided.
public CreateController ( IControllerValue source, IControllerValue destination, IControllerFunction function ) : Controller
source IControllerValue Controller value to use as the source.
destination IControllerValue Controller value to use as the destination.
function IControllerFunction Controller funcion that will use the source value to set the destination.
return Controller

CreateFrameTimePassthroughController() public method

public CreateFrameTimePassthroughController ( IControllerValue dest ) : Controller
dest IControllerValue
return Controller

CreateGpuProgramTimerParam() public method

Predefined controller value for setting a single floating- point value in a constant paramter of a vertex or fragment program.
Any value is accepted, it is propagated into the 'x' component of the constant register identified by the index. If you need to use named parameters, retrieve the index from the param object before setting this controller up.
public CreateGpuProgramTimerParam ( GpuProgramParameters parms, int index, float timeFactor ) : Controller
parms Axiom.Graphics.GpuProgramParameters
index int
timeFactor float
return Controller

CreateTextureAnimator() public method

Creates a texture layer animator controller.
This helper method creates the Controller, IControllerValue and IControllerFunction classes required to animate a texture.
public CreateTextureAnimator ( TextureUnitState texUnit, float sequenceTime ) : Controller
texUnit Axiom.Graphics.TextureUnitState The texture unit to animate.
sequenceTime float Length of the animation (in seconds).
return Controller

CreateTextureRotator() public method

Creates a basic time-based texture coordinate modifier designed for creating rotating textures.
This simple method allows you to easily create constant-speed rotating textures. If you want more control, look up the ControllerManager.CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureRotator ( TextureUnitState layer, float speed ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to animate.
speed float Speed of the rotation, in counter-clockwise revolutions per second.
return Controller

CreateTextureUScroller() public method

Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.
This simple method allows you to easily create constant-speed scrolling textures. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureUScroller ( TextureUnitState layer, float speed ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to animate.
speed float speed, in wraps per second.
return Controller

CreateTextureUVScroller() public method

Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
This simple method allows you to easily create constant-speed scrolling textures. If you want to specify differnt speed values for horizontil and vertical scroll, use the specific methods CreateTextureUScroller and CreateTextureVScroller. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureUVScroller ( TextureUnitState layer, float speed ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to animate.
speed float speed, in wraps per second.
return Controller

CreateTextureVScroller() public method

Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
This simple method allows you to easily create constant-speed scrolling textures. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureVScroller ( TextureUnitState layer, float speed ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to animate.
speed float speed, in wraps per second.
return Controller

CreateTextureWaveTransformer() public method

Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function.
public CreateTextureWaveTransformer ( TextureUnitState layer, TextureTransform type, WaveformType waveType, float baseVal, float frequency, float phase, float amplitude ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to effect.
type TextureTransform The type of transform, either translate (scroll), scale (stretch) or rotate (spin).
waveType WaveformType The shape of the wave, see WaveformType enum for details.
baseVal float The base value of the output.
frequency float The speed of the wave in cycles per second.
phase float The offset of the start of the wave, e.g. 0.5 to start half-way through the wave.
amplitude float Scales the output so that instead of lying within 0..1 it lies within 0..(1 * amplitude) for exaggerated effects
return Controller

DestroyController() public method

public DestroyController ( Controller controller ) : void
controller Controller
return void

GetElapsedTime() public method

public GetElapsedTime ( ) : float
return float

UpdateAll() public method

Causes all registered controllers to execute. This will depend on RenderSystem.BeginScene already being called so that the time since last frame can be obtained for calculations.
public UpdateAll ( ) : void
return void

dispose() protected method

Called when the engine is shutting down.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void