public class LinearInterpolation extends java.lang.Object implements Interpolation
Constructor and Description |
---|
LinearInterpolation() |
Modifier and Type | Method and Description |
---|---|
double |
arcLength(double positionA,
double positionB)
Gets the result of ∫ab|f'(t)| dt.
That means it calculates the arc length (in meters) between positionA and positionB. |
Vector3 |
get1stDerivative(double position)
Gets the result of f'(position).
|
Vector3 |
getPosition(double position)
Gets the result of f(position).
|
int |
getSegment(double position)
Get the segment position.
|
void |
setNodes(java.util.List<Node> nodes)
Sets nodes to be used by subsequent calls to
Interpolation.getPosition(double) and the other methods. |
public void setNodes(java.util.List<Node> nodes)
Interpolation
Interpolation.getPosition(double)
and the other methods.setNodes
in interface Interpolation
nodes
- the nodespublic Vector3 getPosition(double position)
Interpolation
getPosition
in interface Interpolation
position
- the position to interpolatepublic Vector3 get1stDerivative(double position)
Interpolation
get1stDerivative
in interface Interpolation
position
- the position to interpolatepublic double arcLength(double positionA, double positionB)
Interpolation
arcLength
in interface Interpolation
positionA
- lower limitpositionB
- upper limitpublic int getSegment(double position)
Interpolation
getSegment
in interface Interpolation
position
- the position