Re: pfCylAroundSegs API

New Message Reply Date view Thread view Subject view Author view

Jim Helman (jimh++at++surreal)
Thu, 22 Dec 94 12:07:44 -0800


Like the rest of the math functions which take a group of input
structures (e.g. boxes, spheres, etc.), pfCylAroundSegs takes an array
of pointers to segments rather than an array of segment structures.
The reason for this convention in the math API is to reduce the need
for copying dispersed structures into an array of structures just to
pass it to a math routine. In many cases, the time spent doing such a
copy would be comparable to or exceed the time spent in the routine
itself.

This passing convention is usually faster and at worst requires a
pointer copy per input structure.

The latter is the case with a pfSegSet, so you must do something like:

        pfSeg *segp[32];
        for (i = 0 ; i < nSeg ; i++)
                segp[i] = &segset.segs[i];
        pfCylAroundSegs(&cyl, segp, nSeg);

rgds,

-jim helman

jimh++at++surreal.asd.sgi.com
415/390-1151


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:50:45 PDT

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