iDevGames Forums
6DOF camera.... - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: 6DOF camera.... (/thread-7657.html)



6DOF camera.... - ktolis - Jul 20, 2002 02:23 PM

Hello, I am trying to implement a 6DOF camera class
has anyone a reusable class or pointers to one that works for sure(and also tested it)?

thanx


6DOF camera.... - Johan - Jul 20, 2002 03:20 PM

Quote:Hello, I am trying to implement a 6DOF camera class
has anyone a reusable class or pointers to one that works for sure(and also tested it)?

Have you tried using google to find one? I found a whole bunch of camera sources with just a quick 15 sec search.

Yeah yeah, I know all the "use google" post are kinda boring and useless. Still, you could have found the code you were looking for during the time it took you to write the post.

Cheers,

.johan


6DOF camera.... - ktolis - Jul 21, 2002 10:44 AM

well this was the first thing i did. the results were quite many but this is not the problem. the problem is that almost all implementations were depending on code from classes of the project they came from, or they were not designed for OpenGL usage. The best code i found was one in VB (!!!) and direct3D, which i rewrote but the code for the strafeing was messed up (or at least it was messed up when i used c++ instead of vb). Other code samples included clean but platform dependent code (ms vcpp, mfc, etc...)so i am asking if someone has a piece of code that a) works, b) does not require copying (much) code from other classes from the project it cames from, c) works without requiring platform specific api ( e.g. uses only sdl + opengl)...


6DOF camera.... - inio - Jul 21, 2002 02:43 PM

what features exactly are you looking for? "strafing" makes it sound like you want a bit more than simple location/rotation which is all that's required by your "6DOF" requirement.


6DOF camera.... - ktolis - Jul 21, 2002 10:48 PM

i am searching for the following features:
yaw,roll,pitch,(all the rotations) and all the transformations (strafe,move forward (the way the camera looks), move behind) and if possible rotating around a specific point (e.g. for rotating around a model).


6DOF camera.... - GoodDoug - Jul 22, 2002 01:40 PM

Check out David eberly's sample code for Quaternions, as his are really well written and easy to understand. I've used his code before to make a 6DOF camera by always describing the camera's rotations as quaternions (avoids gimbal lock, and allows for some nice interpolation. the only thing is you have to be careful about your up vector, but that is simple enough by using constraints in your interpolation schemes (interpolation using integral minimizers is what I did, but you could proably just get away with forcing an up vector at each interpolation)

just do a Google search on Quaternion, or Eberly to find stuff.


6DOF camera.... - Mutle - Jul 23, 2002 10:17 AM

On http://www.GameTutorials.com (in the OpenGL Tutorials Section) are very nice Tutorials dealing with a Camera Class... The OpenGL base code uses some Windows/SDL Code, but you can just have a look at the Camera Class, which is just in OpenGL.