Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.common.input.dis
Class OrderNVector3dConverger

java.lang.Object
  extended by org.web3d.vrml.renderer.common.input.dis.OrderNVector3dConverger

public class OrderNVector3dConverger
extends java.lang.Object

An order-N Vector3dConverger.

Version:
$Revision: 1.2 $
Author:
Andrzej Kapolka

Constructor Summary
OrderNVector3dConverger(int pOrder, int pConvergenceInterval, Solver pSolver)
          Constructor.
 
Method Summary
 void convergeTo(javax.vecmath.Vector3d value, javax.vecmath.Vector3d[] derivatives, long referenceTime, long currentTime)
          Smoothly converges to the specified state.
 void getDerivatives(long time, javax.vecmath.Vector3d[] result)
          Fills the given array with the current values of the variable's derivatives.
 void getValue(long time, javax.vecmath.Vector3d result)
          Returns the current value of the variable.
 boolean isConverging()
          Are the values still converging?
 void setValueAndDerivatives(javax.vecmath.Vector3d value, javax.vecmath.Vector3d[] derivatives, long referenceTime)
          Sets the value and derivatives associated with this converger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderNVector3dConverger

public OrderNVector3dConverger(int pOrder,
                               int pConvergenceInterval,
                               Solver pSolver)
Constructor.

Parameters:
pOrder - the order of the converger
pConvergenceInterval - the length of the convergence interval, in milliseconds
pSolver - the differential equation solver to use
Method Detail

setValueAndDerivatives

public void setValueAndDerivatives(javax.vecmath.Vector3d value,
                                   javax.vecmath.Vector3d[] derivatives,
                                   long referenceTime)
Sets the value and derivatives associated with this converger. This method changes the state of the converger immediately, without converging to the new values.

Parameters:
value - the value of the variable
derivatives - an array containing the values of the variable's derivatives; the value at index 0 is the first derivative, the value at index 1 is the second derivative, and so on
referenceTime - the time at which the values were valid

getValue

public void getValue(long time,
                     javax.vecmath.Vector3d result)
Returns the current value of the variable.

Parameters:
time - the current time, in milliseconds since the epoch
result - a Vector3d to hold the result

getDerivatives

public void getDerivatives(long time,
                           javax.vecmath.Vector3d[] result)
Fills the given array with the current values of the variable's derivatives. The value at index 0 will be set to the first derivative, the value at index 1 will be set to the second derivative, and so on (up to the size of the array).

Parameters:
time - the current time, in milliseconds since the epoch
result - an array to contain the current values of the variable's derivatives

convergeTo

public void convergeTo(javax.vecmath.Vector3d value,
                       javax.vecmath.Vector3d[] derivatives,
                       long referenceTime,
                       long currentTime)
Smoothly converges to the specified state.

Parameters:
value - the value of the variable
derivatives - an array containing the values of the variable's derivatives; the value at index 0 is the first derivative, the value at index 1 is the second derivative, and so on
referenceTime - the time at which the values were valid
currentTime - the current time, in milliseconds since the epoch

isConverging

public boolean isConverging()
Are the values still converging?

Returns:
Are we still convering.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium