The following works fine, if you want to have some kind of first person view. Ie there’s a camera x/y/z-position in the universe and the camera’s alignment as three angles.
The rotation happens in angle degrees (0-360°), and in the order: Y, X, Z which is like Lightwave’s Head, Pitch, Bend philosophy.
private Transform3D mTransform = new Transform3D();
private Transform3D mRotation = new Transform3D();
mView .. Canvas3d's View, connected to the Universe
private void moveCamera(Point3f position, Tuple3f angle)
{
mTransform.set(position);
mRotation.rotY((float) Math.toRadians(angle.y));
mTransform.mul(mRotation);
mRotation.rotX((float) Math.toRadians(angle.x));
mTransform.mul(mRotation);
mRotation.rotZ((float) Math.toRadians(angle.z));
mTransform.mul(mRotation);
mView.setTransform(mTransform);
}