David Megginson <[EMAIL PROTECTED]> said:
> Jim Wilson writes:
>
> > Anyone else noticing that the model alignment offsets aren't working?
>
> Which ones?
David,
Here's a patch to fix the offsets bug. The problem was the transform was just
getting added to a local instance rather than being returned by the function.
Best,
Jim
Index: src/Model/model.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Model/model.cxx,v
retrieving revision 1.7
diff -u -r1.7 model.cxx
--- src/Model/model.cxx 13 Nov 2002 16:45:21 -0000 1.7
+++ src/Model/model.cxx 15 Nov 2002 01:47:43 -0000
@@ -283,8 +283,8 @@
}
// Set up the alignment node
- ssgTransform * align = new ssgTransform;
- align->addKid(model);
+ ssgTransform * alignmainmodel = new ssgTransform;
+ alignmainmodel->addKid(model);
sgMat4 res_matrix;
make_offsets_matrix(&res_matrix,
props.getFloatValue("/offsets/heading-deg", 0.0),
@@ -293,7 +293,7 @@
props.getFloatValue("/offsets/x-m", 0.0),
props.getFloatValue("/offsets/y-m", 0.0),
props.getFloatValue("/offsets/z-m", 0.0));
- align->setTransform(res_matrix);
+ alignmainmodel->setTransform(res_matrix);
// Load panels
unsigned int i;
@@ -335,7 +335,7 @@
model->addKid(align);
}
- return model;
+ return alignmainmodel;
}
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel