Sign in to follow this  
Boder

OpenGL Standard Vector/Matrix/Quaternion

Recommended Posts

Unless you want to download a 3rd party math library, nothing. You'll have to write your own.

It's really not very hard at all.

Edit:: or are you talking about the functions such as glTranslate which performs a translation and glRotate which does rotations?

Share this post


Link to post
Share on other sites
I figure a vector is something that everyone is going to be using, so everybody shouldn't have to write the class.

Something like this: C++ Vector Class with a Matrix class and all the multiplications

Share this post


Link to post
Share on other sites
Unfortunately, everybody is left on their own. I have pretty extensive and well-tested vector/matrix/quaternion classes for use with OpenGL, GPL licensed:

Can be viewed at
http://dog4.dyndns.org:8080/cgi-bin/trac.cgi/browser/trunk/lib/sources
the following files: hvector3d.*, vector3d.*, quaternion.*, tmatrix3d.*

Share this post


Link to post
Share on other sites
Cool, thanks for that dog4.

I probably will try to have a templated version. I also noticed that your operator* was calling operator*= which I probably wouldn't expect.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this