[Bf-committers] NDOF - viewmoveNDOF note

sfogoros sfogoros at att.net
Tue Jul 17 15:20:18 CEST 2007


I can honestly say, I haven't figured out G.vd->dist effects on the 3D 
view. I'll leave it for another day.

I have two hacks to go along with the view.c:viewmoveNDOF() function. 
The first one will correct the offset when viewmoveNDOF() is called. The 
previous values are stored in static variables and a flag is set. If the 
mouse move function, view.c:viewmove(), is called, it checks the flag 
and restores G.vd->dist from the static variables. There is still a 
small jump in the view but it basically works. The correction code is a 
duplicate of the code in editview.c:fly(). I should have a patch to you 
within two days.

The second hack forces perspective view when viewmoveNDOF() is called 
(regardless of user selection). I don't know how to update the menu to 
reflect perspective mode true. I could use a bit of help with that.

These hacks should get us through SIGGRAPH. I will continue to work on 
having a cleaner view move interface.

Luc,

When this project started, you mentioned you would like to see axis 
locking as one of the view mode [modifiers]. Rather than have the user 
select an axis to temporarily lock, I'm going to implement a view 
rotation ortho mode. This doesn't have anything to do with ortho/persp 
view matrix. This mode uses a user set ortho step angle and forces the 
rotation angle (all three axis) to be bound to a modulus of the step 
angle. I think one of the buttons on the SpaceNav can be used to cycle 
through view move mode modifiers. Modifiers can be, continuous, rotation 
ortho, translation ortho, rotation and translation ortho.

In example, if I set a 45 degree ortho step angle in user settings, and 
select rotation ortho, when I move the SpaceNav control for Rx, Ry, Rz 
rotations, the view will rotate to the angles 0, 45, 90, 135, 180, etc. 
only in each of the three axes. For translation ortho, the translation 
will be continous (no grid snapping kind of thing), but only allowed 
along ortho step angle modulus.

I think this would be the easiest way for the user to lock rotations and 
translations while editing a scene. Let me know if you like this idea.

SteveF



More information about the Bf-committers mailing list