59 FElements[0][0] = A00; FElements[0][1] = A01;
60 FElements[0][2] = A02; FElements[0][3] = A03;
62 FElements[1][0] = A10; FElements[1][1] = A11;
63 FElements[1][2] = A12; FElements[1][3] = A13;
65 FElements[2][0] = A20; FElements[2][1] = A21;
66 FElements[2][2] = A22; FElements[2][3] = A23;
68 FElements[3][0] = A30; FElements[3][1] = A31;
69 FElements[3][2] = A32; FElements[3][3] = A33;
77 FElements[0][0] = AVertex1.
getX();
78 FElements[0][1] = AVertex1.
getY();
79 FElements[0][2] = AVertex1.
getZ();
82 FElements[1][0] = AVertex2.
getX();
83 FElements[1][1] = AVertex2.
getY();
84 FElements[1][2] = AVertex2.
getZ();
87 FElements[2][0] = AVertex3.
getX();
88 FElements[2][1] = AVertex3.
getY();
89 FElements[2][2] = AVertex3.
getZ();
101 for (
int row=0; row<4; ++row)
102 for (
int col=0; col<4; ++col)
103 (*
this)[row][col] = 0;
109 for(
int row=0; row<4; ++row)
110 for(
int col=0; col<4; ++col)
111 (*
this)[row][col] = (row==col) ? 1 : 0;
118 if (&AMatrix !=
this)
120 for (
int row=0; row<4; ++row)
121 for (
int col=0; col<4; ++col)
122 (*
this)[row][col] = AMatrix[row][col];
131 assert(0 <= ARow && ARow <= 3);
142 for (
int row=0; row<4; ++row)
143 for (
int col=0; col<4; ++col)
144 for (
int k=0; k<4; ++k)
146 (*
this)[row][k] * AMatrix[k][col];
156 for (
int row=0; row<4; ++row)
157 for (
int col=0; col<4; ++col)
159 (*
this)[row][col] * AVector[col];
169 translationMatrix[0][3] = AVector.
getX();
170 translationMatrix[1][3] = AVector.
getY();
171 translationMatrix[2][3] = AVector.
getZ();
173 (*this) = translationMatrix * (*this);
180 assert(!AAxeDirection.
isNull());
197 rotationMatrix[0][0] = ux2 + ca*(1-ux2);
198 rotationMatrix[0][1] = ux*uy*(1-ca) - uz*sa;
199 rotationMatrix[0][2] = uz*ux*(1-ca) + uy*sa;
201 rotationMatrix[1][0] = ux*uy*(1-ca) + uz*sa;
202 rotationMatrix[1][1] = uy2 + ca*(1-uy2);
203 rotationMatrix[1][2] = uy*uz*(1-ca) - ux*sa;
205 rotationMatrix[2][0] = uz*ux*(1-ca) - uy*sa;
206 rotationMatrix[2][1] = uy*uz*(1-ca) + ux*sa;
207 rotationMatrix[2][2] = uz2 + ca*(1-uz2);
209 (*this) = rotationMatrix * (*this);
218 rotate(AAxeDirection, AAngle);
233 (*this) = rotationMatrix * (*this);
239 assert(!AAxeDirection.
isNull());
249 rotation180Matrix[0][0] = 2*ux*ux - 1;
250 rotation180Matrix[0][1] = 2*ux*uy;
251 rotation180Matrix[0][2] = 2*uz*ux;
253 rotation180Matrix[1][0] = 2*ux*uy;
254 rotation180Matrix[1][1] = 2*uy*uy - 1;
255 rotation180Matrix[1][2] = 2*uy*uz;
257 rotation180Matrix[2][0] = 2*uz*ux;
258 rotation180Matrix[2][1] = 2*uy*uz;
259 rotation180Matrix[2][2] = 2*uz*uz - 1;
261 (*this) = rotation180Matrix * (*this);
275 scaleMatrix[0][0] = ACoef.
getX();
276 scaleMatrix[1][1] = ACoef.
getY();
277 scaleMatrix[2][2] = ACoef.
getZ();
279 (*this) = scaleMatrix * (*this);
288 scaleMatrix.
scale(ACoef);
291 (*this) = scaleMatrix * (*this);
300 scaleMatrix.
scale(ACoef);
303 (*this) = scaleMatrix * (*this);
310 assert(!AAxeDirection.
isNull());
315 scaleMatrix.
orientate(AAxeDirection, axeNormal, OX, OZ);
317 scaleMatrix.
orientate(OX, OZ, AAxeDirection, axeNormal);
319 (*this) = scaleMatrix * (*this);
327 assert(!AAxeDirection.
isNull());
331 scaleMatrix.translate(-AAxeVertex);
332 scaleMatrix.axialScale(AAxeDirection, ACoef);
333 scaleMatrix.translate(+AAxeVertex);
335 (*this) = scaleMatrix * (*this);
342 assert(!APlaneNormal.
isNull());
347 scaleMatrix.
orientate(planeVector, APlaneNormal, OX, OZ);
349 scaleMatrix.
orientate(OX, OZ, planeVector, APlaneNormal);
351 (*this) = scaleMatrix * (*this);
359 assert(!APlaneNormal.
isNull());
363 scaleMatrix.translate(-APlaneVertex);
364 scaleMatrix.planarScale(APlaneNormal, ACoef);
365 scaleMatrix.translate(+APlaneVertex);
367 (*this) = scaleMatrix * (*this);
374 assert(!AVector1.
isNull());
375 assert(!AVector2.
isNull());
377 CVertex axe = AVector1*AVector2;
381 if (AVector1.
dot(AVector2) < 0)
406 assert(!AVectorU1.
isNull());
407 assert(!AVectorV1.
isNull());
422 orientationMatrix.applyOn(V1);
425 (*this) = orientationMatrix * (*this);
440 transformationMatrix.
translate(-AOrigin1);
441 transformationMatrix.
orientate(AVectorU1, AVectorV1, OZ,OX);
442 transformationMatrix.
scale(ACoef);
443 transformationMatrix.
orientate(OZ,OX, AVectorU2, AVectorV2);
444 transformationMatrix.
translate(+AOrigin2);
446 (*this) = transformationMatrix * (*this);
462 for (
int row=0; row<3; ++row)
463 for (
int col=0; col<4; ++col)
464 result[row] += (*
this)[row][col] * vertex[col];
466 AResult.
setXYZ(result[0], result[1], result[2]);
473 AStream << std::endl;
475 for (
int row=0; row<4; ++row)
479 for (
int col=0; col<4; ++col)
480 AStream << AMatrix[row][col] <<
"\t";
483 AStream <<
"]" << std::endl;