Andy Ross writes:
>
>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.
you could do this with three calls to the existing function
call 1 use p1
call 2 use p2
call 3 use p2 for scenery_center below to return intersections
along the path between p1 and p2
Also the hooks are there for you todo just about anything you want
get the actual triangle intersected and/or the 'parent SSG group'
get_face(i_in_hitlist)
get_entity(i_in_hitlist)
fgCurrentElev( sgdVec3 abs_view_pos, sgdVec3 scenery_center,
ssgTransform *terra_transform,
FGHitList *hit_list,
double *terrain_elev, double *radius, double *normal)
as the Nike add says -- just go for it
Norman
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel