[Bf-committers] Turntable view patch

John Aughey jha at aughey.com
Fri Mar 25 15:00:47 CET 2005

On Fri, 25 Mar 2005, Ton Roosendaal wrote:
> I have troubles interpreting the patch... usually I don't apply patches
> to my code without first fully understanding the changes. This is in a
> format I don't recognize.
> Can you try to do a "cvs diff -u" for the patch?

There should be a new patch in the patch tracker that was generated from

> The reason why I recoded turntable to become hybrid with a trackball
> component, was because the viewrotate method works with small
> increments (rotations on rotations etc), causing the "up vector" to
> become slanted after a while. This was an annoying bug, reported in
> tracker.

I thought about that too, and was a concern of mine.  Especially with
using floats instead of doubles.  I rotated the view around for a while
without any detectable tilt.  I think most people switch to the front,
side, or front view quite often which would reset any accumulated error.

The approach I typically use is to keep around a yaw and pitch variable
and compute the view matrix off of those.  That would introduce another
set of variables into the vd structure.  That's the simplest and quickest
way to do it.  Trying to null out any up vector slant is possible, but not
as straight forward.  I can do it either way.

> I might consider bringing back traditional turntable for blender, but
> only when it incorporates a solution for the incrementing bug,
> something I can't see in your code?

Is the yaw and pitch variable solution acceptable, or would you want to
see something that corrects for the up vector?


More information about the Bf-committers mailing list