pfDoubleDCS picking/intersects

New Message Reply Date view Thread view Subject view Author view

From: Patrick J Melody (melody++at++cmf.nrl.navy.mil)
Date: 12/20/2000 10:29:59


I just started working with Performer 2.4, and have been awaiting the
pfDoubleSCS/DCS/FCS nodes. I have installed them in my program and they
work great solving my jumpy movement problems. Unfortunately intersecting
doesn't seem to be implemented for them. Can this be fixed? If it cant
be i will have to live with the jitter or hack custom intersection code,
its not clear to me at this point which option is worse.

As a test case I modified
/usr/share/Performer/src/pguide/libpf/C/intersect.c
to use double precision. I changed the pfSCSs in the program to
pfDoubleSCSs and got an assertion violation, basically telling me
that pfDoubleSCSs don't support intersections. So i made them
pfDoubleDCSs, and now the program never detects intersections, it
always returns a "no intersect happened" value. My modified intersect.c
can be found at <http://www.nrl.navy.mil/CCS/people/melody/intersect.c>.
The diff is:

47,48d46
< /* /usr/share/Performer/src/pguide/libpf/C/intersect.c */
< /* modified to use pfDoubleDCS instead of pfSCS */
115c113
< pfDoubleDCS *scs[10];

---
>       pfSCS           *scs[10];
117c115
<       pfMatrix4d      mat;
---
>       pfMatrix        mat;
178,180c176,177
<               pfMakeTransMat4d(mat, 0.0, (double) loop * 10.0 + 10.0, 0.0);
<               scs[loop] = pfNewDoubleDCS();
<               pfDoubleDCSMat(scs[loop], mat);
---
>               pfMakeTransMat(mat, 0.0f, (float) loop * 10.0f + 10.0f, 0.0f);
>               scs[loop] = pfNewSCS(mat);
249,250c246
<               } else
<                       printf("ISECT = %d\n", isect);
---
>               }
300a297
>                   int rv;
302,303c299
< 
<                   XLookupString(&event.xkey, buf, sizeof(buf), &ks, 0);
---
>                   rv = XLookupString(&event.xkey, buf, sizeof(buf), &ks, 0);

- Patrick Melody


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Dec 20 2000 - 10:30:04 PST

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