line ending cleanups, and define some more math stuff

This commit is contained in:
Scott Brooks 2009-07-04 03:37:44 +00:00
parent 0046a49560
commit 4a16c915d1
2 changed files with 448 additions and 409 deletions

View file

@ -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]);
}