Edward Peters (elpeters++at++ncsa.uiuc.edu)
Fri, 17 Jan 1997 15:52:25 -0600
pfSegSet segset;
pfHit **hits[32];
segset.isectMask = 0x01;
segset.discFunc = NULL;
segset.bound = NULL;
segset.mode = PFTRAV_IS_PRIM;
segset.segs[0].pos.set ((float)x, (float)y, 500.0f);
segset.segs[0].dir.set (0.0f, 0.0f, -1.0f);
segset.segs[0].length = 1000;
segset.activeMask = 1;
Then I do the following (my geode is pfGeode *ground):
int isect = ground->isect(&segset, hits);
if (isect) {
// intersection, do something
}
else {
// you missed, do something else
}
It fails every time (ie no intersections). Earlier I had some code (almost
identical) which would fail sometimes, and work other times.
Does the app and cull processing of the pfTerrain node use intersection testing
to determine what's visible and what's not? If so, would it require a reset of
the TravMask every frame for other intersection testing to work? I ask because
part of the enigma seems to be where my intersections are placed relative to
the call to pfFrame().
Thanks in advance for your help.
Ed Peters
elpeters++at++ncsa.uiuc.edu
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:22 PDT