isect test against bounding volume

New Message Reply Date view Thread view Subject view Author view

Gene Koh (gene++at++euphoria.corp.sgi.com)
Tue, 23 Jul 1996 16:33:30 -0700


Hi,

Has anyone tried to set up intersection testing using no line segments, but
only a bounding cylinder? I have students who are interested in a very rough
isect test, but I can't seem to get it to work.

I set up my seg set as follows:

        pShared->segSet.discFunc = isectDisc;
        pShared->segSet.activeMask = 0;
        pShared->segSet.isectMask = 0x1;
        pShared->segSet.mode = PFTRAV_IS_GEODE | PFTRAV_IS_BCYL;

        pCyl = (pfCylinder *)pfMalloc(sizeof(pfCylinder), arena);
        pCyl->radius = 5.0;
        pCyl->halfLength = 60.0;
        pfSetVec3(pCyl->axis, 0, 0, 1);
        pfSetVec3(pCyl->center, 0, 0, 0);
        pShared->segSet.bound = pCyl;

According to the Programming Guide, my discriminator function should get called
when it intersects with something, but it never does. Later, when I added one
line segment pointing in the same direction, I got some intersections.

I have a feeling the problem is that my activeMask = 0. Can anyone confirm
this? Thanks.

-- 
gene koh		gene++at++corp.sgi.com		415.933.4230

simplicity patience compassion ======================================================================= 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:53:13 PDT

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