org.ogre4j
Class ControllerManager

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.ControllerManager
All Implemented Interfaces:
IAllocatedObject<IGeneralAllocPolicy>, IControllerManager, IGeneralAllocatedObject, ISingleton<IControllerManager>, INativeObject

public class ControllerManager
extends NativeObject
implements IControllerManager


Nested Class Summary
protected static class ControllerManager.ControllerList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IControllerManager
IControllerManager.IControllerList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  ControllerManager()
           
  ControllerManager(InstancePointer p)
          This constructor is public for internal useage only!
protected ControllerManager(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  ControllerManager(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void clearControllers()
          Destroys all the controllers in existence.
 void createController(IController<java.lang.Float> returnValue, IControllerValueRealPtr src, IControllerValueRealPtr dest, IControllerFunctionRealPtr func)
          Creates a new controller and registers it with the manager.
 void createFrameTimePassthroughController(IController<java.lang.Float> returnValue, IControllerValueRealPtr dest)
          Creates a new controller use frame time source and passthrough controller function.
 void createGpuProgramTimerParam(IController<java.lang.Float> returnValue, IGpuProgramParameters params, int paramIndex, float timeFactor)
          Creates a controller for passing a frame time value through to a vertex / fragment program parameter.
 void createTextureAnimator(IController<java.lang.Float> returnValue, ITextureUnitState layer, float sequenceTime)
          Creates a texture layer animator controller.
 void createTextureRotater(IController<java.lang.Float> returnValue, ITextureUnitState layer, float speed)
          Creates a basic time-based texture coordinate modifier designed for creating rotating textures.
 void createTextureUScroller(IController<java.lang.Float> returnValue, ITextureUnitState layer, float uSpeed)
          Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.
 void createTextureUVScroller(IController<java.lang.Float> returnValue, ITextureUnitState layer, float speed)
          Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
 void createTextureVScroller(IController<java.lang.Float> returnValue, ITextureUnitState layer, float vSpeed)
          Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
 void createTextureWaveTransformer(IController<java.lang.Float> returnValue, ITextureUnitState layer, TextureUnitState.TextureTransformType ttype, WaveformType waveType, float base, float frequency, float phase, float amplitude)
          Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function.
 void delete()
          Deletes the corresponding C++ object.
 void destroyController(IController<java.lang.Float> controller)
          Removes & destroys the controller passed in as a pointer.
 void finalize()
           
 float getElapsedTime()
          Return the elapsed time.
 float getFrameDelay()
          Gets the constant that is added to time lapsed between each frame.
 IControllerValueRealPtr getFrameTimeSource()
          Returns a which provides the time since the last frame as a control value source.
 IControllerFunctionRealPtr getPassthroughControllerFunction()
          Retrieve a simple passthrough controller function.
static IControllerManager getSingleton()
          Override standard retrieval.
static IControllerManager getSingletonPtr()
          Override standard retrieval.
 float getTimeFactor()
          Return relative speed of time as perceived by time based controllers.
 void setElapsedTime(float elapsedTime)
          Set the elapsed time.
 void setFrameDelay(float fd)
          Sets a constant frame rate.
 void setTimeFactor(float tf)
          Set the relative speed to update frame time based controllers.
 void updateAllControllers()
          Updates all the registered controllers.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

ControllerManager

public ControllerManager(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


ControllerManager

protected ControllerManager(InstancePointer p,
                            boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


ControllerManager

public ControllerManager(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

ControllerManager

public ControllerManager()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

createController

public void createController(IController<java.lang.Float> returnValue,
                             IControllerValueRealPtr src,
                             IControllerValueRealPtr dest,
                             IControllerFunctionRealPtr func)
Creates a new controller and registers it with the manager.

Specified by:
createController in interface IControllerManager

createFrameTimePassthroughController

public void createFrameTimePassthroughController(IController<java.lang.Float> returnValue,
                                                 IControllerValueRealPtr dest)
Creates a new controller use frame time source and passthrough controller function.

Specified by:
createFrameTimePassthroughController in interface IControllerManager

clearControllers

public void clearControllers()
Destroys all the controllers in existence.

Specified by:
clearControllers in interface IControllerManager

updateAllControllers

public void updateAllControllers()
Updates all the registered controllers.

Specified by:
updateAllControllers in interface IControllerManager

getFrameTimeSource

public IControllerValueRealPtr getFrameTimeSource()
Returns a which provides the time since the last frame as a control value source.

Specified by:
getFrameTimeSource in interface IControllerManager

getPassthroughControllerFunction

public IControllerFunctionRealPtr getPassthroughControllerFunction()
Retrieve a simple passthrough controller function.

Specified by:
getPassthroughControllerFunction in interface IControllerManager

createTextureAnimator

public void createTextureAnimator(IController<java.lang.Float> returnValue,
                                  ITextureUnitState layer,
                                  float sequenceTime)
Creates a texture layer animator controller.

Specified by:
createTextureAnimator in interface IControllerManager

createTextureUVScroller

public void createTextureUVScroller(IController<java.lang.Float> returnValue,
                                    ITextureUnitState layer,
                                    float speed)
Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.

Specified by:
createTextureUVScroller in interface IControllerManager

createTextureUScroller

public void createTextureUScroller(IController<java.lang.Float> returnValue,
                                   ITextureUnitState layer,
                                   float uSpeed)
Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.

Specified by:
createTextureUScroller in interface IControllerManager

createTextureVScroller

public void createTextureVScroller(IController<java.lang.Float> returnValue,
                                   ITextureUnitState layer,
                                   float vSpeed)
Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.

Specified by:
createTextureVScroller in interface IControllerManager

createTextureRotater

public void createTextureRotater(IController<java.lang.Float> returnValue,
                                 ITextureUnitState layer,
                                 float speed)
Creates a basic time-based texture coordinate modifier designed for creating rotating textures.

Specified by:
createTextureRotater in interface IControllerManager

createTextureWaveTransformer

public void createTextureWaveTransformer(IController<java.lang.Float> returnValue,
                                         ITextureUnitState layer,
                                         TextureUnitState.TextureTransformType ttype,
                                         WaveformType waveType,
                                         float base,
                                         float frequency,
                                         float phase,
                                         float amplitude)
Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function.

Specified by:
createTextureWaveTransformer in interface IControllerManager

createGpuProgramTimerParam

public void createGpuProgramTimerParam(IController<java.lang.Float> returnValue,
                                       IGpuProgramParameters params,
                                       int paramIndex,
                                       float timeFactor)
Creates a controller for passing a frame time value through to a vertex / fragment program parameter.

Specified by:
createGpuProgramTimerParam in interface IControllerManager

destroyController

public void destroyController(IController<java.lang.Float> controller)
Removes & destroys the controller passed in as a pointer.

Specified by:
destroyController in interface IControllerManager

getTimeFactor

public float getTimeFactor()
Return relative speed of time as perceived by time based controllers.

Specified by:
getTimeFactor in interface IControllerManager

setTimeFactor

public void setTimeFactor(float tf)
Set the relative speed to update frame time based controllers.

Specified by:
setTimeFactor in interface IControllerManager

getFrameDelay

public float getFrameDelay()
Gets the constant that is added to time lapsed between each frame.

Specified by:
getFrameDelay in interface IControllerManager

setFrameDelay

public void setFrameDelay(float fd)
Sets a constant frame rate.

Specified by:
setFrameDelay in interface IControllerManager

getElapsedTime

public float getElapsedTime()
Return the elapsed time.

Specified by:
getElapsedTime in interface IControllerManager

setElapsedTime

public void setElapsedTime(float elapsedTime)
Set the elapsed time.

Specified by:
setElapsedTime in interface IControllerManager

getSingleton

public static IControllerManager getSingleton()
Override standard retrieval.


getSingletonPtr

public static IControllerManager getSingletonPtr()
Override standard retrieval.



Copyright © 2007 netAllied GmbH. All Rights Reserved.