Newbie trouble with arcball and translation

Hi everybody,

I’m really new to OpenGL, and I’m having some serious “head-scratching” issues with ArcBall rotation.

Let’s start from the beginning:

I was asked to give myself a crash course in OpenGL to improve some graphics in some applications we have here in the office. To experiment with some concepts, I decided to try and implement a basic model viewer. For control styles, ArcBall was clearly the best way to go. Right now, it’s really simple: The left mouse button controls the ArcBall rotation, and the left/right/up/down arrow keys control translation (the idea is to ultimately have the right mouse button do this).

I believe, if anyone is familiar with it, this is the interface you get in the modeling software “Blender.”

Anyway, I’m coming up against a problem. I can translate the model parallel to the screen plane OR I can keep the center of rotation in the center of the screen. I have not been able to combine both of these operations at the same time, but this is the effect I’m after: keeping the center of rotation in the center of the screen, while at the same time having the model translate parallel to the screen plane regardless of the ArcBall’s orientation.

It seems, at the outset, like this should be easy as pie. No matter what I try, I get either one behavior or the other, or some strange and unexpected behavior. I’ve been posting on forums all over the place, and nobody seems to know what the deal is.

I am starting to think that, when I intercept the keyboard commands, I need to take my translation factors (Trans_X, Trans_Y, Trans_Z) and base them at least in part on the current state of the arcball rotation matrix. That’s fine, and it seems like it should work, but I have absolutely NO clue how I would do this. I only got arcball working using code samples I found online. I’m embarrassed to confess, but I have no idea how the math behind it is supposed to work, or I could probably figure it out myself. :o

Anyhow, I’m going to post this in the “Advanced” OpenGL forum too, but does anybody got any idea how to approach this from the math side?

Thank you so much!!
-Langecrew-

PLease, keep your discussion under the same topic. No need to cross post a bit everywhere.
http://www.opengl.org/discussion_boards/…1525#Post231525

Well, I guess I have to apologize, but nobody on the beginners forum seems to know what I should do! besides, I’m on several programming forums where I don’t even go to the beginners section, and I also figured maybe posting in the math and algorithm forum would be more on-topic anyway.

well, once again, sorry about that, and I won’t do it again. But I’m still lost!! :frowning:

(and feelin’ stupid :o )