XPost: comp.os.ms-windows.programmer.win32, alt.windows7.general
Paul
I would investigate my environment graphically.
:-) Thats how got in this mess. The (classic) OpenGL projection causes
you to look over the perpendicular-to-the-screen axis (-Z for Y=Up, +Y for Z=Up), so I assumed that was the origin of the horizontal rotation. And
for some reason I implemented it going clockwise.
Part of the fun of your first attempts at three-space, is setting the Viewpoint.what you see in the frame won't make much sense, unless
the view point is in a good spot.
Indeed. That is why I start with drawing 3 long boxes in red, green and
blue representing the X, Y and Z axis at the origin as a visual reference,
and put the camera a bit "back" and "up"
and then "watch" as you draw elements on the unit sphere.
Yep, done that. Translating works and so do rotations. The problem with
that is that all that stuff is symetrical, giving zero hints to what the rotation directions or their origins should be. I just got it to work with
my "starts at -Z (into the monitor) and rotates clockwise" implementation.
I currently have added, to my Z=Up version, a 90 degree rotation to the projection matrix (and updated the camera movement code accordingly) so that
I initially look over the +X axis, and changed the horizontal rotation to
start at that axis and go counter-clockwise. Lets see if that works
better. Still will have to make guesses for the other two though.
Funny how something basic like this (angle directions and origins in a 3D coordinate system) is not described anywhere. :-(
By the way, the
http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm
website where I got some of my info from didn't quite help with this picture
http://www.euclideanspace.com/maths/geometry/rotations/euler/heading.gif
where the "heading" angle starts from the +Z axis. :-|
Also this one :
http://www.euclideanspace.com/maths/standards/index.htm . Almost averything seems to be there - but for what I'm looking for ...
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)