-
Notifications
You must be signed in to change notification settings - Fork 1
/
matrix.h
38 lines (30 loc) · 899 Bytes
/
matrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MATRIX_H
#define MATRIX_H
class QMatrix4x4;
/**
* Provides 4x4 matrix operations.
*
* Currently a wrapper for a Qt class, but would need to be filled out with
* other implementions for portability.
*/
class Matrix
{
private:
/** Current implementation object */
QMatrix4x4 *implObj;
public:
Matrix();
/** Set this matrix object to the identity object */
void setToIdentity();
/** Create a matrix based on the provided perspective values. */
void perspective(float vAngle, float aspectRatio, float near, float far);
/** Apply translate to matrix. */
void translate(float x, float y, float z);
/** Apply rotation to matrix. */
void rotate(float angle, float x, float y, float z);
/** Apply scale to matrix. */
void scale(float x, float y, float z);
/** Get data as an array */
const float *data();
};
#endif // MATRIX_H