mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 15:56:07 +00:00
Fixed up rendering of combustion gen and vat.
This commit is contained in:
1 parent
e78c2fffe6
commit
e5cd70f905
16 files changed
+89
-101
No files matched your search
@@ -3,6 +3,7 @@ package crazypants.render;
|
||||
import crazypants.vecmath.Quat4d;
|
||||
import crazypants.vecmath.Vector3d;
|
||||
import crazypants.vecmath.Vector3f;
|
||||
import crazypants.vecmath.Vertex;
|
||||
|
||||
public class VertexRotation implements VertexTransform {
|
||||
|
||||
@@ -18,6 +19,11 @@ public class VertexRotation implements VertexTransform {
|
||||
quat = Quat4d.makeRotate(angle, axis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vertex vertex) {
|
||||
apply(vertex.xyz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vector3d vec) {
|
||||
vec.sub(center);
|
||||
|
||||
@@ -2,9 +2,12 @@ package crazypants.render;
|
||||
|
||||
import crazypants.vecmath.Vector3d;
|
||||
import crazypants.vecmath.Vector3f;
|
||||
import crazypants.vecmath.Vertex;
|
||||
|
||||
public interface VertexTransform {
|
||||
|
||||
public abstract void apply(Vertex vertex);
|
||||
|
||||
public abstract void apply(Vector3d vec);
|
||||
|
||||
public abstract void applyToNormal(Vector3f vec);
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Collection;
|
||||
|
||||
import crazypants.vecmath.Vector3d;
|
||||
import crazypants.vecmath.Vector3f;
|
||||
import crazypants.vecmath.Vertex;
|
||||
|
||||
public class VertexTransformComposite implements VertexTransform {
|
||||
|
||||
@@ -22,12 +23,18 @@ public class VertexTransformComposite implements VertexTransform {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vertex vertex) {
|
||||
for (VertexTransform xform : xforms) {
|
||||
xform.apply(vertex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vector3d vec) {
|
||||
for (VertexTransform xform : xforms) {
|
||||
xform.apply(vec);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package crazypants.render;
|
||||
|
||||
import crazypants.vecmath.Vector3d;
|
||||
import crazypants.vecmath.Vector3f;
|
||||
import crazypants.vecmath.Vertex;
|
||||
|
||||
public class VertexTranslation implements VertexTransform {
|
||||
|
||||
@@ -29,6 +30,11 @@ public class VertexTranslation implements VertexTransform {
|
||||
this(trans.x, trans.y, trans.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vertex vertex) {
|
||||
apply(vertex.xyz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Vector3d vec) {
|
||||
vec.x += x;
|
||||
|
||||
Reference in new issue
Block a user