vtkPolarAxesRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPolarAxesRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkPolarAxesRepresentation - representation for a polar-axes.
16 // .SECTION Description
17 // vtkPolarAxesRepresentation is a representation for the Polar-Axes that shows a
18 // bounding box with labels around any input dataset.
19 
20 #ifndef vtkPolarAxesRepresentation_h
21 #define vtkPolarAxesRepresentation_h
22 
23 #include "vtkRemotingViewsModule.h" //needed for exports
24 
25 #include "vtkNew.h" // needed for vtkNew.
27 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
28 
29 class vtkPolarAxesActor;
30 class vtkPolyData;
31 class vtkPVRenderView;
32 class vtkTextProperty;
33 
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  // Description:
42  // Get/Set the Position to transform the data bounds.
43  vtkSetVector3Macro(Position, double);
44  vtkGetVector3Macro(Position, double);
45 
46  // Description:
47  // Get/Set the Orientation to transform the data bounds.
48  vtkSetVector3Macro(Orientation, double);
49  vtkGetVector3Macro(Orientation, double);
50 
51  // Description:
52  // Get/Set the Scale to transform the data bounds.
53  vtkSetVector3Macro(Scale, double);
54  vtkGetVector3Macro(Scale, double);
55 
56  // Description:
57  // Get the bounds of the data.
58  vtkGetVector6Macro(DataBounds, double);
59 
60  // Description:
61  // Get/Set custom bounds to use. When corresponding CustomBoundsActive is
62  // true, the data bounds will be ignored for that direction and CustomBounds
63  // will be used instead.
64  vtkSetVector6Macro(CustomBounds, double);
65  vtkGetVector6Macro(CustomBounds, double);
66 
67  // Description:
68  // Get/Set whether to use custom bounds for a particular dimension.
69  vtkSetVector3Macro(EnableCustomBounds, int);
70  vtkGetVector3Macro(EnableCustomBounds, int);
71 
72  // Description:
73  // Set the use of a custom range.
74  vtkSetMacro(EnableCustomRange, bool);
75  vtkGetMacro(EnableCustomRange, bool);
76 
77  // Description:
78  // Get/Set custom range to use.
79  // the data bounds will be ignored for that direction and CustomRange
80  // will be used instead.
81  vtkSetVector2Macro(CustomRange, double);
82  vtkGetVector2Macro(CustomRange, double);
83 
84  // Description:
85  // Set the actor color.
86  virtual void SetPolarAxisColor(double r, double g, double b);
87  virtual void SetPolarArcsColor(double r, double g, double b);
88  virtual void SetSecondaryPolarArcsColor(double r, double g, double b);
89  virtual void SetSecondaryRadialAxesColor(double r, double g, double b);
90  virtual void SetLastRadialAxisColor(double r, double g, double b);
91  virtual void SetPolarAxisTitleTextProperty(vtkTextProperty* prop);
92  virtual void SetPolarAxisLabelTextProperty(vtkTextProperty* prop);
93  virtual void SetLastRadialAxisTextProperty(vtkTextProperty* prop);
94  virtual void SetSecondaryRadialAxesTextProperty(vtkTextProperty* prop);
95 
96  // Description:
97  // This needs to be called on all instances of vtkPolarAxesRepresentation when
98  // the input is modified.
99  void MarkModified() override { this->Superclass::MarkModified(); }
100 
101  // Description:
102  // vtkAlgorithm::ProcessRequest() equivalent for rendering passes. This is
103  // typically called by the vtkView to request meta-data from the
104  // representations or ask them to perform certain tasks e.g.
105  // PrepareForRendering.
107  vtkInformation* outInfo) override;
108 
109  // Description:
110  // Set visibility of the representation.
111  void SetVisibility(bool visible) override;
112 
113  // Description:
114  // Set (forward) visibility of the parent (composite) representation.
115  virtual void SetParentVisibility(bool visible);
116 
117  //***************************************************************************
118  // Forwarded to internal vtkPolarAxesActor
119  virtual void SetLog(bool active);
120  virtual void SetNumberOfRadialAxes(vtkIdType val);
121  virtual void SetNumberOfPolarAxisTicks(int val);
122  virtual void SetAutoSubdividePolarAxis(bool active);
123  virtual void SetMinimumRadius(double radius);
124  virtual void SetMinimumAngle(double angle);
125  virtual void SetMaximumAngle(double angle);
126  virtual void SetSmallestVisiblePolarAngle(double angle);
127  virtual void SetTickLocation(int location);
128  virtual void SetRadialUnits(bool use);
129  virtual void SetScreenSize(double size);
130  virtual void SetPolarAxisTitle(const char* title);
131  virtual void SetPolarLabelFormat(const char* format);
132  virtual void SetExponentLocation(int location);
133  virtual void SetRadialAngleFormat(const char* format);
134  virtual void SetEnableDistanceLOD(int enable);
135  virtual void SetDistanceLODThreshold(double val);
136  virtual void SetEnableViewAngleLOD(int enable);
137  virtual void SetViewAngleLODThreshold(double val);
138  virtual void SetPolarAxisVisibility(int visible);
139  virtual void SetDrawRadialGridlines(int draw);
140  virtual void SetDrawPolarArcsGridlines(int draw);
141  virtual void SetPolarTitleVisibility(int visible);
142  virtual void SetRadialAxisTitleLocation(int location);
143  virtual void SetPolarAxisTitleLocation(int location);
144  virtual void SetPolarLabelVisibility(int visible);
145  virtual void SetArcTicksOriginToPolarAxis(int use);
146  virtual void SetRadialAxesOriginToPolarAxis(int use);
147  virtual void SetPolarTickVisibility(int visible);
148  virtual void SetAxisTickVisibility(int visible);
149  virtual void SetAxisMinorTickVisibility(int visible);
150  virtual void SetArcTickVisibility(int visible);
151  virtual void SetArcMinorTickVisibility(int visible);
152  virtual void SetArcMajorTickSize(double size);
153  virtual void SetPolarAxisMajorTickSize(double size);
154  virtual void SetLastRadialAxisMajorTickSize(double size);
155  virtual void SetPolarAxisTickRatioSize(double size);
156  virtual void SetLastAxisTickRatioSize(double size);
157  virtual void SetArcTickRatioSize(double size);
158  virtual void SetPolarAxisMajorTickThickness(double thickness);
159  virtual void SetLastRadialAxisMajorTickThickness(double thickness);
160  virtual void SetArcMajorTickThickness(double thickness);
161  virtual void SetPolarAxisTickRatioThickness(double thickness);
162  virtual void SetLastAxisTickRatioThickness(double thickness);
163  virtual void SetArcTickRatioThickness(double thickness);
164  virtual void SetDeltaAngleMajor(double delta);
165  virtual void SetDeltaAngleMinor(double delta);
166  virtual void SetRadialAxesVisibility(int visible);
167  virtual void SetRadialTitleVisibility(int visible);
168  virtual void SetPolarArcsVisibility(int visible);
169  virtual void SetUse2DMode(int use);
170  virtual void SetRatio(double ratio);
171  virtual double GetDeltaRangeMinor();
172  virtual double GetDeltaRangeMajor();
173 
174  // Description:
175  // Set the renderer to use. Default is to use the
176  // vtkPVRenderView::DEFAULT_RENDERER.
177  vtkSetMacro(RendererType, int);
178  vtkGetMacro(RendererType, int);
179 
180 protected:
182  ~vtkPolarAxesRepresentation() override;
183 
184  int FillInputPortInformation(int port, vtkInformation* info) override;
185  int RequestData(
186  vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector*) override;
187 
188  virtual void InitializeDataBoundsFromData(vtkDataObject* data);
189  virtual void UpdateBounds();
190 
191  // Description:
192  // Adds the representation to the view. This is called from
193  // vtkView::AddRepresentation(). Subclasses should override this method.
194  // Returns true if the addition succeeds.
195  bool AddToView(vtkView* view) override;
196 
197  // Description:
198  // Removes the representation to the view. This is called from
199  // vtkView::RemoveRepresentation(). Subclasses should override this method.
200  // Returns true if the removal succeeds.
201  bool RemoveFromView(vtkView* view) override;
202 
206  double Position[3];
207  double Scale[3];
208  double Orientation[3];
209  double CustomBounds[6];
210  int EnableCustomBounds[3];
211  double CustomRange[2];
213  double DataBounds[6];
217 
218 private:
220  void operator=(const vtkPolarAxesRepresentation&) = delete;
221 };
222 
223 #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.
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
bool RemoveFromView(vtkView *view) override
Making these methods public.
size
static vtkDataRepresentation * New()
vtkWeakPointer< vtkPVRenderView > RenderView
void PrintSelf(ostream &os, vtkIndent indent) override
port
Render View for ParaView.
void MarkModified() override
This is one of the most important functions.
radius
title