Home | History | Annotate | Download | only in Intersection

Lines Matching full:matrix

89 static bool rotateToAxis(const _Point& a, const _Point& b, Matrix3x2& matrix) {
97 matrix[0][0] = dx * invLength;
98 matrix[1][0] = dy * invLength;
99 matrix[2][0] = 0;
100 matrix[0][1] = -dy * invLength;
101 matrix[1][1] = dx * invLength;
102 matrix[2][1] = 0;
106 static void transform(const Cubic& cubic, const Matrix3x2& matrix, Cubic& rotPath) {
108 rotPath[index].x = cubic[index].x * matrix[0][0]
109 + cubic[index].y * matrix[1][0] + matrix[2][0];
110 rotPath[index].y = cubic[index].x * matrix[0][1]
111 + cubic[index].y * matrix[1][1] + matrix[2][1];
139 Matrix3x2 matrix;
140 if (!rotateToAxis(cubic[outer], cubic[inner], matrix)) {
144 transform(cubic, matrix, rotPath);