[vtkusers] dynamically allocate vtkpointer

128 at gmx.us 128 at gmx.us
Mon Nov 28 02:43:11 EST 2016


got it

vtkSmartPointer<vtkUnstructuredGrid> *block = new vtkSmartPointer<vtkUnstructuredGrid> [3];
block[0]=vtkSmartPointer<vtkUnstructuredGrid>::New();
block[1]=vtkSmartPointer<vtkUnstructuredGrid>::New();
block[2]=vtkSmartPointer<vtkUnstructuredGrid>::New();


> Sent: Monday, November 28, 2016 at 8:24 AM
> From: 128 at gmx.us
> To: vtkusers at vtk.org
> Subject: [vtkusers] dynamically allocate vtkpointer
>
> Hi,
> 
> How can I create a dynamically allocated vtk pointer. For example,
> 
> vtkSmartPointer<vtkUnstructuredGrid> block[3] = vtkSmartPointer<vtkUnstructuredGrid>::New();
> 
> can create a size 3 array of vtkUnstructuredGrid pointers. How can I dyncamically allocate this?
> 
> Thank you.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 


More information about the vtkusers mailing list