[vtkusers] vtkPoints + InsertPoint
David Doria
daviddoria+vtk at gmail.com
Fri Mar 12 09:48:25 EST 2010
On Fri, Mar 12, 2010 at 9:36 AM, Bill Chivas <noo134 at googlemail.com> wrote:
> To David:
>
> If it works with only two points, try to put some more (e.g. 10).
> In mine, it crashes in 3 or 4 points.
>
>
This runs without crashing for me:
#include <vtkSmartPointer.h>
#include <vtkPoints.h>
#include <vtkMath.h>
int main(int argc, char *argv[])
{
vtkSmartPointer<vtkPoints> points =
vtkSmartPointer<vtkPoints>::New();
points->SetNumberOfPoints(61000000);
int start = 60983588;
for(unsigned int i = 0; i < 100; i++)
{
points->InsertPoint(start + i, vtkMath::Random(0.0,1.0),
vtkMath::Random(0.0,1.0), vtkMath::Random(0.0,1.0));
}
return EXIT_SUCCESS;
}
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/2bb436d6/attachment.htm>
More information about the vtkusers
mailing list