vtkPolarAxesRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkPolarAxesRepresentation_h
11 #define vtkPolarAxesRepresentation_h
12 
13 #include "vtkRemotingViewsModule.h" //needed for exports
14 
15 #include "vtkNew.h" // needed for vtkNew.
17 #include "vtkPVRenderView.h" // needed for renderer enum
18 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_13_0
19 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
20 
21 class vtkPolarAxesActor;
22 class vtkPolyData;
23 class vtkTextProperty;
24 
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
36  vtkSetVector3Macro(Position, double);
37  vtkGetVector3Macro(Position, double);
39 
41 
44  vtkSetVector3Macro(Orientation, double);
45  vtkGetVector3Macro(Orientation, double);
47 
49 
52  vtkSetVector3Macro(Scale, double);
53  vtkGetVector3Macro(Scale, double);
55 
59  vtkGetVector6Macro(DataBounds, double);
60 
62 
67  vtkSetVector6Macro(CustomBounds, double);
68  vtkGetVector6Macro(CustomBounds, double);
70 
72 
75  vtkSetVector3Macro(EnableCustomBounds, int);
76  vtkGetVector3Macro(EnableCustomBounds, int);
78 
80 
83  vtkSetMacro(EnableCustomRange, bool);
84  vtkGetMacro(EnableCustomRange, bool);
86 
88 
93  vtkSetVector2Macro(CustomRange, double);
94  vtkGetVector2Macro(CustomRange, double);
96 
98 
102  vtkSetMacro(EnableAutoPole, bool);
103  vtkGetMacro(EnableAutoPole, bool);
105 
107 
111  vtkSetMacro(EnableCustomAngle, bool);
112  vtkGetMacro(EnableCustomAngle, bool);
114 
116 
119  vtkSetMacro(MinAngle, double);
120  vtkGetMacro(MinAngle, double);
121  vtkSetMacro(MaxAngle, double);
122  vtkGetMacro(MaxAngle, double);
124 
126 
130  PARAVIEW_DEPRECATED_IN_5_13_0("Use EnableCustomMinRadius instead")
131  virtual void SetEnableCustomRadius(bool enabled);
132  PARAVIEW_DEPRECATED_IN_5_13_0("Use EnableCustomMinRadius instead")
133  virtual bool GetEnableCustomRadius();
134  void SetEnableCustomMinRadius(bool enabled);
135  vtkGetMacro(EnableCustomMinRadius, double);
137 
139 
143  vtkSetMacro(MinRadius, double);
144  vtkGetMacro(MinRadius, double);
146 
148 
152  vtkSetMacro(EnableCustomMaxRadius, bool);
153  vtkGetMacro(EnableCustomMaxRadius, bool);
155 
157 
161  vtkSetMacro(MaxRadius, double);
162  vtkGetMacro(MaxRadius, double);
164 
166 
169  vtkGetMacro(EnableOverallColor, bool);
170  virtual void SetEnableOverallColor(bool enable);
171  virtual void SetOverallColor(double r, double g, double b);
172  virtual void SetPolarAxisColor(double r, double g, double b);
173  virtual void SetPolarArcsColor(double r, double g, double b);
174  virtual void SetSecondaryPolarArcsColor(double r, double g, double b);
175  virtual void SetSecondaryRadialAxesColor(double r, double g, double b);
176  virtual void SetLastRadialAxisColor(double r, double g, double b);
177  virtual void SetPolarAxisTitleTextProperty(vtkTextProperty* prop);
178  virtual void SetPolarAxisLabelTextProperty(vtkTextProperty* prop);
179  virtual void SetLastRadialAxisTextProperty(vtkTextProperty* prop);
180  virtual void SetSecondaryRadialAxesTextProperty(vtkTextProperty* prop);
182 
187  void MarkModified() override { this->Superclass::MarkModified(); }
188 
195  vtkInformation* outInfo) override;
196 
200  void SetVisibility(bool visible) override;
201 
205  virtual void SetParentVisibility(bool visible);
206 
207  //***************************************************************************
209 
212  virtual void SetLog(bool active);
213  virtual void SetNumberOfRadialAxes(vtkIdType val);
214  virtual void SetNumberOfPolarAxes(vtkIdType val);
215  virtual void SetDeltaAngleRadialAxes(double angle);
216  virtual void SetDeltaRangePolarAxes(double range);
217  virtual void SetSmallestVisiblePolarAngle(double angle);
218  virtual void SetTickLocation(int location);
219  virtual void SetRadialUnits(bool use);
220  virtual void SetScreenSize(double size);
221  virtual void SetPolarAxisTitle(const char* title);
222  virtual void SetPolarLabelFormat(const char* format);
223  virtual void SetExponentLocation(int location);
224  virtual void SetRadialAngleFormat(const char* format);
225  virtual void SetEnableDistanceLOD(int enable);
226  virtual void SetDistanceLODThreshold(double val);
227  virtual void SetEnableViewAngleLOD(int enable);
228  virtual void SetViewAngleLODThreshold(double val);
229  virtual void SetPolarAxisVisibility(int visible);
230  virtual void SetDrawRadialGridlines(int draw);
231  virtual void SetDrawPolarArcsGridlines(int draw);
232  virtual void SetPolarTitleVisibility(int visible);
233  virtual void SetRadialAxisTitleLocation(int location);
234  virtual void SetPolarAxisTitleLocation(int location);
235  virtual void SetRadialTitleOffset(double offsetX, double offsetY);
236  virtual void SetPolarTitleOffset(double offsetX, double offsetY);
237  virtual void SetPolarLabelOffset(double offsetY);
238  virtual void SetPolarExponentOffset(double offsetY);
239  virtual void SetPolarLabelVisibility(int visible);
240  virtual void SetArcTicksOriginToPolarAxis(int use);
241  virtual void SetRadialAxesOriginToPolarAxis(int use);
242  virtual void SetPolarTickVisibility(int visible);
243  virtual void SetAxisTickVisibility(int visible);
244  virtual void SetAxisMinorTickVisibility(int visible);
245  virtual void SetAxisTickMatchesPolarAxes(int enable);
246  virtual void SetArcTickVisibility(int visible);
247  virtual void SetArcMinorTickVisibility(int visible);
248  virtual void SetArcTickMatchesRadialAxes(int enable);
249  virtual void SetTickRatioRadiusSize(double ratio);
250  virtual void SetArcMajorTickSize(double size);
251  virtual void SetPolarAxisMajorTickSize(double size);
252  virtual void SetLastRadialAxisMajorTickSize(double size);
253  virtual void SetPolarAxisTickRatioSize(double size);
254  virtual void SetLastAxisTickRatioSize(double size);
255  virtual void SetArcTickRatioSize(double size);
256  virtual void SetPolarAxisMajorTickThickness(double thickness);
257  virtual void SetLastRadialAxisMajorTickThickness(double thickness);
258  virtual void SetArcMajorTickThickness(double thickness);
259  virtual void SetPolarAxisTickRatioThickness(double thickness);
260  virtual void SetLastAxisTickRatioThickness(double thickness);
261  virtual void SetArcTickRatioThickness(double thickness);
262  virtual void SetDeltaAngleMajor(double delta);
263  virtual void SetDeltaAngleMinor(double delta);
264  virtual void SetRadialAxesVisibility(int visible);
265  virtual void SetRadialTitleVisibility(int visible);
266  virtual void SetPolarArcsVisibility(int visible);
267  virtual void SetUse2DMode(int use);
268  virtual void SetRatio(double ratio);
269  virtual void SetPolarArcResolutionPerDegree(double resolution);
270  virtual void SetDeltaRangeMinor(double delta);
271  virtual void SetDeltaRangeMajor(double delta);
273 
275 
278  vtkSetMacro(RendererType, int);
279  vtkGetMacro(RendererType, int);
281 
282 protected:
284  ~vtkPolarAxesRepresentation() override;
285 
286  int FillInputPortInformation(int port, vtkInformation* info) override;
287  int RequestData(
288  vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector*) override;
289 
290  virtual void InitializeDataBoundsFromData(vtkDataObject* data);
291  virtual void UpdateBounds();
292 
299  bool AddToView(vtkView* view) override;
300 
307  bool RemoveFromView(vtkView* view) override;
308 
312  double Position[3] = { 0.0 };
313  double Scale[3] = { 1.0 };
314  double Orientation[3] = { 0.0 };
315  double CustomBounds[6] = { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };
316  int EnableCustomBounds[3] = { 0 };
317  double CustomRange[2] = { 0.0, 1.0 };
318  bool EnableCustomRange = false;
319  bool EnableAutoPole = true;
320  bool EnableCustomAngle = true;
321  double MinAngle = 0.0;
322  double MaxAngle = 90.0;
323  PARAVIEW_DEPRECATED_IN_5_13_0("Use Get/Set EnableCustomMinRadius methods instead")
324  bool EnableCustomRadius = true;
325  double MinRadius = 0.0;
326  bool EnableOverallColor = true;
327  double OverallColor[3] = { 1.0 };
328  double PolarAxisColor[3] = { 1.0 };
329  double PolarArcsColor[3] = { 1.0 };
330  double SecondaryPolarArcsColor[3] = { 1.0 };
331  double SecondaryRadialAxesColor[3] = { 1.0 };
332  double LastRadialAxisColor[3] = { 1.0 };
333  double DataBounds[6] = { 0.0 };
335  bool ParentVisibility = true;
337 
338 private:
340  void operator=(const vtkPolarAxesRepresentation&) = delete;
341 
342  bool EnableCustomMinRadius = true;
343  bool EnableCustomMaxRadius = false;
344  double MaxRadius = 1.0;
345 };
346 
347 #endif
data
location
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
bool AddToView(vtkView *view) override
Making these methods public.
info
int vtkIdType
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkNew< vtkPolarAxesActor > PolarAxesActor
bool RemoveFromView(vtkView *view) override
Making these methods public.
size
range
static vtkDataRepresentation * New()
resolution
representation for a polar-axes.
vtkWeakPointer< vtkPVRenderView > RenderView
void PrintSelf(ostream &os, vtkIndent indent) override
port
title