@@ -135,28 +135,37 @@ vtkTransform* vtkTransformHelper::CreateTransform (const vtkTransformHelper::vtk
135135
136136 if (true == memento.isExtrinsic )
137137 {
138- if (false == memento.translationFirst )
138+ // Passage en mode PostMultiply pour le repère extrinsèque (global)
139+ transform->PostMultiply ( );
140+
141+ // Application des transformations dans l'ordre exact de l'énoncé
142+ if (true == memento.translationFirst )
139143 transform->Translate (memento.dx , memento.dy , memento.dz );
140- transform-> RotateY (memento. xoz );
141- transform-> RotateX (memento. yoz );
144+
145+ // Rotations autour de Oz, puis Oz, puis Oy :
142146 transform->RotateZ (memento.xoy );
143- if (true == memento.translationFirst )
147+ transform->RotateX (memento.yoz );
148+ transform->RotateY (memento.xoz );
149+
150+ if (false == memento.translationFirst )
144151 transform->Translate (memento.dx , memento.dy , memento.dz );
145152 } // if (true == memento.isExtrinsic)
146153 else
147154 {
155+ // Passage en mode PreMultiply pour le repère intrinsèque (local)
156+ transform->PreMultiply ( );
157+
158+ // Application des transformations dans l'ordre exact de l'énoncé
148159 if (true == memento.translationFirst )
149160 transform->Translate (memento.dx , memento.dy , memento.dz );
150- // RotateY(phi) → RotateZ(theta) → RotateX(omega) : chaque rotation s’applique dans le repère local courant,
151- // méthode standard pour les angles de Tait-Bryan intrinsèques (ZYX) en robotique/aéronautique. Dixit mistral.ai.
152- // Pour ce il faut inverser l'ordre des rotations par rapport à la même transformation mais à repère constant
153- // (transformation extrinsèque).
154- transform->RotateX (memento.yoz );
155- transform->RotateZ (memento.xoy );
161+
162+ // Rotations autour de Oy, puis Oz, puis Ox :
156163 transform->RotateY (memento.xoz );
164+ transform->RotateZ (memento.xoy );
165+ transform->RotateX (memento.yoz );
166+
157167 if (false == memento.translationFirst )
158168 transform->Translate (memento.dx , memento.dy , memento.dz );
159- transform->PostMultiply ( );
160169 } // else if (true == memento.isExtrinsic)
161170
162171 return transform;
0 commit comments