1#ifndef TestAxisActorInternal_h
2#define TestAxisActorInternal_h
50 axisXActor->SetUse2DMode(use2dMode);
51 axisXActor->SetUseTextActor3D(use3dProp);
52 axisXActor->GetProperty()->SetAmbient(1);
53 axisXActor->GetProperty()->SetDiffuse(0);
54 axisXActor->SetPoint1(0, 0, 0);
55 axisXActor->SetPoint2(10, 0, 0);
56 axisXActor->SetTitle(
"X Axis");
57 axisXActor->SetBounds(0, 10, 0, 0, 0, 0);
58 axisXActor->SetTickLocationToBoth();
59 axisXActor->SetAxisTypeToX();
60 axisXActor->SetRange(0, 10);
61 axisXActor->SetLabels(labels);
62 axisXActor->SetDeltaRangeMajor(2);
63 axisXActor->SetDeltaRangeMinor(0.5);
64 axisXActor->SetExponent(
"+00");
65 axisXActor->SetExponentVisibility(
true);
66 axisXActor->SetTitleScale(0.8);
67 axisXActor->SetLabelScale(0.5);
68 axisXActor->SetTitleOffset(3);
69 axisXActor->SetExponentOffset(3);
70 axisXActor->SetLabelOffset(5);
71 axisXActor->SetTitleTextProperty(textProp1);
72 axisXActor->SetLabelTextProperty(textProp2);
73 axisXActor->SetAxisMainLineProperty(prop1);
74 axisXActor->SetAxisMajorTicksProperty(prop2);
75 axisXActor->SetAxisMinorTicksProperty(prop3);
79 axisYActor->SetUse2DMode(use2dMode);
80 axisYActor->SetUseTextActor3D(use3dProp);
81 axisYActor->GetProperty()->SetAmbient(1);
82 axisYActor->GetProperty()->SetDiffuse(0);
83 axisYActor->SetPoint1(0, 0, 0);
84 axisYActor->SetPoint2(0, 10, 0);
85 axisYActor->SetTitle(
"Y Axis");
86 axisYActor->SetBounds(0, 0, 0, 10, 0, 0);
87 axisYActor->SetTickLocationToInside();
88 axisYActor->SetAxisTypeToY();
89 axisYActor->SetRange(0.1, 500);
90 axisYActor->SetMajorRangeStart(0.1);
91 axisYActor->SetMinorRangeStart(0.1);
92 axisYActor->SetMinorTicksVisible(
true);
94 axisYActor->SetExponent(
"+00");
95 axisYActor->SetExponentVisibility(
true);
97 axisYActor->SetTitleScale(0.8);
98 axisYActor->SetLabelScale(0.5);
99 axisYActor->SetTitleOffset(3);
100 axisYActor->SetExponentOffset(5);
101 axisYActor->SetLabelOffset(5);
102 axisYActor->SetTitleTextProperty(textProp2);
103 axisYActor->SetLog(
true);
104 axisYActor->SetAxisLinesProperty(prop1);
108 axisZActor->SetUse2DMode(use2dMode);
109 axisZActor->SetUseTextActor3D(use3dProp);
110 axisZActor->GetProperty()->SetAmbient(1);
111 axisZActor->GetProperty()->SetDiffuse(0);
112 axisZActor->SetPoint1(0, 0, 0);
113 axisZActor->SetPoint2(0, 0, 10);
114 axisZActor->SetTitle(
"Z Axis");
115 axisZActor->SetBounds(0, 0, 0, 0, 0, 10);
116 axisZActor->SetTickLocationToOutside();
117 axisZActor->SetAxisTypeToZ();
118 axisZActor->SetRange(0, 10);
120 axisZActor->SetExponent(
"+00");
121 axisZActor->SetExponentVisibility(
true);
123 axisZActor->SetTitleScale(0.8);
124 axisZActor->SetLabelScale(0.5);
125 axisZActor->SetTitleOffset(3);
126 axisZActor->SetExponentOffset(3);
127 axisZActor->SetLabelOffset(5);
128 axisZActor->SetTitleTextProperty(textProp3);
129 axisZActor->SetMajorTickSize(3);
130 axisZActor->SetMinorTickSize(1);
131 axisZActor->SetDeltaRangeMajor(2);
132 axisZActor->SetDeltaRangeMinor(0.1);
136 renderWindow->AddRenderer(renderer);
138 renderWindowInteractor->SetRenderWindow(renderWindow);
145 axisXActor->SetCamera(camera);
146 axisYActor->SetCamera(camera);
147 axisZActor->SetCamera(camera);
148 renderWindow->SetSize(300, 300);
153 renderWindow->SetMultiSamples(0);
154 renderWindow->Render();
155 renderWindowInteractor->Start();
int TestAxisActorInternal(int use2dMode, int use3dProp)
a virtual camera for 3D rendering
void SetPosition(double x, double y, double z)
Set/Get the position of the camera in world coordinates.
void SetFocalPoint(double x, double y, double z)
Set/Get the focal of the camera in world coordinates.
virtual void SetColor(double r, double g, double b)
Set the color of the object.
vtkCamera * GetActiveCamera()
Get the current camera.
void AddActor(vtkProp *p)
Add/Remove different types of props to the renderer.
void SetValue(vtkIdType id, vtkStdString value)
Set the data at a particular index.
void SetNumberOfTuples(vtkIdType number) override
Set the number of tuples (a component group) in the array.
virtual void SetOpacity(double)
Set/Get the text's opacity.
virtual void SetColor(double, double, double)
Set the color of the text.
virtual void SetBackground(double, double, double)
Set/Get the background color of the rendering screen using an rgb color specification.