#include "xform2d.h"
#include <math.h>
Go to the source code of this file.
void RotateMatrix | ( | MATRIX_2D_PTR | Matrix, | |
FLOAT32 | Angle | |||
) |
Rotate the coordinate system (as specified by Matrix) about its origin by Angle radians.
Matrix | Transformation matrix to rotate | |
Angle | Angle to rotate matrix |
Matrix = R X Matrix where R is the following matrix cos Angle sin Angle 0 -sin Angle cos Angle 0 0 0 1
Definition at line 51 of file xform2d.cpp.
Referenced by ComputeBulges().
00051 { 00052 FLOAT32 Cos, Sin; 00053 FLOAT32 NewA, NewB; 00054 00055 Cos = cos ((double) Angle); 00056 Sin = sin ((double) Angle); 00057 00058 NewA = Matrix->a * Cos + Matrix->c * Sin; 00059 NewB = Matrix->b * Cos + Matrix->d * Sin; 00060 Matrix->c = Matrix->a * -Sin + Matrix->c * Cos; 00061 Matrix->d = Matrix->b * -Sin + Matrix->d * Cos; 00062 Matrix->a = NewA; 00063 Matrix->b = NewB; 00064 00065 } /* RotateMatrix */