VTK
vtkPolarAxesActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCubeAxesActor.h
5  Language: C++
6 
7 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
8 All rights reserve
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 =========================================================================*/
41 #ifndef vtkPolarAxesActor_h
42 #define vtkPolarAxesActor_h
43 
44 #define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50
45 #define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5
46 #define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS 200
47 #define VTK_POLAR_ARC_RESOLUTION_PER_DEG 0.2
48 
49 #include "vtkRenderingAnnotationModule.h" // For export macro
50 #include "vtkActor.h"
51 
52 class vtkAxisActor;
53 class vtkCamera;
54 class vtkPolyData;
55 class vtkPolyDataMapper;
56 class vtkTextProperty;
57 
59 {
60 public:
61  vtkTypeMacro(vtkPolarAxesActor,vtkActor);
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
66  static vtkPolarAxesActor *New();
67 
69 
70  virtual int RenderOpaqueGeometry(vtkViewport*);
73 
75 
76  virtual void SetPole( double[3] );
77  virtual void SetPole( double, double, double );
78  vtkGetVector3Macro( Pole, double );
80 
82 
83  virtual void SetNumberOfRadialAxes( vtkIdType );
84  vtkGetMacro( NumberOfRadialAxes, vtkIdType );
86 
88 
90  vtkSetClampMacro( NumberOfPolarAxisTicks, vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS );
91  vtkGetMacro( NumberOfPolarAxisTicks, vtkIdType );
93 
95 
97  vtkSetMacro( AutoSubdividePolarAxis, bool );
98  vtkGetMacro( AutoSubdividePolarAxis, bool );
99  vtkBooleanMacro( AutoSubdividePolarAxis, bool );
101 
103 
104  virtual void SetMaximumRadius( double );
105  vtkGetMacro( MaximumRadius, double );
107 
109 
111  vtkSetMacro( AutoScaleRadius,bool );
112  vtkGetMacro( AutoScaleRadius,bool );
114 
116 
117  virtual void SetMinimumAngle( double );
118  vtkGetMacro( MinimumAngle, double );
120 
122 
123  virtual void SetMaximumAngle( double );
124  vtkGetMacro( MaximumAngle, double );
126 
128 
130  vtkSetClampMacro( SmallestVisiblePolarAngle, double, 0., 5. );
131  vtkGetMacro( SmallestVisiblePolarAngle, double );
133 
135 
136  vtkSetMacro( RadialUnits, bool );
137  vtkGetMacro( RadialUnits, bool );
139 
141 
144  void SetScreenSize( double screenSize );
145  vtkGetMacro( ScreenSize, double );
147 
149 
151  virtual void SetCamera(vtkCamera*);
152  vtkGetObjectMacro( Camera,vtkCamera );
154 
156 
157  vtkSetStringMacro( PolarAxisTitle );
158  vtkGetStringMacro( PolarAxisTitle );
160 
162 
163  vtkSetStringMacro( PolarLabelFormat );
164  vtkGetStringMacro( PolarLabelFormat );
166 
171 
173 
175  vtkSetMacro( EnableDistanceLOD, int );
176  vtkGetMacro( EnableDistanceLOD, int );
178 
180 
181  vtkSetClampMacro( DistanceLODThreshold, double, 0.0, 1.0 );
182  vtkGetMacro( DistanceLODThreshold, double);
184 
186 
188  vtkSetMacro( EnableViewAngleLOD, int );
189  vtkGetMacro( EnableViewAngleLOD, int );
191 
193 
194  vtkSetClampMacro( ViewAngleLODThreshold, double, 0., 1. );
195  vtkGetMacro( ViewAngleLODThreshold, double );
197 
199 
200  vtkSetMacro( PolarAxisVisibility, int );
201  vtkGetMacro( PolarAxisVisibility, int );
202  vtkBooleanMacro( PolarAxisVisibility, int );
204 
206 
207  vtkSetMacro( PolarTitleVisibility, int );
208  vtkGetMacro( PolarTitleVisibility, int );
209  vtkBooleanMacro( PolarTitleVisibility, int );
211 
213 
214  vtkSetMacro( PolarLabelVisibility, int );
215  vtkGetMacro( PolarLabelVisibility, int );
216  vtkBooleanMacro( PolarLabelVisibility, int );
218 
220 
221  vtkSetMacro( PolarTickVisibility, int );
222  vtkGetMacro( PolarTickVisibility, int );
223  vtkBooleanMacro( PolarTickVisibility, int );
225 
227 
228  vtkSetMacro( RadialAxesVisibility, int );
229  vtkGetMacro( RadialAxesVisibility, int );
230  vtkBooleanMacro( RadialAxesVisibility, int );
232 
234 
235  vtkSetMacro( RadialTitleVisibility, int );
236  vtkGetMacro( RadialTitleVisibility, int );
237  vtkBooleanMacro( RadialTitleVisibility, int );
239 
241 
242  vtkSetMacro( PolarArcsVisibility, int );
243  vtkGetMacro( PolarArcsVisibility, int );
244  vtkBooleanMacro( PolarArcsVisibility, int );
246 
248 
249  virtual void SetPolarAxisTitleTextProperty(vtkTextProperty *p);
250  vtkGetObjectMacro(PolarAxisTitleTextProperty,vtkTextProperty);
252 
254 
255  virtual void SetPolarAxisLabelTextProperty(vtkTextProperty *p);
256  vtkGetObjectMacro(PolarAxisLabelTextProperty,vtkTextProperty);
258 
260 
261  virtual void SetPolarAxisProperty(vtkProperty *);
262  vtkProperty* GetPolarAxisProperty();
264 
266 
267  virtual void SetRadialAxesProperty(vtkProperty *);
268  vtkProperty* GetRadialAxesProperty();
270 
272 
273  virtual void SetPolarArcsProperty(vtkProperty *);
274  vtkProperty* GetPolarArcsProperty();
276 
278 
282  vtkSetVector6Macro(Bounds,double);
283  double *GetBounds();
284  void GetBounds(double& xmin, double& xmax, double& ymin, double& ymax,
285  double& zmin, double& zmax);
286  void GetBounds(double bounds[6]);
288 
289 protected:
292 
294  void BuildAxes( vtkViewport * );
295 
297  void CalculateBounds();
298 
300  void SetCommonAxisAttributes( vtkAxisActor* );
301 
303  void CreateRadialAxes();
304 
306  void BuildRadialAxes();
307 
309  void BuildPolarAxisTicks( double );
310 
312  void BuildPolarAxisLabelsArcs();
313 
315 
316  double FFix(double );
317  double FSign(double, double );
319 
322  void AutoScale( vtkViewport* viewport );
323 
325  double Pole[3];
326 
329 
332 
336 
339 
343 
345  double MinimumAngle;
346 
348  double MaximumAngle;
349 
352 
354  double Bounds[6];
355 
357 
362 
365 
368 
371 
373 
378 
381 
385 
389 
393 
397 
399 
405 
407 
411 
414 
416 
418 
420 
424 
427 
430 
432 
434  double TitleScale;
435 
437  double LabelScale;
438 
441 
443  double ScreenSize;
444 
445 private:
446  vtkPolarAxesActor( const vtkPolarAxesActor& ); // Not implemented
447  void operator=( const vtkPolarAxesActor& ); // Not implemented
448 };
449 
450 
451 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:63
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkPolyDataMapper * PolarArcsMapper
vtkProperty * RadialAxesProperty
#define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS
record modification and/or execution time
Definition: vtkTimeStamp.h:34
Create an axis with tick marks and labels.
Definition: vtkAxisActor.h:93
vtkTextProperty * PolarAxisTitleTextProperty
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
static vtkActor * New()
void PrintSelf(ostream &os, vtkIndent indent)
vtkAxisActor ** RadialAxes
#define VTKRENDERINGANNOTATION_EXPORT
vtkPolyData * PolarArcs
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
vtkProperty * PolarAxisProperty
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
represent text properties.
double * GetBounds()
vtkTimeStamp BuildTime
map vtkPolyData to graphics primitives
vtkAxisActor * PolarAxis
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
void ReleaseGraphicsResources(vtkWindow *)
vtkTextProperty * PolarAxisLabelTextProperty
create an actor of a polar axes -