Rework rendering
Adds default, stereoscopic, tiling, cubic and equirectangular frame rendering
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package eu.crushedpixel.replaymod.interpolation;
|
||||
|
||||
public interface Interpolation<T> {
|
||||
void prepare();
|
||||
T getPoint(float position);
|
||||
void addPoint(T pos);
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import akka.japi.Pair;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class LinearInterpolation<K> {
|
||||
public abstract class LinearInterpolation<K> implements Interpolation<K> {
|
||||
|
||||
protected List<K> points = new ArrayList<K>();
|
||||
|
||||
@@ -13,6 +13,11 @@ public abstract class LinearInterpolation<K> {
|
||||
points = new ArrayList<K>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepare() {
|
||||
|
||||
}
|
||||
|
||||
public abstract K getPoint(float position);
|
||||
|
||||
public void addPoint(K point) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Vector;
|
||||
|
||||
public class SplinePoint extends BasicSpline {
|
||||
public class SplinePoint extends BasicSpline implements Interpolation<Position> {
|
||||
private static final Object[] EMPTYOBJ = new Object[]{};
|
||||
private Vector<Position> points;
|
||||
private Vector<Cubic> xCubics;
|
||||
@@ -60,7 +60,8 @@ public class SplinePoint extends BasicSpline {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void calcSpline() {
|
||||
@Override
|
||||
public void prepare() {
|
||||
try {
|
||||
calcNaturalCubic(points, vectorX, xCubics);
|
||||
calcNaturalCubic(points, vectorY, yCubics);
|
||||
|
||||
Reference in New Issue
Block a user