[vtkusers] vtkPolyDataPointPlacer problems

ysa0829 ysa0829 at gmail.com
Mon Aug 26 05:07:21 EDT 2013


Hi all,

I built a quick project which uses vtkContourWidget and
vtkPolyDataPointPlacer to display a contour on a plane.

I found that the positions are not correct.

When I traced the code about vtkPolyDataPointPlacer.cpp, I dont understand
why needed to
raise height by 0.01.

the code in vtkPolyDataPointPlacer.cpp:

        if (found)
          {
          this->PropPicker->GetPickPosition(worldPos);
          
          // Raise height by 0.01 ... this should be a method..
           double displyPos[3];
           vtkInteractorObserver::ComputeWorldToDisplay(ren,
               worldPos[0], worldPos[1], worldPos[2], displyPos);
           displyPos[2] -= 0.01;
           double w[4];
           vtkInteractorObserver::ComputeDisplayToWorld(ren,
               displyPos[0], displyPos[1], displyPos[2], w);
           worldPos[0] = w[0];
           worldPos[1] = w[1];
           worldPos[2] = w[2];

          return 1;
          }


Could someone explain this?
Thank you for your help, I really appreciate it .





--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkPolyDataPointPlacer-problems-tp5723023.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list