Randy Stiles (stiles++at++aic.lockheed.com)
Sat, 30 Mar 1996 16:46:34 -0800
In your intersect query, also ask for the path of the intersection
(PFQHIT_PATH), which is also a pfList. Start at the end of the
path (the intersected node) and work back till you get to
a node which pfIsOfType for DCS. That will probably be what
you want. This is better than just getting parents, because
a node may have more than one parent, and you don't know
which one is appropriate unless you have path info.
-Randy
Fred Dech wrote:
>
> hi.
>
> i'm trying to get a pointer to a DCS who's child node has been collided
> with. i intersect the geometry and collect the results in a pfHit. that
> part seems to be working correctly. when i'm interesecting an object in
> the application, and i test against the scene graph, scene->isect() returns
> 1 and when i'm not interesting anything scene->isect() returns zero.
>
> i can't figure out how to get at the DCS of the object i've hit.
> neither PFQHIT_GSET nor PFQHIT_NODE queries seem to get me access
> to what i'm looking for. i've tried various member functions on the
> resulting pfGeode (e.g., getName(), getParent(), getNumParent()), but
> i'm ivariably getting NULLs and 0s. i shouldn't be getting NULLs for
> nodes that i've named and 0s for getParent(), should i?
>
> what might i be doing wrong?
-- // Randy Stiles stiles++at++aic.lockheed.com Orgn 9620 Bldg 255 // Lockheed Martin Advanced Technology Center 3251 Hanover Street // office: 415.354.5256 fax: 415.354.5235 Palo Alto, CA 94304-1192 // http://vet.parl.com/~vet/people/stiles/
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:36 PDT