mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 07:11:36 +00:00
line ending cleanups, and define some more math stuff
This commit is contained in:
parent
0046a49560
commit
4a16c915d1
2 changed files with 448 additions and 409 deletions
|
@ -1599,3 +1599,42 @@ void ToAxisAngles(vec3_t in, vec3_t out)
|
|||
|
||||
VectorCopy(result, out);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
RotatePoint
|
||||
================
|
||||
*/
|
||||
static void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // FIXME
|
||||
vec3_t tvec;
|
||||
|
||||
VectorCopy(point, tvec);
|
||||
point[0] = DotProduct(matrix[0], tvec);
|
||||
point[1] = DotProduct(matrix[1], tvec);
|
||||
point[2] = DotProduct(matrix[2], tvec);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
TransposeMatrix
|
||||
================
|
||||
*/
|
||||
static void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { // FIXME
|
||||
int i, j;
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
transpose[i][j] = matrix[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CreateRotationMatrix
|
||||
================
|
||||
*/
|
||||
static void CreateRotationMatrix(const vec3_t angles, vec3_t matrix[3]) {
|
||||
AngleVectors(angles, matrix[0], matrix[1], matrix[2]);
|
||||
VectorInverse(matrix[1]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue