I want to add 3D text in my application, and vtkVectorText
may help:
vtkSmartPointer<vtkVectorText> text = vtkSmartPointer<vtkVectorText>::New();
text->SetText("hello, world");
text->Update();
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputData(text->GetOutput());
vtkSmartPointer<vtkActor> actor = vtkSmartPoint<vtkActor>::New();
actor->SetMapper(mapper);
However, how can I set the property for this 3D text?
For 2D text, I can use vtkTextMapper
to show it and vtkTextMapper::GetTextProperty
to set the property. For example: SetFontFamily(), SetFontSize, SetLineSpacing, SetBold, FrameOn
and so on. I wonder whether the vtkTextProperty
can be apply to vtkVectorText?
Or is there another method to display 3D text, which allowing the property settting like vtkTextProperty
?