Fw: [vtkusers] drawing a line that doesn't rotate with interaction

Ugur BOZKAYA u.bozkaya at fmcon.com
Sun Apr 16 06:02:24 EDT 2006


try vtkCubeAxesActor2D


>
> ----- Original Message ----- 
> From: "Jesse Corrington" <corrington_j at hotmail.com>
> To: <vtkusers at vtk.org>
> Sent: Friday, March 31, 2006 10:45 PM
> Subject: [vtkusers] drawing a line that doesn't rotate with interaction
>
>
>>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/
>>
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages on-topic. 
>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list