[vtkusers] vtkPointWidget set the right position

David Doria daviddoria at gmail.com
Tue Apr 16 11:34:28 EDT 2013


On Tue, Apr 16, 2013 at 10:01 AM, ChenDawnWind <cybfly1 at hotmail.com> wrote:
> Hi everyone,I want to position a point in the model,then i use the codes
> like this:
>
> vtkSmartPointer<vtkPointWidget> pointWidget =
> vtkSmartPointer<vtkPointWidget>::New();
> pointWidget->SetPosition(center.x, center.y, 0);
> pointWidget->SetInteractor(iren);
> pointWidget->On();
>
> But the point always appear at the corner of the outline of the model.
> So i search the answer in the examples and google, and tried:
>
>         vtkSmartPointer<vtkPointWidget> pointWidget =
> vtkSmartPointer<vtkPointWidget>::New();
>         pointWidget->PlaceWidget();
> pointWidget->SetPosition(center.x, center.y, 0);
> pointWidget->SetInteractor(iren);
> pointWidget->On();
>
> or some other codes but the problem still. So i wanna know what codes should
> i use to achieve my goal?
> Thanks!
>
> DawnWind.Chen
> CSU


Please send the most simple, fully compilable code you can that
demonstrates the problem.

David



More information about the vtkusers mailing list