[vtkusers] 3D Point Labeling

Istvan Matis i_matis at yahoo.de
Tue Sep 28 11:47:36 EDT 2004


Hello,

How to label a 3D point in such a way that the label should always face toward the screen, like an Actor2D (even when rotating the camera), but it should hide like an Actor3D, when the 3D point and the label are not visible, that is they are behind other actors or widgets?

I tried with vtkCaptionActor2D, but i couldn't manage to draw it behind other actors, only in the foreground, even when the 3D point was deep inside the screen, behind other points...
I also tried with vtkTextSource combined with a PolyDataMapper and an Actor, but setting the orientation does not seemed to work... see my code below...
Can somebody give me a hint?

Am I doing something wrong, or should I use a different method?

Thanks,
Istvan

1)
 aCaption_X->SetCaption("X");
 aCaption_X->ThreeDimensionalLeaderOn();
 aCaption_X->LeaderOn();
 aCaption_X->SetAttachmentPoint(xpos); 
 aCaption_X->GetProperty()->SetDisplayLocationToBackground(); //Doesn't work. 

2)
 aTextSource_X->SetText("X");
 aPDMapper_X->SetInput(aTextSource_X->GetOutput());
 anActor_X->SetMapper(aPDMapper_X);
 anActor_X->SetPosition(xpos);
//....camera setup....
 anActor_X->SetOrientation(aRenderer->GetActiveCamera()->
        GetDirectionOfProjection());    //Doesn't work
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040928/0411708f/attachment.htm>


More information about the vtkusers mailing list