]> git.mxchange.org Git - simgear.git/commitdiff
Makes more sense to process the orientation in this order.
authorfrohlich <frohlich>
Tue, 24 Mar 2009 09:09:00 +0000 (09:09 +0000)
committerTim Moore <timoore@redhat.com>
Mon, 30 Mar 2009 16:42:45 +0000 (18:42 +0200)
Modified Files:
simgear/scene/model/placement.cxx

simgear/scene/model/placement.cxx

index 2a3f0d4357ae58e6539b8d3ce363e4ce445f4540..9da016ef89b13020fafda51a5fc0cfbf95a4fdaf 100644 (file)
@@ -53,8 +53,11 @@ SGModelPlacement::update()
   // The orientation, composed from the horizontal local orientation and the
   // orientation wrt the horizontal local frame
   SGQuatd orient = SGQuatd::fromLonLat(_position);
+  orient *= SGQuatd::fromYawPitchRollDeg(_heading_deg, _pitch_deg, _roll_deg);
+  // Convert to the scenegraph orientation where we just rotate around
+  // the y axis 180 degrees.
   orient *= SGQuatd::fromRealImag(0, SGVec3d(0, 1, 0));
-  orient *= SGQuatd::fromYawPitchRollDeg(-_heading_deg, _pitch_deg, -_roll_deg);
+
   _transform->setTransform(position, orient);
 }