Asteroid progress
This commit is contained in:
22
core/src/mindustry/graphics/g3d/MatMesh.java
Normal file
22
core/src/mindustry/graphics/g3d/MatMesh.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package mindustry.graphics.g3d;
|
||||
|
||||
import arc.math.geom.*;
|
||||
|
||||
//TODO maybe this is a bad idea
|
||||
/** A GenericMesh that wraps and applies an additional transform to a generic mesh. */
|
||||
public class MatMesh implements GenericMesh{
|
||||
private static final Mat3D tmp = new Mat3D();
|
||||
|
||||
GenericMesh mesh;
|
||||
Mat3D mat;
|
||||
|
||||
public MatMesh(GenericMesh mesh, Mat3D mat){
|
||||
this.mesh = mesh;
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Mat3D projection, Mat3D transform){
|
||||
mesh.render(projection, tmp.set(transform).mul(mat));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user