Re: pfSphereIsectSeg question

New Message Reply Date view Thread view Subject view Author view

Kowsik Guruswamy (kowsik++at++coryphaeus.com)
Tue, 13 Aug 1996 15:07:02 -0700


On Aug 13, 2:15pm, Catherine E. Blanco wrote:
> Subject: pfSphereIsectSeg question
> I've been reading the man page for this function (which apparently
> appeared in Performer 2.0), and I can't understand what the return
> values mean. Just what are d1 and d2? I was hoping this function
> would return intersection points (pfVec3), but d1 and d2 appear to
> be scalars, and I don't know what they represent. Thanks...

>From the man pages:

     If d1 and d2 are non-NULL, on return from pfSphereIsectSeg they contain
     the starting and ending positions of the line segment (0 <= d1 <= d2 <=
     seg->length) intersected with the sphere.

You should be able to get the actual points on the sphere using the seg.dir

  pfVec3 p1, p2;

  p1.addScaled (seg.pos, d1, seg.dir);
  p2.addScaled (seg.pos, d2, seg.dir);

Hope that helps,

K.

-- 
kowsik++at++coryphaeus.com     | pirts suiboM a hguorht neeb sah txet sihT
http://www.coryphaeus.com |
                          | You are not you, you are me! - arnie
work: (408)-395-4537 e210 |

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


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:53:21 PDT

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