Andy Shein (ashein++at++orac.boston.sgi.com)
Mon, 10 Aug 1998 04:50:10 -0700
Try PFQHIT_FLAGS, from the man page
PFQHIT_FLAGS returns a bit vector indicating the validity of information
in the structure. It is formed by a bitwise OR-ing of the PFHIT_POINT,
PFHIT_NORM, PFHIT_PRIM, PFHIT_TRI, PFHIT_VERTS and PFHIT_XFORM symbols.
you can also taka look at the code in
/usr/share/Performer/src/lib/libpfui/pfiPick.C
and
/usr/share/Perfomer/src/lib/libpfutil/collide.c
/* See if we collided with object. */
if (isect > 0)
{
uint query[] = { PFQHIT_FLAGS, PFQHIT_POINT, PFQHIT_NORM, NULL };
struct
{
int flags;
pfVec3 point;
pfVec3 normal;
} result;
pfMatrix xform;
pfMQueryHit(hits[0][0], query, &result);
if ((result.flags & PFHIT_POINT) && (result.flags & PFHIT_NORM))
{
if (result.flags & PFHIT_XFORM)
{
pfQueryHit(hits[0][0], PFQHIT_XFORM, &xform);
pfXformPt3(result.point, result.point, xform);
pfXformVec3(result.normal, result.normal, xform);
pfNormalizeVec3(result.normal);
}
Also have you set the pfSegSet.mode to have
PFTRAV_IS_PATH or'ed in ?
Andy
--
Andrew Shein SE Stout email: ashein++at++boston.sgi.com
Silicon Graphics Inc. phone: (978) 562 - 4800
1 Cabot Road fax: (978) 562 - 4755
Hudson, MA 01749 vmail: 59688
=======================================================================
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 Tue Aug 11 1998 - 13:42:35 PDT