"'transformDirection()' is just a multiplication of the upper-left 3x3 submatrix with a 3D vector." - can you show me in code how can I do this thing please?

I tried something like this:

Matrix4f cam = Maths.createTransformationMatrix(camera.getPosition(), camera.getRoll(), camera.getPitch(), camera.getYaw(), 1);

Matrix4f invCam;

Matrix4f.invert(cam, invCam);

Vector3f at = new Vector3f(0, 0, -1);

//invCam.transformDirection(at);

Vector3f up = new Vector3f(0, 1, 0);

//invCam.transformDirection(up);

**createTransformationMatrix method:**public static Matrix4f createTransformationMatrix(Vector3f translation, float rx, float ry, float rz, float scale)

{

Matrix4f matrix = new Matrix4f();

matrix.setIdentity();

Matrix4f.translate(translation, matrix, matrix);

Matrix4f.rotate((float) Math.toRadians(rx), new Vector3f(1,0,0), matrix, matrix);

Matrix4f.rotate((float) Math.toRadians(ry), new Vector3f(0,1,0), matrix, matrix);

Matrix4f.rotate((float) Math.toRadians(rz), new Vector3f(0,0,1), matrix, matrix);

Matrix4f.scale(new Vector3f(scale,scale,scale), matrix, matrix);

return matrix;

}

Thank you for your help