intersection testing and pfTerrain

New Message Reply Date view Thread view Subject view Author view

Edward Peters (elpeters++at++ncsa.uiuc.edu)
Fri, 17 Jan 1997 15:52:25 -0600


I have a Geode which is a morphset of a pfTerrain node. I set up a segset and
hits as follows:

   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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:22 PDT

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