[vtkusers] drawing a line that doesn't rotate with interaction
Jesse Corrington
corrington_j at hotmail.com
Fri Mar 31 14:45:51 EST 2006
I am trying to create a scale bar, And I think the easiest way to do it will
be to add a line actor that is only affected by zooming, not rotation. So
the line is always vertical in the same position, but it scales as the user
zooms in and out. I have not been able to figure out how to do this yet.
Here is what I have, to just add the line actor. Any help would be much
appreciated. Thanks
Jesse
//add the scale bar
vtkLineSource *lineSource = vtkLineSource::New();
lineSource->SetResolution(20);
lineSource->SetPoint1(10, 10, 0);
lineSource->SetPoint2(10, 400, 0);
vtkPolyDataMapper *lineMapper = vtkPolyDataMapper::New();
lineMapper->SetInput(lineSource->GetOutput());
lineActor = vtkActor::New();
lineActor->SetMapper(lineMapper);
pvtkRenderer->AddActor2D(lineActor);
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the vtkusers
mailing list