[vtkusers] vtkFollower

Max smapersmaper at gmail.com
Thu Aug 8 03:02:57 EDT 2013


Hi Dear VTKers,
I need to create a line and a number beside the number such that:
1. The line will be always up(did it with vtkFollower)
2. The number will be always near the upper point of the line(when camera is
rotated/pan etc)

How can I do it?
How can I know the upper point of the line when vtkFollower shows the line
always up?
Right now i'm giving the vtkFollower only the lower point of the line...
The code:


                needleLineSource = vtkLineSource.New();
                needleLineSource.SetPoint1(0, 0, 0);
                needleLineSource.SetPoint2(0, 2, 0);
                needleLineSource.Update();

                needleMapper = vtkPolyDataMapper.New();
               
needleMapper.SetInputConnection(needleLineSource.GetOutputPort());
                
                needleActor = vtkFollower.New();
                needleActor.SetMapper(needleMapper);
                needleActor.SetCamera(windowRenderer.GetActiveCamera());
                needleActor.SetPosition(firstSegment.StartPoint.X,
firstSegment.StartPoint.Y, firstSegment.StartPoint.Z);

                windowRenderer.AddActor(needleActor);


Thank you,
Max



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



More information about the vtkusers mailing list