VTK  9.4.20250421
Public Member Functions | List of all members
vtkTextActorInterfaceInternal Class Reference

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.
 
vtkPropGetActiveProp (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.
 
vtkProp3DAxisFollowerGetFollower3D () const
 Return the internal follower 3D.
 
vtkAxisFollowerGetFollower () 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.
 

Detailed Description

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.

See also
GetActiveProp

Definition at line 33 of file vtkTextActorInterfaceInternal.h.

Constructor & Destructor Documentation

◆ vtkTextActorInterfaceInternal()

vtkTextActorInterfaceInternal::vtkTextActorInterfaceInternal ( )

◆ ~vtkTextActorInterfaceInternal()

virtual vtkTextActorInterfaceInternal::~vtkTextActorInterfaceInternal ( )
virtual

Member Function Documentation

◆ SetInputText()

void vtkTextActorInterfaceInternal::SetInputText ( const std::string &  text)

Set the text to be displayed.

◆ GetInputText()

std::string vtkTextActorInterfaceInternal::GetInputText ( )

◆ SetCamera()

void vtkTextActorInterfaceInternal::SetCamera ( vtkCamera camera)

Set the current camera.

Useful when using a Follower.

◆ SetAxis()

void vtkTextActorInterfaceInternal::SetAxis ( vtkAxisActor axis)

Set the axis to follow.

◆ GetActiveProp()

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)

◆ UpdateProperty()

void vtkTextActorInterfaceInternal::UpdateProperty ( vtkTextProperty textProp,
vtkProperty prop 
)

Update the actors from the given text property.

◆ SetAmbient()

void vtkTextActorInterfaceInternal::SetAmbient ( double  amb)

Set ambient coefficient.

Should be between 0 and 1.

◆ SetDiffuse()

void vtkTextActorInterfaceInternal::SetDiffuse ( double  diffuse)

Set diffuse coefficient.

Should be between 0 and 1.

◆ GetActors()

void vtkTextActorInterfaceInternal::GetActors ( vtkPropCollection collection)

Fill the collection with all vtkProp members.

◆ SetScale()

void vtkTextActorInterfaceInternal::SetScale ( double  s)

Set scale on the Follower and Follower3D.

Note that Actor3D has its own scale, computed in AdjustScale.

◆ 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.

◆ GetBounds()

void vtkTextActorInterfaceInternal::GetBounds ( double  bounds[6])

Get the bounds of the text.

◆ SetPosition()

void vtkTextActorInterfaceInternal::SetPosition ( double  pos[3])

Update internal 3D actors position.

◆ GetReferencePosition()

void vtkTextActorInterfaceInternal::GetReferencePosition ( double  pos[3])

Get the reference position in 3D space.

◆ SetDisplayPosition()

void vtkTextActorInterfaceInternal::SetDisplayPosition ( double  x,
double  y 
)

Update internal screen space actors position.

◆ RotateActor2DFromAxisProjection()

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.

◆ SetScreenOffset()

void vtkTextActorInterfaceInternal::SetScreenOffset ( double  offset)

Set Screen offset on axis followers.

◆ SetScreenOffsetVector()

void vtkTextActorInterfaceInternal::SetScreenOffsetVector ( double  offset[2])

Set Screen offset on axis followers.

◆ GetFollower3D()

vtkProp3DAxisFollower * vtkTextActorInterfaceInternal::GetFollower3D ( ) const

Return the internal follower 3D.

This is here for backward compatibility, please do not add usage.

◆ GetFollower()

vtkAxisFollower * vtkTextActorInterfaceInternal::GetFollower ( ) const

Return the internal follower.

This is here for backward compatibility, please do not add usage.


The documentation for this class was generated from the following file: