pfQueryHit returns segment length as nan

New Message Reply Date view Thread view Subject view Author view

Tanner Lovelace (LOVELACE++at++dcscorp.com)
Fri, 17 Nov 1995 12:59:46 -0500


Greetings,

I'm trying to use pfSegsIsectNode() to simulate a laser range
finder and am running into a very interesting problem. In my
scene graph, I have a pointer to my terrain geometry, and then a list
of pointers to entity geometries. Because I need to be able to return
other information about an entity if it is intersected, I must intersect
the pointers individually, rathern than doing the entire scene graph.
When an intersection occurs with the terrain, everything is okay.
I can call pfQueryHit to return the segment as clipped and get the
range from that no problem. But, when I try to intersect an entity,
pfSegsIsectNode returns an intersection, but pfQueryHit returns
the segment length as nan7ffffe00. (The return value of pfQueryHit
is 28 for both terrain and entities.) Has anyone run into a similar
situation, and would know what could cause this.

My seg_set for the intersection is setup like this:

  // Set up segment to be tested against geometry
  seg_set.mode = PFTRAV_IS_PRIM|PFTRAV_IS_CULL_BACK;
  seg_set.userData = 0;
  seg_set.segs[0].length = FLT_MAX;
  seg_set.activeMask = 0x1;
  seg_set.isectMask = PFUCOLLIDE_MASK;
  seg_set.bound = 0;
  seg_set.discFunc = 0;

Thanks in advance.

Tanner Lovelace
DCS Corporation


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:52:03 PDT

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