Jim, gluLookAt() does what you have in mind. If you want to know what it's doing look at the Mesa sources. For an explanation have a look at the "Red Book". Regards, Roland --- Jim Parker <hopeye@xxxxxxxxxx> wrote: > > On 2003.05.16 12:06 Roland Krause wrote: > > > > > > > viewer. Does anyone know a simple routine to convert a vector to > > > OpenGL rotation angles ? You can not use simple force resolution > > > routines. > > > > Do you mean a virtual trackball that allows you to rotate the scene > or > > a camera? I have both, let me know what you need. They are from the > > net, if you google for virtual trackball you will find them. > > > > Roland > > > > > > Not quite. An example should help. Suppose your model is centered > on > a global orthoginal right handed coordinate system. You are at a > arbitrary distance far enough away to see the entire model. > > If you are looking down the Z-axis at the X-Y Plane. The orientation > > unit vector would be: (0i + 0j + 1k) > > Now let say you want to rotate the coordinate system so you are > looking > down the X-axis at the Y-Z plane. > The new orientation vector is (1i + 0j + 0k). This requires a 90 > degree rotation about the Y axis in OpenGL. > > Now it is easy to write a simple if-else code block for the six major > > faces. What I am looking for is a general routine to handle any > arbitrary vector. An example would be a isometric view obtained by a > > 30 degree rotation about the X-axis, then another 30 degree rotation > about the Y-axis. > > Like I said in my previous post, you can't simply extend the force > resolution routines. > > thanks for your help. > > cheers, > Jim Parker > __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com