So now I will explain what is my problem.
I want to use my own matrix operation, so I don't want to use glRotated or glTranslated.
I just need to use a GL command when it time to update the camera so
glLoadMatrix( CamMatrix )

Well, now I have no difficulty with translation along an axis. So I can go UP and DOWN, Straf LEFT to RIGHT or move FORWARD and BACKWARD.

The problem is starting with rotation
I built a function like this one :

Camera::Pitch( float Angle )
{
// Where Angle could be 15°. So add 15°
// to the camera direction (Ex :Look Up)
// I have/want to update the matrix and the
// others members of the class.
// If axis change I need to update it too.
// I know that I need to apply a rotation
// (pitch) around the X axis but how ?
// What I need ? Help please http://www.opengl.org/discussion_boards/ubb/frown.gif
}

A big Thanks
Martin

[This message has been edited by Erakis (edited 06-10-2002).]

henryj

06-10-2002, 12:57 PM

If you are going to use glLoadMatrix you might as well store your camera orientation in a matrix ( MATRIX4 CamMatrix) and get rid of those VECTOR3D. A 4x4 matrix is composed of the rotation parts and the position so there is no point storing the info twice.

If your Matrix4 class is any good it will have all the rotation functions you need otherwise find a class that does have them.

Jambolo

06-10-2002, 04:38 PM

You will be happy to know that you have lots of redundant data there. In the OpenGL system:

It's relatively easy to create a rotation matrix to rotate around the X, Y, and Z axes -- it should be in any graphics book or any basic info on transformations. Just remember that order is important and you may have to transpose the matrices to account for using a different order.