[vtkusers] vtkPointSpriteMapper details
harris.pc at gmail.com
harris.pc at gmail.com
Mon Jan 19 21:25:31 EST 2009
Hi again,
I'll just continue the email thread even though this is a slightly
different issue...
My situation is I have 1 cell and lots of points. That way I can keep
the Points array static and adjust the vertex cell array to change
what is shown. It works well.
Because I am using vertices, it uses the VerticesMacro(), which checks
the abort count like so:
abortcount = abortcheck
for ( all cells )
{
while ( do all points in cell )
{
do stuff
if (--abortcount == 0)
check abort
}
}
BUT, abortcheck is set like so:
int abortcheck = (RenderFlags & VTK_PSM_USE_POINTS) ?
numPoints/5000 : numCells/5000;
in my case, VTK_PSM_USE_POINTS is not set, so
abortcheck = numCells / 5000
in my case, numCells = 1, so abortcheck = 0
which means it'll first decrement abortcount to -1 and keep on going
down to -A_LOT. it'll never check for abort.
That is fine with me, I suppose. But what confuses me is why does the
abortcount check happen in the inner loop, instead of the outer cell
look (since abortcount's unit is # of cells) ?
One idea, perhaps we should calc a p_abortcheck and an c_abortcheck,
and check for abort in the both inner and outer loops...
let p_abortcheck=numPoints/5000 and c_abortcheck=numCells/5000
That way, it'll check for abort in cases where there are lots of cells
with one-point-per-cell, and also for cases where there are
many-points-per-cell.
Or maybe always set abortcheck=numPoints/5000 and forget about numCells.
what do you think?
cheers,
Paul
More information about the vtkusers
mailing list