intersection traversal and pfPaths

New Message Reply Date view Thread view Subject view Author view

Uwe Pachler (pachler++at++marvin.gup.uni-linz.ac.at)
Thu, 16 Apr 1998 20:26:28 +0200 (CEST)


Hi Folks!

What I need from my intersection traversal is not only the node where the
intersection occurred, but also the intersection path. Nothing more easy
than that, I thought, took a look into the manual, and then used
pfQueryHit(hits[0][0], PFQHIT_PATH, &path);
But I only got an empty path, although the intersection occured and the
node is deeply buried in the scene graph (and I start intersecting at the
scene root).
Here's what I do (the code prints <some> debug info ;-):

        pfHit** hits[1];
        pfSegSet iSegs;
        iSegs.mode = PFTRAV_IS_GSET;
        pfCopyVec3(iSegs.segs[0].pos, handPosition->pos);
        pfCopyVec3(iSegs.segs[0].dir, handPosition->dir);
        iSegs.segs[0].length = handPosition->length;
        iSegs.userData = NULL;
        iSegs.activeMask = 0x01;
        iSegs.isectMask = VRCONTROLABLE_ISECT_MASK;
        iSegs.bound = NULL;
        iSegs.discFunc = NULL;

        if (pfNodeIsectSegs(root, &iSegs, hits) != 0)
                {
                pfPath* path;

                pfQueryHit(hits[0][0], PFQHIT_PATH, &path);

                // this returns zero; and therefore the path seems to be
                //empty...
                int pathLength = pfGetNum(path);
                   

                pfNode* hitNode;
                 
                // returns a valid hitNode
                pfQueryHit(hits[0][0], PFQHIT_NODE, &hitNode);
                }

Maybe someone has some hints for me ;-). Thanx in advance,

        Uwe Pachler

=======================================================================
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:57:15 PDT

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