[vtkusers] About vtkPoints::InsertPoint()

David Doria daviddoria at gmail.com
Thu Apr 26 09:40:42 EDT 2012


On Thu, Apr 26, 2012 at 8:46 AM, Wenlong <scc.wwl at gmail.com> wrote:
> Dear all,
>
> I'm trying to insert point coordinates into a vtkPoints instance. Here is
> what I do
>
> vtkPoints* points = vtkPoints::New();
> float x[3];
> x[0] = 1;
> x[1] = 2;
> x[3] = 3;
> points->InsertPoint(0, x);
>
> However, the compiler pops an error says there is acess conflict happens.
> How can I solve this problem?
>
> I used above operations on Windows Vista with Visual Studio 2008 before.
> There was  no such problem.
>
> Now the program is working on Windows 7 with Visual Studion 2008. Could
> there be something related with the operation system?
>
> Many thanks in advance.
>
> Best regards
> Wenlong

If you want to insert points sequentially, use

points->InsertNextPoint(x);

If you want to set a specific point that already exists, use:

points->SetPoint(n, x);

David



More information about the vtkusers mailing list