[vtkusers] vtkPointPicker
Sarah Graham
sarah at cs.jhu.edu
Fri Jul 7 17:36:56 EDT 2000
Will,
Thanks for the tips. I implemented the markers using vtkGlyph3D, and all
works well... UNTIL I try to rotate the model. Then, I get a similar
error as before: "[processId] Killed".
So the questions remains-is it my code, or is there something going on in
the vtkRenderWindowInteractor causing this?
Here's a brief description of my implementation:
PickerHandler() :
pointSet->InsertNextPoint(currPicker->GetPickPosition());
points->Modified();
Main():
pointSet = vtkPoints::New();
points = vtkPolyData::New();
points->SetPoints(pointSet);
vtkSphereSource *sphere...
vtkGlyph3D *glyph...
glyph->SetInput(points);
glyph->SetSource(sphere->GetOutput);
...
renderer->AddActor(glyphActor);
iren->SetEndPickMethod(PickerHandler...);
iren->Initialize();
iren->Start();
Thanks for your help,
-Sarah
On Fri, 7 Jul 2000, Will Schroeder wrote:
> Hi Sarah-
>
> At 11:31 AM 7/7/00 -0400, Sarah Graham wrote:
>
> >So...2 questions:
> >1) Any idea why the program is crashing when I try to add markers and then
> >move the model.
> >2) Is there a better way to add multiple spherical markers other than
> >creating a new sphereActor each time?
>
> 1) I'm guessing it's a memory problem...I use Rational's Purify product to track things like this down.
> It's expensive but very good. Also, it may not support your compiler.
>
> 2) You can add points to a vtkPolyData, and then use vtkGlyph3D to place spheres around the points.
> That way the pipeline never changes, just the data in the initial vtkPolyData. (Caution: if you add a point
> to the vtkPolyData, you will probably manually want to send a Modified() to the polydata to insure that
> the pipeline executes properly. This is because low-level data access functions do not invoke Modified()
> for performance reasons.)
>
> Will
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> vtkusers mailing list
> vtkusers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtkusers
>
------------------------
Sarah Graham
Johns Hopkins University
sarah at cs.jhu.edu
http://www.sarahgraham.org
More information about the vtkusers
mailing list