Re: [Algorithms] Left-handed vs. right-handed
Brought to you by:
vexxed72
|
From: Graham H. <gra...@ge...> - 2009-05-07 13:55:31
|
Yes, you're right about the reflections: I should have said "you want to avoid dealing with more reflections than you have to". I think the argument still applies---by the time your data is transformed to the run-time representation the only reflections should be the ones the artists have asked for. That way you can detect them and flip the sense of forward and back faces as necessary. This will work independently of the basis representation. I don't understand your other objection though. When the user presses "forward" I just ask my camera class which way forward is :-). Graham -----Original Message----- From: Alen Ladavac [mailto:ale...@cr...] Sent: 07 May 2009 13:27 To: Graham Hazel Cc: Game Development Algorithms Subject: Re: [Algorithms] Left-handed vs. right-handed Graham wrote at 5/7/2009: > Now, my contention is that at run-time you want to avoid having to deal > with reflections: SO(3) is much nicer than O(3). Given that > requirement, the assumptions implicit in whatever driver/API is > underneath may make your choice of basis for you. Erm, wrong requirement. You _want_ to be able to deal with reflections at run time. I mean - its easier for me not to, but the artists need it - so it has to be that way. Stretches that are not multiples of identity and even those involving different signs on different axes are here to stay, for us at least. > The key is to make all your own code basis-agnostic. This is easy if > you have no preference! You can, and should, make majority of your code basis-agnostic. Internals of math, physics, lighting, etc. can be agnostic. But you cannot do it at the points of interfacing with the reality. When the user presses movement stick on the gamepad forward, you have to choose to map it to -Z, +Z, -Y, +Y, whatever... Same way when you want to output something on the screen, you have to know which of the axes in your internal representation is "front", which is "right" etc. and have to adjust your output to match the basis used by the rendering API. Cheers, Alen |