From: 'Bwana' Bob Buckley (Bob.Buckley++at++JNTF.osd.mil)
Date: 11/20/2000 11:53:38
Dude!
Angus Dorbie wrote:
>
> Did you set the right querry information on the way in and then querry
> hit for the right stuff afterwards?
>
I place a unit cube at 5m from the origin on the y axis. I then rotate
it around the origin in the xy plane at that 5m radius. Using a single
seg pointing down the y axis I do get a proper intersect. However, when
zeroing out the active mask and enabling the cylinder volume I get no
intersects. The cylinder sits exactly on the cubes path at 5m. I place a
callback on the scene and it does get called as expected, but apparently
the intersect fails and the traversal is truncated at that point. It
properly traverses when using that single seg and I test using
breakpoints in the callbacks of child nodes.
Here's the setup:
pfClyinder cylinder;
cylinder.center.set(0.0f, 5.0f, 0.0f);
cylinder.axis.set (0.0f, 1.0f, 0.0f);
cylinder.radius = 1.0f;
cylinder.halfLength = 1.0f;
pfSegSet segSet;
//segSet.activeMask = 0x01;
segSet.activeMask = 0x0;
segSet.isectMask = 0xffffffff;
segSet.userData = NULL;
segSet.discFunc = NULL;
//segSet.bound = NULL;
segSet.bound = (void *) &cylinder;
//segSet.mode = PFTRAV_IS_PRIM | PFTRAV_IS_NORM |
PFTRAV_IS_CULL_BACK | PFTRAV_IS_IS_BCYL;
segSet.mode = PFTRAV_IS_GEODE | PFTRAV_IS_GSET |
PFTRAV_IS_IS_BCYL;
segSet.segs[0].dir.set(0.0f, 1.0f, 0.0f);
segSet.segs[0].pos.set(0.0f, 0.0f, 0.0f);
segSet.segs[0].length = 1000.0f;
Within the main sim loop I have:
pfHit **hits[32];
int numHits = scene->isect(&segSet, hits);
>
> What happens then if you querry down to the tri information? Do you get
> the bounds hit info?
>
It never traverses beyond the scene using strictly the volume test.
>
> You aren't expecting *coordinate* information for the bounds hit querry
> are you?
>
Right now I'm just trying to get a non-zero hit count on the isect using
volumes. Actually, just trying to get it to traverse beyond the scene
node.
>
> P.S. if I told you the Performer handshake it wouldn't be a secret.
>
:)
>
> Cheers,Angus.
>
> 'Bwana' Bob Buckley wrote:
> >
> > I've been trying to implement a pfNode isect call using strictly
> > bounding volume to bounding volume tests. There have been two threads in
> > the past two years on this with no answers. I have a test case put
> > together that puts a cube out there and runs an isect using strictly a
> > cylinder test as mentioned in the man pages and in the insight book. No
> > intersects are successful. Is anyone aware that this feature is either
> > implemented or not? Is there some secret handshake to get it to work
> > properly?
> >
> > Thanks.
>
> --
> For Performer+OpenGL tutorials http://www.dorbie.com/
>
> "In the middle of difficulty lies opportunity."
> --Albert Einstein
This archive was generated by hypermail 2b29 : Mon Nov 20 2000 - 11:53:50 PST