VTK  9.5.20250815
vtkTextActorInterfaceInternal.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkTextActorInterfaceInternal_h
4#define vtkTextActorInterfaceInternal_h
5
6#include "vtkNew.h"
7#include "vtkSmartPointer.h"
8
9#include <memory>
10#include <string>
11
12VTK_ABI_NAMESPACE_BEGIN
13
14class vtkAxisActor;
15class vtkAxisFollower;
16class vtkCamera;
19class vtkProp;
22class vtkProperty;
23class vtkTextActor3D;
24class vtkTextActor;
25class vtkTextProperty;
26class vtkVectorText;
27
36{
37public:
40
44 void SetInputText(const std::string& text);
45 std::string GetInputText();
46
50 void SetCamera(vtkCamera* camera);
51
55 void SetAxis(vtkAxisActor* axis);
56
63 vtkProp* GetActiveProp(bool overlay, bool vector);
64
69
73 void GetActors(vtkPropCollection* collection);
74
79 void SetScale(double s);
80
87
91 void GetBounds(double bounds[6]);
92
96 void SetPosition(double pos[3]);
97
101 void GetReferencePosition(double pos[3]);
102
106 void SetDisplayPosition(double x, double y);
107
112 void RotateActor2DFromAxisProjection(double p1[3], double p2[3]);
113
115
118 void SetScreenOffset(double offset);
119 void SetScreenOffsetVector(double offset[2]);
121
126 // VTK_DEPRECATED_IN_9_5_0
128
133 // VTK_DEPRECATED_IN_9_5_0
135
136private:
137 void operator=(const vtkTextActorInterfaceInternal&) = delete;
139
141
142 vtkNew<vtkTextActor> Raster2D;
143 vtkNew<vtkTextActor3D> Raster3D;
144 vtkNew<vtkProp3DAxisFollower> RasterFollower;
145 vtkNew<vtkAxisFollower> VectorFollower;
146
148 std::unique_ptr<vtkFollowerTextPropertyAdaptor> FollowerAdaptor;
149};
150
151VTK_ABI_NAMESPACE_END
152#endif
Create an axis with tick marks and labels.
a subclass of vtkFollower that ensures that data is always parallel to the axis defined by a vtkAxisA...
a virtual camera for 3D rendering
Definition vtkCamera.h:151
vtkFollowerTextPropertyAdaptor is a helper class to mimic vtkTextProperty behavior for a vtkAxisFollo...
Allocate and hold a VTK object.
Definition vtkNew.h:167
map vtkPolyData to graphics primitives
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:69
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
An actor that displays text.
VTK Internal interface to manipulate text actors from vtkAxisActor.
void RotateActor2DFromAxisProjection(double p1[3], double p2[3])
Set orientation of the actor 2D to keep the axis orientation.
void SetCamera(vtkCamera *camera)
Set the current camera.
void SetAxis(vtkAxisActor *axis)
Set the axis to follow.
void SetScale(double s)
Set scale on the Follower and Follower3D.
vtkAxisFollower * GetFollower() const
Return the internal follower.
void SetTextProperty(vtkTextProperty *textProp, vtkProperty *prop)
Update the actors from the given text property.
void SetInputText(const std::string &text)
Set the text to be displayed.
void GetBounds(double bounds[6])
Get the bounds of the text.
void GetActors(vtkPropCollection *collection)
Fill the collection with all vtkProp members.
void SetDisplayPosition(double x, double y)
Update internal screen space actors position.
vtkProp * GetActiveProp(bool overlay, bool vector)
Get the vtkProp to be used in the given mode: if overlay is true, return the vtkTextActor (rasterized...
void AdjustScale()
Adjust the scale of Actor3D, based on Follower mapper bounds, so switching them provide consistent si...
void GetReferencePosition(double pos[3])
Get the reference position in 3D space.
vtkProp3DAxisFollower * GetFollower3D() const
Return the internal follower 3D.
void SetPosition(double pos[3])
Update internal 3D actors position.
void SetScreenOffsetVector(double offset[2])
Set Screen offset on axis followers.
void SetScreenOffset(double offset)
Set Screen offset on axis followers.
An actor that displays text.
represent text properties.
create polygonal text