mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[util] Clarify the comment for AngleVectors
I found it rather confusing that the matrices were all backwards, and the existing comments about being "horizontal" didn't really help all that much. After spending some time with maxima, I was able to verify that the comments were indeed correct, just transposed (horizontal), with the final composition reversed to reflect that transposition.
This commit is contained in:
parent
f3ca2f158b
commit
e00a871824
1 changed files with 4 additions and 3 deletions
|
@ -513,9 +513,8 @@ BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const plane_t *p)
|
|||
forward is local X and right is local Y (left handed), or forward is local
|
||||
Y and right is local X (right handed).
|
||||
|
||||
NOTE: these matrices have forward, left and up vectors horizontal rather
|
||||
than vertical and are thus the inverse of the matrices to produce the
|
||||
actual rotation.
|
||||
NOTE: the matrices in this coment are transposed so the vector names
|
||||
can be written naturally.
|
||||
|
||||
pitch =
|
||||
cp 0 -sp
|
||||
|
@ -532,6 +531,8 @@ BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const plane_t *p)
|
|||
0 cr sr
|
||||
0 -sr cr
|
||||
|
||||
// NOTE: as these matrices are transposed, this is the reverse of the
|
||||
// actual operation
|
||||
final = roll * (pitch * yaw)
|
||||
final =
|
||||
[forward]
|
||||
|
|
Loading…
Reference in a new issue