[vtkusers] vtkFollower

Max smapersmaper at gmail.com
Sun Jun 16 07:20:21 EDT 2013


Hi VTKers,
I use the vtkFollower filter to show the line always up,
but it is shown not in the location p1 and p2.
Code:

 //show needle tip
            vtkLineSource lineSource = new vtkLineSource();
            lineSource.SetPoint1(firstSegment.StartPoint.X,
firstSegment.StartPoint.Y, firstSegment.StartPoint.Z);
            lineSource.SetPoint2(firstSegment.StartPoint.X,
firstSegment.StartPoint.Y + lineShape.LineRadius,
firstSegment.StartPoint.Z);
            lineSource.Update();

          
            vtkPolyDataMapper tubeMapper = vtkPolyDataMapper.New();
            tubeMapper.SetInputConnection(lineSource.GetOutputPort());
            //tubeMapper.ScalarVisibilityOff();

            //vtkActor actor = new vtkActor();
            //actor.SetMapper(tubeMapper);

            vtkFollower textActor = new vtkFollower();
            textActor.SetMapper(tubeMapper);
            textActor.SetCamera(firstLayerRenderer.GetActiveCamera());



            firstLayerRenderer.AddActor(textActor);

When I use a vtkActor and not vtkFollower the location is ok, but i lose the
effect of line always up...
How can I get the line always up and in the correct position?

Thank you,
Max




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



More information about the vtkusers mailing list