Re: Intersection

New Message Reply Date view Thread view Subject view Author view

Lance R. Marrou (marrou++at++vsl.ist.ucf.edu)
Fri, 10 Feb 1995 11:33:20 -0500 (EST)


On Fri, 10 Feb 1995, Marco Crocetta wrote:

...
> pfQueryHit (*hits[0], PFQHIT_SEG, &segset.segs[0].length);
> pfQueryHit (*hits[0], PFQHIT_POINT, &pnt);
...
> These are the questions:
>
> 1) In the pnt vector I find the intersection point coords
> referred to the model origin ?
> (is this what the ref manual means when it says "...all are in
> local coordinates..."?)

To get the world coordinate point, you also need:
   pfMatrix mat;
   pfQueryHit (*hits[0], PFQHIT_XFORM, mat);
   pfXformPt3(dst, pnt, mat);

Also, if pnt is a pfVec3, you do not want to send the address.

> 2) Which distance is stored in the lenght field of the
> segset structure?i Which is the relationship between
> this value, the intersected point, the model origin, and
> the eyepoint origin?

Well, one problem is that you are sending in the address of the length,
rather than the address of the segment. PFQHIT_SEG expects the whole
segment. The length in the segment should be what you desire.

> 3) How can I find in a straight manner the true distance
> of the intersected point from my eyepoint?

Either the length of the segment, or you can find the distance between your
view point and the transformed intersection point.

______________________________________________________________________________
           /\ ______ /\____ ______ ______ E-mail: marrou++at++vsl.ist.ucf.edu
Visual / / / _ / / __ // ____// ____/ VSL: (407)658-5073
Systems / /__ / /_/ / / / / // /___ / __/_ R. Marrou Fax: (407)658-5059
Lab /____//____/\\/_/ /_//_____//_____/ http://www.vsl.ist.ucf.edu/~marrou
"Reap the whirlwind." "We don't need no thought control."


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:57 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.