[info-performer] Finding a Point On The Line Your Channel Is Looking Down

Date view Thread view Subject view Author view

From: Christopher D. Johnson (cubicwts++at++excite.com)
Date: 01/24/2006 08:04:30


Greetings all. I have been doing intersection testing via the calls that follow:

pfNodeIsectSegs(terrain, &segset, hits)
pfQueryHit(*lt_hits[0], PFQHIT_POINT, &lt_pnt);
pfQueryHit(*lt_hits[0], PFQHIT_XFORM, lt_xmat);
pfXformPt3(desg_pnt, lt_pnt,lt_xmat);
aim[0] = desg_pnt[0];
aim[1] = desg_pnt[1];
aim[2] = desg_pnt[2];

The my x,y, and z coordinate in model space is stored in the aim array as you can see. This in effect gives me a point on the line that starts in the middle of my channel and extend out in the direction I am looking. This works fine when I am actually looking at terrain. However, I would like to come up with the aim point even if I am looking at the "sky" in my world, and of course there is not going to be an intersection returned when I am looking towards the sky. Is there a way to get a point (x,y,z) on this line built into Performer? If not, what exactly will I need to generate a point on this line so that even if I am looking at the sky I can get a valid aim point? When looking at the sky any point on the line in the direction my channel is looking will do. Thank you.

Christopher D. Johnson
AV-8B Harrier II Simulators
ISEO Support Team
Cherry Point, NC
252-466-4542
252-466-4538

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 24 2006 - 08:04:35 PST