VTK
9.4.20250421
|
VTK Internal interface to manipulate text actors from vtkAxisActor. More...
#include <vtkTextActorInterfaceInternal.h>
Public Member Functions | |
vtkTextActorInterfaceInternal () | |
virtual | ~vtkTextActorInterfaceInternal () |
void | SetInputText (const std::string &text) |
Set the text to be displayed. | |
std::string | GetInputText () |
void | SetCamera (vtkCamera *camera) |
Set the current camera. | |
void | SetAxis (vtkAxisActor *axis) |
Set the axis to follow. | |
vtkProp * | GetActiveProp (bool overlay, bool vector) |
Get the vtkProp to be used in the given mode: if overlay is true, return the vtkTextActor (rasterized text in screen space) else if vector is true, return the vtkAxisFollower (vectorized text in 3D scene) else return the vtkProp3DAxisFollower (rasterized text in 3D scene) | |
void | UpdateProperty (vtkTextProperty *textProp, vtkProperty *prop) |
Update the actors from the given text property. | |
void | SetAmbient (double amb) |
Set ambient coefficient. | |
void | SetDiffuse (double diffuse) |
Set diffuse coefficient. | |
void | GetActors (vtkPropCollection *collection) |
Fill the collection with all vtkProp members. | |
void | SetScale (double s) |
Set scale on the Follower and Follower3D. | |
void | AdjustScale () |
Adjust the scale of Actor3D, based on Follower mapper bounds, so switching them provide consistent size on screen. | |
void | GetBounds (double bounds[6]) |
Get the bounds of the text. | |
void | SetPosition (double pos[3]) |
Update internal 3D actors position. | |
void | GetReferencePosition (double pos[3]) |
Get the reference position in 3D space. | |
void | SetDisplayPosition (double x, double y) |
Update internal screen space actors position. | |
void | RotateActor2DFromAxisProjection (double p1[3], double p2[3]) |
Set orientation of the actor 2D to keep the axis orientation. | |
vtkProp3DAxisFollower * | GetFollower3D () const |
Return the internal follower 3D. | |
vtkAxisFollower * | GetFollower () const |
Return the internal follower. | |
void | SetScreenOffset (double offset) |
Set Screen offset on axis followers. | |
void | SetScreenOffsetVector (double offset[2]) |
Set Screen offset on axis followers. | |
VTK Internal interface to manipulate text actors from vtkAxisActor.
The generated text is either a vector or a rasterized version. Display can be done screen space or in 3D scene, using the appropriate (Axis)Follower.
Definition at line 33 of file vtkTextActorInterfaceInternal.h.
vtkTextActorInterfaceInternal::vtkTextActorInterfaceInternal | ( | ) |
|
virtual |
void vtkTextActorInterfaceInternal::SetInputText | ( | const std::string & | text | ) |
Set the text to be displayed.
std::string vtkTextActorInterfaceInternal::GetInputText | ( | ) |
void vtkTextActorInterfaceInternal::SetCamera | ( | vtkCamera * | camera | ) |
Set the current camera.
Useful when using a Follower.
void vtkTextActorInterfaceInternal::SetAxis | ( | vtkAxisActor * | axis | ) |
Set the axis to follow.
vtkProp * vtkTextActorInterfaceInternal::GetActiveProp | ( | bool | overlay, |
bool | vector | ||
) |
Get the vtkProp to be used in the given mode: if overlay is true, return the vtkTextActor (rasterized text in screen space) else if vector is true, return the vtkAxisFollower (vectorized text in 3D scene) else return the vtkProp3DAxisFollower (rasterized text in 3D scene)
void vtkTextActorInterfaceInternal::UpdateProperty | ( | vtkTextProperty * | textProp, |
vtkProperty * | prop | ||
) |
Update the actors from the given text property.
void vtkTextActorInterfaceInternal::SetAmbient | ( | double | amb | ) |
Set ambient coefficient.
Should be between 0 and 1.
void vtkTextActorInterfaceInternal::SetDiffuse | ( | double | diffuse | ) |
Set diffuse coefficient.
Should be between 0 and 1.
void vtkTextActorInterfaceInternal::GetActors | ( | vtkPropCollection * | collection | ) |
Fill the collection with all vtkProp members.
void vtkTextActorInterfaceInternal::SetScale | ( | double | s | ) |
Set scale on the Follower and Follower3D.
Note that Actor3D has its own scale, computed in AdjustScale.
void vtkTextActorInterfaceInternal::AdjustScale | ( | ) |
Adjust the scale of Actor3D, based on Follower mapper bounds, so switching them provide consistent size on screen.
Follower3D also has its scale, externally set in SetScale.
void vtkTextActorInterfaceInternal::GetBounds | ( | double | bounds[6] | ) |
Get the bounds of the text.
void vtkTextActorInterfaceInternal::SetPosition | ( | double | pos[3] | ) |
Update internal 3D actors position.
void vtkTextActorInterfaceInternal::GetReferencePosition | ( | double | pos[3] | ) |
Get the reference position in 3D space.
void vtkTextActorInterfaceInternal::SetDisplayPosition | ( | double | x, |
double | y | ||
) |
Update internal screen space actors position.
void vtkTextActorInterfaceInternal::RotateActor2DFromAxisProjection | ( | double | p1[3], |
double | p2[3] | ||
) |
Set orientation of the actor 2D to keep the axis orientation.
Axis is defined by p1 and p2.
void vtkTextActorInterfaceInternal::SetScreenOffset | ( | double | offset | ) |
Set Screen offset on axis followers.
void vtkTextActorInterfaceInternal::SetScreenOffsetVector | ( | double | offset[2] | ) |
Set Screen offset on axis followers.
vtkProp3DAxisFollower * vtkTextActorInterfaceInternal::GetFollower3D | ( | ) | const |
Return the internal follower 3D.
This is here for backward compatibility, please do not add usage.
vtkAxisFollower * vtkTextActorInterfaceInternal::GetFollower | ( | ) | const |
Return the internal follower.
This is here for backward compatibility, please do not add usage.