crystalspace.jbind.impl.csutil.virtclk
Class csVirtualClock

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.virtclk.csVirtualClock
All Implemented Interfaces:
iBase, iPointer, iVirtualClock

public class csVirtualClock
extends csBase
implements iVirtualClock

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csVirtualClock(iPointer nPointer)
           
 
Method Summary
 void advance()
          Advance the engine's virtual-time clock.
 int getCurrentTicks()
          Returns the absolute time of the last call to Advance();.
 int getElapsedTicks()
          Query the time elapsed between the two most recent invocations of Advance();.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
static void initSCF()
           
protected  boolean isNativePointerValidSafe()
           
 void resume()
          Resume the engine's virtual-time clock.
 void suspend()
          Suspend the engine's virtual-time clock.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csVirtualClock

public csVirtualClock(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

advance

public void advance()
Description copied from interface: iVirtualClock
Advance the engine's virtual-time clock. Implemented in csVirtualClock, and csMovieRecorder::VirtualClock.

Specified by:
advance in interface iVirtualClock
See Also:
iVirtualClock.advance()

getCurrentTicks

public int getCurrentTicks()
Description copied from interface: iVirtualClock
Returns the absolute time of the last call to Advance();. For game logic you should always use this function instead of csGetTicks();. Implemented in csVirtualClock, and csMovieRecorder::VirtualClock. Referenced by csSprite3DMeshObject::SetAction();.

Specified by:
getCurrentTicks in interface iVirtualClock
Returns:
See Also:
iVirtualClock.getCurrentTicks()

getElapsedTicks

public int getElapsedTicks()
Description copied from interface: iVirtualClock
Query the time elapsed between the two most recent invocations of Advance();. Implemented in csVirtualClock, and csMovieRecorder::VirtualClock.

Specified by:
getElapsedTicks in interface iVirtualClock
Returns:
See Also:
iVirtualClock.getElapsedTicks()

resume

public void resume()
Description copied from interface: iVirtualClock
Resume the engine's virtual-time clock. Call this function when the client application begins invoking Advance(); again after extended down-time. This function is the complement of Suspend();. Implemented in csVirtualClock, and csMovieRecorder::VirtualClock.

Specified by:
resume in interface iVirtualClock
See Also:
iVirtualClock.resume()

suspend

public void suspend()
Description copied from interface: iVirtualClock
Suspend the engine's virtual-time clock. Call this function when the client application will fail to call Advance(); for an extended period of time. Suspending the virtual-time clock prevents a temporal anomaly from occurring the next time GetElapsedTicks(); is called after the application resumes invoking Advance();. Implemented in csVirtualClock, and csMovieRecorder::VirtualClock.

Specified by:
suspend in interface iVirtualClock
See Also:
iVirtualClock.suspend()