Class OrderNVector3dConverger
java.lang.Object
org.web3d.vrml.renderer.common.input.dis.OrderNVector3dConverger
An order-N
Vector3dConverger
.- Version:
- $Revision: 1.2 $
- Author:
- Andrzej Kapolka
-
Constructor Summary
ConstructorsConstructorDescriptionOrderNVector3dConverger
(int pOrder, int pConvergenceInterval, Solver pSolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
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.
-
Constructor Details
-
OrderNVector3dConverger
Constructor.- Parameters:
pOrder
- the order of the convergerpConvergenceInterval
- the length of the convergence interval, in millisecondspSolver
- the differential equation solver to use
-
-
Method Details
-
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 variablederivatives
- 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 onreferenceTime
- 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 epochresult
- aVector3d
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 epochresult
- 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 variablederivatives
- 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 onreferenceTime
- the time at which the values were validcurrentTime
- the current time, in milliseconds since the epoch
-
isConverging
public boolean isConverging()Are the values still converging?- Returns:
- Are we still converging.
-