6DOF camera....

ktolis
Unregistered
 
Post: #1
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
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2009.01
Post: #2
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
Quote this message in a reply
ktolis
Unregistered
 
Post: #3
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)...
Quote this message in a reply
Member
Posts: 145
Joined: 2002.06
Post: #4
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.

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
ktolis
Unregistered
 
Post: #5
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).
Quote this message in a reply
Member
Posts: 104
Joined: 2002.04
Post: #6
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.
Quote this message in a reply
Mutle
Unregistered
 
Post: #7
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.
Quote this message in a reply
Post Reply