Getting Forward/Right and Up from a Spatial

Well I have a spatial attached to the rootNode, and I want to get the World vector, where it is facing, where right is, and where up is, so the local axes in worldspace more or less.

I bet there is some way to get this without having to calculate this out of the Quarternion myself, but I can't seem to find it. Can anyone help me maybee?

Maybe this helps.

Matrix3f matrix = spatial.getWorldRotation().toRotationMatrix();
Vector3f x = matrix.mult(Vector3f.UNIT_X);
Vector3f y = matrix.mult(Vector3f.UNIT_Y);
Vector3f z = matrix.mult(Vector3f.UNIT_Z);

Thanks, exactly this was what I needed

another way would be:


oh thats intresting, since I don't really understand any of the Math working inside the Engine ^^