From: Roger Edberg (edberg++at++mailhost.arsc.edu)
Date: 04/16/2003 18:31:02
Calling the function:
pfGeoSet* dummyGeoSet(const int n)
{
pfVec3 *v = (pfVec3*) pfMalloc(n*sizeof(pfVec3), pfGetSharedArena());
for (int i=0; i<n; i++) { v[i].set(0.1f*i, 0.1f*i, 0.1f*i); }
pfGeoSet *g = new pfGeoSet;
g->setPrimType(PFGS_POINTS);
g->setNumPrims(n);
g->setPntSize(1.5);
g->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, v, NULL);
int np = g->getNumPrims();
float ptsz = g->getPntSize();
cerr << "dummyGeoSet: numprims = " << np << ", expected " << n << endl;
cerr << "dummyGeoSet: pntsize = " << ptsz << ", expected 1.5" << endl;
return g;
}
in my Performer app (with arg n=100) produces the output:
dummyGeoSet: numprims = 32, expected 100
dummyGeoSet: pntsize = 1.5, expected 1.5
What am I missing? Calling g->getNumPrims() immediately after
setNumPrims() gives the same result.
Thanks,
Roger (edberg++at++arsc.edu)
This archive was generated by hypermail 2b29 : Wed Apr 16 2003 - 18:32:39 PDT