|
|
"[GDS|Entropy]" <gds### [at] hotmailcom> wrote:
> "clipka" <nomail@nomail> wrote in message
> > trace() a ray from each point to the object's bounding box center.
>
> Ok, so a macro fills an array once with random positions on a sphere, then
> uses that array in a looped call to trace.
Or you could just do it on the fly.
> I thought trace() accepted only a point and an object? It can accept two
> points?
Trace takes an object id, a start point, a direction, and (optionally) a
previously-#declared vector in which it stores the surface normal at the point
found.
> > If you get an intersection point, test whether it is inside the other
> > object B.
>
> I'm a little fuzzy here...
> Assuming I had you right in my sentence above, what result from that trace
> would go within the #if block that would initiate the call to
> inside(myPoint,objectB)?
The aforementioned normal vector is set to <0,0,0> if the trace fails to hit
anything. Test the length of this vector using vlength().
Bill
Post a reply to this message
|
|