Re: Camera Management
 From: Tony O'Bryan <storm_reaver@xxxxxxxxx>
 Date: Thu, 28 Jul 2005 18:33:18 GMT
Nicholas wrote:
> This sounds like it might have a very simple solution. Store the
> accumulated angle of rotation, and rotate the original forward/up
> vectors by that angle, rather than rotating the already rotated vectors
> by the incremental angle.
A large number of problems arose when I tried maintaining rotation angles
rather than using just vectors. One of them is that an object (such as the
camera) can go through a large number of arbitrary transformations to
arrive at its final orientation. Angles have to be converted to vectors at
some point anyway for many operations, so it makes sense to use vectors
throughout. Vector math up to this point has been very easy to work with,
so I'll stick with them.
I don't know of any way to represent camera orientation with simple angles
without using Quaternions, an approach I tried and abandoned in favor of
matrices. Matrices are many times simpler to use, and Quaternions have to
be converted to Matrices anyway in order for OpenGL to use their results.
Quaternion math is also ridiculously complicated compared to matrix math.
The problem should be solved by taking a couple cross products periodically
to regenerate the up vector:
left = forward x up
up = forward x left (or left x forward; I'll figure out which)
Thanks for the response. :)
.
 FollowUps:
 Re: Camera Management
 From: fungus
 Re: Camera Management
 References:
 Camera Management
 From: Tony O'Bryan
 Re: Camera Management
 From: Nicholas
 Camera Management
 Prev by Date: Re: Drawing text
 Next by Date: Stencil buffers and DIBs
 Previous by thread: Re: Camera Management
 Next by thread: Re: Camera Management
 Index(es):
Relevant Pages
