also I have made an online 3D Gimbals demo (little messy, I reuse the viewer3D), source are available to download and it can be easily updated / recompiled for testing.
key 1,2,3 respectivly rotate gimbals 1,2,3, mouse can be used to rotate the root object (all scene but excluding the main light).
in the windows status bar you can read the current euler rotation for box (rotation relative to its parent/ to its local space), wich doesn't change as expected as we only change rotation on parents objects.
to test/modify just look at the method called render3DWorldSpace.
http://demo.dzzd.net/GIMBALS/