You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
467 B
31 lines
467 B
#ifndef __QUATERNION_H
|
|
#define __QUATERNION_H
|
|
|
|
#include <iostream>
|
|
#include <cmath>
|
|
#include <SDL_opengl.h>
|
|
|
|
#include "emath.h"
|
|
|
|
class Quaternion {
|
|
private:
|
|
float w;
|
|
float x,y,z;
|
|
public:
|
|
Quaternion();
|
|
void createFromRotation(float, float, float, float);
|
|
|
|
|
|
void createGlMatrix(GLfloat*);
|
|
Punkt3D getDirectionVector();
|
|
Punkt3D getDirectionVector(GLfloat*);
|
|
|
|
Quaternion operator*(const Quaternion&);
|
|
|
|
|
|
};
|
|
|
|
void glMultMatrixf(Quaternion);
|
|
|
|
#endif
|