pfuCollideObj

New Message Reply Date view Thread view Subject view Author view

Hilko Hoffmann (hilko++at++rsl.geogr.unizh.ch)
Tue, 13 Feb 1996 16:50:28 +0100


Performers,

I want to use pfuCollideObj to detect if the current position is under a
simple polygon. The idea is to fired a ray upwards. See the follwing code
fragment:

    static void *sharedArena = NULL;
    pfSeg *upray;

    if (sharedArena == NULL)
        sharedArena = pfGetSharedArena();

    /* Set upray's specifications */
    upray = (pfSeg*) pfMalloc(sizeof(pfSeg), sharedArena);
    pfMakePolarSeg(upray, ViewState->viewCoord.xyz, 0.0, 90.0, 3000.0);

    /* Determine if intersection with polygons has occured */
    if (pfuCollideObj(upray, regFog[0].fnode, hit, norm))
                printf("--%f %f %f\n", hit[0], hit[1], hit[2]);

regFog[0].fnode contains polygon's node. I tested a version with

     if (pfuCollideGrnd(&ViewState->viewCoord, regFog[0].fnode, hit))

to be sure that regFog[0].fnode really contains the right node and it works!

Does anybody know why pfuCollideObj doesn't work?

Regards,

Hilko

-- 
Hilko Hoffmann                        hilko++at++rsl.geogr.unizh.ch

Phone: +41 - 1 / 257 51 63 Remote Sensing Laboratories FAX: +41 - 1 / 362 52 27 University of Zurich Winterthurerstrasse 190 CH-8057 Zurich; Switzerland


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:24 PDT

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