I am working on a simple octree system patterned after some XNA samples I found, and am building up a series of generic bounding classes( BoundingBox, BoundingSphere, BoundingFrustum, etc..) that use OpenTK's math system rather then MSs directX code.
I'm running into some issues when dealing with the frustums and their associated matrices.
1) All the C docs for openGL I have seen show that GL stores it's matrix info in column major format, yet Matrix4 seems to be row major. Is there something in the GL layer for OpenTK that changes this? or am I mistaken?
2) I don't see an easy way to use GL.GetFloat(GetPName.ModelviewMatrix... to load the current GL matrix into a Matrix4, but I see that there are overloads for GL.LoadMatrix and MultiMatrix, etc.. Is there an easy way to do this? or is it simpler just to keep a set of Matrix4 that are "synced" with GL (using Matrix4.Perspective, Matrix4.LookAt, etc..). Do people generally build up a "camera class" with a matrix and then shove it into GL? or do they simply compute a LookAt vector?
3) Does anyone have any code for extracting the view planes from a frustum matrix (ViewMatrix * PerspectiveMatrix) that uses Matrix4 classes? I've got code that does it from the base GL float arrays, but since I'm not sure if those match the Matrix4 format, I'm looking for options.
4) Are there plans for higher level math classes like this? such as planes, rays, frustums etc...? I am mostly just curious if this work might be useful to others, or just a stopgap for me until OpenTK supports it.
Thanks for any help/opinions anyone can offer:)