Package org.sunflow.math
Class MovingMatrix4
java.lang.Object
org.sunflow.math.MovingMatrix4
This class describes a transformation matrix that changes over time. Note
that while unlimited motion segments are supported, it is assumed that these
segments represent equidistant samples within a given time range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData
(int i) Get the matrix for the given time step.inverse()
int
Get the number of matrix segmentssample
(float time) void
setSteps
(int n) Redefines the number of steps in the matrix.void
updateData
(int i, Matrix4 m) Updates the matrix for the given time step.void
updateTimes
(float t0, float t1) Update the time extents over which the matrix data is changing.
-
Constructor Details
-
MovingMatrix4
Constructs a simple static matrix.- Parameters:
m
- matrix value at all times
-
-
Method Details
-
setSteps
public void setSteps(int n) Redefines the number of steps in the matrix. The contents are only re-allocated if the number of steps changes. This is to allow the matrix to be incrementally specified.- Parameters:
n
-
-
updateData
Updates the matrix for the given time step.- Parameters:
i
- time step to updatem
- new value for the matrix at this time step
-
getData
Get the matrix for the given time step.- Parameters:
i
- time step to get- Returns:
- matrix for the specfied time step
-
numSegments
public int numSegments()Get the number of matrix segments- Returns:
- number of segments
-
updateTimes
public void updateTimes(float t0, float t1) Update the time extents over which the matrix data is changing. If the interval is empty, no motion will be produced, even if multiple values have been specified.- Parameters:
t0
-t1
-
-
inverse
-
sample
-