I don't understand the code in the "rotate a cube" example...
is easy.first the setOrientation(refFrame,dir.xyz,up.xyz)

this is how to orientate the frame with related to the refFrame(DXdraw.sceneDXDraw.camera, nil is most used)

set the dir.xyz to point the front of the object, Up.xyz is the top of the object.
the dir and up coordinates is ALWAYS 1/2pi rad rotated. (when you insert wrong coordinates the up.xyz are changed)

OK the SetOrientation is Clear now?

now the SetRotation..
SetRotation(refFrame,x,y,z,alpha)
x,y,z are the axes where the Frame is rotated on.
the refFrame is the same story as the SetOrientation.

is there more you want to know.?

ps. sorry for my bad englisch.

gr. jeroen de jong.