Created
October 16, 2014 14:16
-
-
Save Gankra/45db3e3bd0007cb0d37d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set the matrix as a yaw rotation matrix | |
// if degree is true (!=0) then angle is given in degrees | |
// otherwise angle is given in radians | |
static Matrix4f rotateY(float angle, int degree); | |
// Editor's note: THIS LIBRARY IS SUPPOSED TO BE FOR OPENGL WHAT | |
Matrix4f * getViewMatrix(D3DXMATRIX * viewMatrix); | |
// Editor's note: Vectors are never a reasonable thing to pass by raw ptr | |
int changeAbsPosition(Vector3f *v); | |
// change the speed of the camera motion | |
int camera::updateSpeed(float speed) | |
{ | |
this->speed += speed; | |
return 0; // Editor's note: every single function apparently has to return a uint explicitly, no matter how useless | |
} | |
class Matrix4f | |
{ | |
public: | |
// Editor's note: Yes, this matrix class contains two *completely different* representations of the same data | |
// Some methods use one, and some use the other. Completely inscrutable. Neither of these can actually be *given* | |
// to the OpenGL API directly, which expects a flat array. | |
float *m[4]; // can be removed (Editor's note: cannot actually be removed) | |
Vector4f vm[4]; | |
// ... methods and stuff | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment