Norman Vine wrote:
 > Who better then the FDM to know the offsets of the points to test
 > for contact.  It certainly shouldn't be anything in the Scenery
 > Module !!

Of course not.  You would be told the points to test by the FDM.

The problem is that the gear aren't simple points; they can compress,
and thus are geometrically line segments.  The FDM knows that the gear
tip can be anywhere between one point (full extension) and another
(full compression), but needs to know where so it can calculate the
spring force along the strut.  The scenery manager is the only code
that knows what the ground looks like, so it has to figure this out.

So, what I'd like to see is an interface that looks like:

// Calculates and returns a point of scenery intersection that lies on
// the line segment between p1 and p2.  If the line segment intersects
// the scenery more than once, then the point closest to p1 is chosen.
// All coordinates are in global cartesian.
sgdVec3 fgGetSceneryIntersection(sgdVec3 p1, sgdVec3 p2,
                                  sgdVec3* normalOut);

... or something equivalent.  Actually, there needs to be a way to
disambiguate the case where p1 is actually below ground, too.

Andy

-- 
Andrew J. Ross                NextBus Information Systems
Senior Software Engineer      Emeryville, CA
[EMAIL PROTECTED]              http://www.nextbus.com
"Men go crazy in conflagrations.  They only get better one by one."
  - Sting (misquoted)


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to