rosaqq / lekek

Java game engine project with LWJGL.
MIT License
0 stars 0 forks source link

Is there a way to optimize camera quaternions #66

Open rosaqq opened 3 years ago

rosaqq commented 3 years ago

5f565aca31f154 aftermath Since these quaternions only contain rotations in one axis, can we optimize?

public void moveRotation(Vector3f rotInc) {
    rotation.premul(new Quaternionf().rotationX(rotInc.x));
    rotation.mul(new Quaternionf().rotationY(rotInc.y));
}