Andy Ross writes:
> 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.

And occasionally they are a more complex linkage and can follow funky
curves (or in the case of spring gear also follow a less than straight
path.)

> 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.

It shouldn't be too hard to test that the resulting contact point is
between p1 and p2 ...

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

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

Reply via email to