Re: Intersection testing

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 02/20/2001 14:56:48


Angus Dorbie wrote:
>
> You need a callback because that's where you can see each intersection
> as they happen DURING the traversal.
>
> On the dimensionality of the hits structure, let's see.....
>
> Hits are assigned from a pool allocated by the isect routine. The
> question is why the array of pointers to pointers, instead of just an
> array of pointers.
>
> To get a pfHit* the man page suggests addressing this like:
>
> hits[i][0]
>
> To get a pfHit* the examples addresses this like:
>
> *hits[0]

Just realized that even this is a bit misleading since the example
allocates an array of 32 then addresses only the first. If you look at
the UAV code as described on dorbie.com the ortho channel bounds are
obtained by looking at a multi-segs isect result I read the array with
this:

(*(hits[i]))

Note my paranoia about precedence in this nasty situation. The result of
this is a pfHit * but if you decide to look at the code I have spotted
that I set bounds initially using segment 0 and assume the result is
good which is potentially erroneous.

Cheers,Angus.

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Feb 20 2001 - 14:57:17 PST

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