| Operatoren |
hom_mat3d_rotate_local — Fügt eine Rotation zu einer homogenen 3D-Transformationsmatrix hinzu.
hom_mat3d_rotate_local( : : HomMat3D, Phi, Axis : HomMat3DRotate)
hom_mat3d_rotate_local fügt zur homogenen 3D-Transformationsmatrix HomMat3D eine Rotation um den Winkel Phi um die im Parameter Axis übergebene Achse hinzu. Die Achse kann dabei entweder durch die Strings 'x', 'y' oder 'z' oder als Vektor [x,y,z] in Form eines Tupels festgelegt werden.
Die Rotation wird beschrieben durch die 3×3 Rotationsmatrix R. Im Gegensatz zu hom_mat3d_rotate wird sie relativ zum lokalen Koordinatensystem, das durch HomMat3D beschrieben ist, ausgeführt; dies entspricht der folgenden Kette von Transformationsmatrizen:
Axis = 'x':
/ 0 \ / 1 0 0 \
HomMat3DRotate = HomMat3D * | Rx 0 | Rx = | 0 cos(Phi) -sin(Phi) |
| 0 | \ 0 sin(Phi) cos(Phi) /
\ 0 0 0 1 /
Axis = 'y':
/ 0 \ / cos(Phi) 0 sin(Phi) \
HomMat3DRotate = HomMat3D * | Ry 0 | Ry = | 0 1 0 |
| 0 | \ -sin(Phi) 0 cos(Phi) /
\ 0 0 0 1 /
Axis = 'z':
/ 0 \ / cos(Phi) -sin(Phi) 0 \
HomMat3DRotate = HomMat3D * | Rz 0 | Rz = | sin(Phi) cos(Phi) 0 |
| 0 | \ 0 0 1 /
\ 0 0 0 1 /
Axis = [x,y,z]:
/ 0 \
HomMat3DRotate = HomMat3D * | Ra 0 |
| 0 |
\ 0 0 0 1 /
T T
Ra = u*u + cos(Phi)*( I-u*u ) + sin(Phi)*S
Axis / x' \
u = -------- = | y' |
||Axis|| \ z' /
/ 1 0 0 \ / 0 -z' y' \
I = | 0 1 0 | S = | z' 0 -x' |
\ 0 0 1 / \ -y' x' 0 /
Der Fixpunkt der Rotation ist der Ursprung des lokalen Koordinatensystems, d.h. dieser Punkt bleibt unverändert, wenn man ihn mit HomMat3DRotate transformiert.
Homogene Transformationsmatrizen werden zeilenweise in Form eines Tupels abgespeichert; die letzte Zeile wird im Normalfall nicht gespeichert, da sie für alle affinen Transformationsmatrizen identisch ist. Zum Beispiel wird die Matrix
/ ra rb rc td \
| re rf rg th |
| ri rj rk tl |
\ 0 0 0 1 /
als das Tupel [ra, rb, rc, td, re, rf, rg, th, ri, rj, rk, tl] gespeichert. Es ist aber auch möglich, volle 4×4 Matrizen, die eine projektive 3D-Transformation darstellen können, zu verarbeiten.
Eingabe-Transformationsmatrix.
Rotationswinkel.
Defaultwert: 0.78
Wertevorschläge: 0.1, 0.2, 0.3, 0.4, 0.78, 1.57, 3.14
Typischer Wertebereich: 0 ≤ Phi ≤ 6.28318530718
Achse, um die gedreht wird.
Defaultwert: 'x'
Wertevorschläge: 'x', 'y', 'z'
Ausgabe-Transformationsmatrix.
Sind die Parameterwerte korrekt, dann liefert hom_mat3d_rotate_local den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
hom_mat3d_identity, hom_mat3d_translate_local, hom_mat3d_scale_local, hom_mat3d_rotate_local
hom_mat3d_translate_local, hom_mat3d_scale_local, hom_mat3d_rotate_local
hom_mat3d_invert, hom_mat3d_identity, hom_mat3d_rotate, pose_to_hom_mat3d, hom_mat3d_to_pose, hom_mat3d_compose
Foundation
| Operatoren |