]> git.mxchange.org Git - flightgear.git/commitdiff
Fixes for better control over external aircraft 3d model control.
authorcurt <curt>
Tue, 14 Nov 2000 20:43:38 +0000 (20:43 +0000)
committercurt <curt>
Tue, 14 Nov 2000 20:43:38 +0000 (20:43 +0000)
src/Cockpit/panel_io.cxx
src/Main/main.cxx

index 38e1036138ad4db6cfcf7599aab26e0713fd18ec..f010f9b1620777f008bf4d87e22bdf1b8908da3c 100644 (file)
@@ -113,7 +113,7 @@ public:
 FGMagRibbon::FGMagRibbon (int w, int h)
   : FGTexturedLayer(w, h)
 {
-  FGCroppedTexture texture("Instruments/Default/Textures/compass-ribbon.rgb");
+  FGCroppedTexture texture("Aircraft/c172/Instruments/Textures/compass-ribbon.rgb");
   setTexture(texture);
 }
 
index edfe877151c8d3c5a4eafca0057633573f0811c7..54c42190eb7f96b8ccc0bb725b152dfc75f038a4 100644 (file)
@@ -1560,15 +1560,25 @@ int main( int argc, char **argv ) {
     // align the model properly for FGFS
     ssgTransform *tux_align = new ssgTransform;
     tux_align->addKid(tux_obj);
-    sgMat4 tux_matrix;
+    sgMat4 rot_matrix;
+    sgMat4 off_matrix;
+    sgMat4 res_matrix;
     float h_rot =
       current_properties.getFloatValue("/sim/model/h-rotation", 0.0);
-    /* float p_rot =
-      current_properties.getFloatValue("/sim/model/p-rotation", 0.0); */
+    float p_rot =
+      current_properties.getFloatValue("/sim/model/p-rotation", 0.0);
     float r_rot =
       current_properties.getFloatValue("/sim/model/r-rotation", 0.0);
-    sgMakeRotMat4(tux_matrix, h_rot, h_rot, r_rot);
-    tux_align->setTransform(tux_matrix);
+    float x_off =
+      current_properties.getFloatValue("/sim/model/x-offset", 0.0);
+    float y_off =
+      current_properties.getFloatValue("/sim/model/y-offset", 0.0);
+    float z_off =
+      current_properties.getFloatValue("/sim/model/z-offset", 0.0);
+    sgMakeRotMat4(rot_matrix, h_rot, p_rot, r_rot);
+    sgMakeTransMat4(off_matrix, x_off, y_off, z_off);
+    sgMultMat4(res_matrix, off_matrix, rot_matrix);
+    tux_align->setTransform(res_matrix);
 
     penguin_pos->addKid( tux_align );
     penguin_sel->addKid( penguin_pos );