mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-17 11:05:24 +00:00
Initial Commit
This commit is contained in:
1 parent
397135f687
commit
0f32dd8620
82 files changed
+10693
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package codechicken.lib.vec;
|
||||
|
||||
public class AxisCycle
|
||||
{
|
||||
public static Transformation[] cycles = new Transformation[]{
|
||||
new RedundantTransformation(),
|
||||
new VariableTransformation(new Matrix4(0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)){
|
||||
@Override public void apply(Vector3 vec){
|
||||
double d0 = vec.x; double d1 = vec.y; double d2 = vec.z;
|
||||
vec.x = d2; vec.y = d0; vec.z = d1;
|
||||
} @Override public Transformation inverse(){
|
||||
return cycles[2];
|
||||
}},
|
||||
new VariableTransformation(new Matrix4(0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1)){
|
||||
@Override public void apply(Vector3 vec){
|
||||
double d0 = vec.x; double d1 = vec.y; double d2 = vec.z;
|
||||
vec.x = d1; vec.y = d2; vec.z = d0;
|
||||
} @Override public Transformation inverse(){
|
||||
return cycles[1];
|
||||
}}};
|
||||
}
|
||||
Reference in new issue
Block a user