use of javax.vecmath.Matrix3f in project bdx by GoranM.
the class Stack method allocMatrix3f.
public Matrix3f allocMatrix3f() {
types[sp++] = TYPE_MATRIX3F;
int pos = stackPositions[TYPE_MATRIX3F]++;
if (matrix3fStack.size() <= pos) {
matrix3fStack.add(new Matrix3f());
}
return matrix3fStack.get(pos);
}
use of javax.vecmath.Matrix3f in project bdx by GoranM.
the class Stack method alloc.
public Matrix3f alloc(Matrix3f original) {
Matrix3f m = allocMatrix3f();
m.set(original);
return m;
}
use of javax.vecmath.Matrix3f in project bdx by GoranM.
the class GameObject method rotate.
public void rotate(float x, float y, float z) {
Matrix3f ori = orientation();
Matrix3f rot = new Matrix3f();
MatrixUtil.setEulerZYX(rot, x, y, z);
rot.mul(ori);
orientation(rot);
}
use of javax.vecmath.Matrix3f in project bdx by GoranM.
the class GameObject method orientation.
public Matrix3f orientation() {
Matrix4f t = transform();
Matrix3f ori = new Matrix3f();
t.getRotationScale(ori);
return ori;
}
use of javax.vecmath.Matrix3f in project bdx by GoranM.
the class GameObject method rotateLocal.
public void rotateLocal(float x, float y, float z) {
Matrix3f ori = orientation();
Matrix3f rot = new Matrix3f();
MatrixUtil.setEulerZYX(rot, x, y, z);
ori.mul(rot);
orientation(ori);
}
Aggregations