blog.vi-kan.net One thought after another

Particle-challenge part 2: OK – the math-part is a little bit hard…

Matrix Transformation It’s summer. I’m 500 km from home, and I’m trying to find some time to continue on the particle-challenge.  In the last post, I didn’t decide where to go next; The world, the particles or physics. After some thinking, I found the first one most important, and chose to read a little about how the coordinate system in OpenGL works. It sounds simple enough, but after some coding, I really feel that I need more math skills to get control of this. I have now started to read ‘Beginning Math and Physics for Game Programmers’ to see if I can get the hang of it.

I have started on a camera class, but can’t make it work quite like I want to. There ain’t much functionality in it yet, either.

The camera consist of three vectors: eye position, forward direction and up direction. In theory, the class should make a rotation-matrix from the forward and up vectors, and then translate the matrix by the eye vector.

For now, it uses gluLookAt( ) to do the transformations instead. The reason why is simply that I can’t get the math to work… I’ll have to look at it some more at a later time, but now, I want more particle-fun and less math-hassle.

snapshot of the code is available.

comments powered by Disqus