/usr/include/vtk-6.3/vtkPolarAxesActor.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkCubeAxesActor.h
Language: C++
Date: $Date$
Version: $Revision$
Thanks: Kathleen Bonnell, B Division, Lawrence Livermore Nat'l Laboratory
Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
All rights reserve
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkPolarAxesActor - create an actor of a polar axes -
//
// .SECTION Description
// vtkPolarAxesActor is a composite actor that draws polar axes in a
// specified plane for a give pole.
// Currently the plane has to be the xy plane.
//
// .SECTION Thanks
// This class was written by Philippe Pebay, Kitware SAS 2011.
// This work was supported by CEA/DIF - Commissariat a l'Energie Atomique,
// Centre DAM Ile-De-France, BP12, F-91297 Arpajon, France.
//
// .section See Also
// vtkActor vtkAxisActor vtkPolarAxesActor
#ifndef vtkPolarAxesActor_h
#define vtkPolarAxesActor_h
#define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50
#define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5
#define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS 200
#define VTK_POLAR_ARC_RESOLUTION_PER_DEG 0.2
#include "vtkRenderingAnnotationModule.h" // For export macro
#include "vtkActor.h"
class vtkAxisActor;
class vtkCamera;
class vtkPolyData;
class vtkPolyDataMapper;
class vtkTextProperty;
class VTKRENDERINGANNOTATION_EXPORT vtkPolarAxesActor : public vtkActor
{
public:
vtkTypeMacro(vtkPolarAxesActor,vtkActor);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Instantiate object with label format "6.3g" and the number of labels
// per axis set to 3.
static vtkPolarAxesActor *New();
// Description:
// Draw the polar axes
virtual int RenderOpaqueGeometry(vtkViewport*);
virtual int RenderTranslucentPolygonalGeometry(vtkViewport*) {return 0;};
// Description:
// Explicitly specify the coordinate of the pole.
virtual void SetPole( double[3] );
virtual void SetPole( double, double, double );
vtkGetVector3Macro( Pole, double );
// Description:
// Gets/Sets the number of radial axes
virtual void SetNumberOfRadialAxes( vtkIdType );
vtkGetMacro( NumberOfRadialAxes, vtkIdType );
// Description:
// Gets/Sets the number of ticks and labels along polar axis
// NB: will be overriden if AutoSubdividePolarAxis is true
vtkSetClampMacro( NumberOfPolarAxisTicks, vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS );
vtkGetMacro( NumberOfPolarAxisTicks, vtkIdType );
// Description:
// Set/Get whether the number of polar axis ticks and arcs should be automatically calculated
// Default: true
vtkSetMacro( AutoSubdividePolarAxis, bool );
vtkGetMacro( AutoSubdividePolarAxis, bool );
vtkBooleanMacro( AutoSubdividePolarAxis, bool );
// Description:
// Set/Get the maximum radius of the polar coordinates.
virtual void SetMaximumRadius( double );
vtkGetMacro( MaximumRadius, double );
// Description:
// Turn on and off the auto-scaling of the maximum radius.
// Default: false
vtkSetMacro( AutoScaleRadius,bool );
vtkGetMacro( AutoScaleRadius,bool );
// Description:
// Set/Get the minimum radius of the polar coordinates (in degrees).
virtual void SetMinimumAngle( double );
vtkGetMacro( MinimumAngle, double );
// Description:
// Set/Get the maximum radius of the polar coordinates (in degrees).
virtual void SetMaximumAngle( double );
vtkGetMacro( MaximumAngle, double );
// Description:
// Set/Get the minimum radial angle distinguishable from polar axis
// NB: This is used only when polar axis is visible
// Default: 0.5
vtkSetClampMacro( SmallestVisiblePolarAngle, double, 0., 5. );
vtkGetMacro( SmallestVisiblePolarAngle, double );
// Description: Set/Get whether angle units (degrees) are used to label radial axes
// Default: true
vtkSetMacro( RadialUnits, bool );
vtkGetMacro( RadialUnits, bool );
// Description:
// Explicitly specify the screen size of title and label text.
// ScreenSize detemines the size of the text in terms of screen
// pixels.
// Default: 10.0.
void SetScreenSize( double screenSize );
vtkGetMacro( ScreenSize, double );
// Description:
// Set/Get the camera to perform scaling and translation of the
// vtkPolarAxesActor.
virtual void SetCamera(vtkCamera*);
vtkGetObjectMacro( Camera,vtkCamera );
// Description:
// Set/Get the labels for the polar axis.
// Default: "Radial Distance".
vtkSetStringMacro( PolarAxisTitle );
vtkGetStringMacro( PolarAxisTitle );
// Description:
// Set/Get the format with which to print the polar axis labels.
vtkSetStringMacro( PolarLabelFormat );
vtkGetStringMacro( PolarLabelFormat );
// Description:
// Release any graphics resources that are being consumed by this actor.
// The parameter window could be used to determine which graphic
// resources to release.
void ReleaseGraphicsResources( vtkWindow* );
// Description:
// Enable and disable the use of distance based LOD for titles and labels.
vtkSetMacro( EnableDistanceLOD, int );
vtkGetMacro( EnableDistanceLOD, int );
// Description:a
// Set distance LOD threshold [0.0 - 1.0] for titles and labels.
vtkSetClampMacro( DistanceLODThreshold, double, 0.0, 1.0 );
vtkGetMacro( DistanceLODThreshold, double);
// Description:
// Enable and disable the use of view angle based LOD for titles and labels.
vtkSetMacro( EnableViewAngleLOD, int );
vtkGetMacro( EnableViewAngleLOD, int );
// Description:
// Set view angle LOD threshold [0.0 - 1.0] for titles and labels.
vtkSetClampMacro( ViewAngleLODThreshold, double, 0., 1. );
vtkGetMacro( ViewAngleLODThreshold, double );
// Description:
// Turn on and off the visibility of the polar axis.
vtkSetMacro( PolarAxisVisibility, int );
vtkGetMacro( PolarAxisVisibility, int );
vtkBooleanMacro( PolarAxisVisibility, int );
// Description:
// Turn on and off the visibility of titles for polar axis.
vtkSetMacro( PolarTitleVisibility, int );
vtkGetMacro( PolarTitleVisibility, int );
vtkBooleanMacro( PolarTitleVisibility, int );
// Description:
// Turn on and off the visibility of labels for polar axis.
vtkSetMacro( PolarLabelVisibility, int );
vtkGetMacro( PolarLabelVisibility, int );
vtkBooleanMacro( PolarLabelVisibility, int );
// Description:
// Turn on and off the visibility of ticks for polar axis.
vtkSetMacro( PolarTickVisibility, int );
vtkGetMacro( PolarTickVisibility, int );
vtkBooleanMacro( PolarTickVisibility, int );
// Description:
// Turn on and off the visibility of non-polar radial axes.
vtkSetMacro( RadialAxesVisibility, int );
vtkGetMacro( RadialAxesVisibility, int );
vtkBooleanMacro( RadialAxesVisibility, int );
// Description:
// Turn on and off the visibility of titles for non-polar radial axes.
vtkSetMacro( RadialTitleVisibility, int );
vtkGetMacro( RadialTitleVisibility, int );
vtkBooleanMacro( RadialTitleVisibility, int );
// Description:
// Turn on and off the visibility of arcs for polar axis.
vtkSetMacro( PolarArcsVisibility, int );
vtkGetMacro( PolarArcsVisibility, int );
vtkBooleanMacro( PolarArcsVisibility, int );
// Description:
// Set/Get the polar axis title text property.
virtual void SetPolarAxisTitleTextProperty(vtkTextProperty *p);
vtkGetObjectMacro(PolarAxisTitleTextProperty,vtkTextProperty);
// Description:
// Set/Get the polar axis labels text property.
virtual void SetPolarAxisLabelTextProperty(vtkTextProperty *p);
vtkGetObjectMacro(PolarAxisLabelTextProperty,vtkTextProperty);
// Description:
// Get/Set polar axis actor properties.
virtual void SetPolarAxisProperty(vtkProperty *);
vtkProperty* GetPolarAxisProperty();
// Description:
// Get/Set radial axes actors properties.
virtual void SetRadialAxesProperty(vtkProperty *);
vtkProperty* GetRadialAxesProperty();
// Description:
// Get/Set polar arcs actors property
virtual void SetPolarArcsProperty(vtkProperty *);
vtkProperty* GetPolarArcsProperty();
// Description:
// Explicitly specify the region in space around which to draw the bounds.
// The bounds are used only when no Input or Prop is specified. The bounds
// are specified according to (xmin,xmax, ymin,ymax, zmin,zmax), making
// sure that the min's are less than the max's.
vtkSetVector6Macro(Bounds,double);
double *GetBounds();
void GetBounds(double& xmin, double& xmax, double& ymin, double& ymax,
double& zmin, double& zmax);
void GetBounds(double bounds[6]);
protected:
vtkPolarAxesActor();
~vtkPolarAxesActor();
// Description:
// Build the axes.
// Determine coordinates, position, etc.
void BuildAxes( vtkViewport * );
// Description:
// Calculate bounds based on maximum radius and angular sector
void CalculateBounds();
// Description:
// Send attributes which are common to all axes, both polar and radial
void SetCommonAxisAttributes( vtkAxisActor* );
// Description:
// Create requested number of type X axes and set followers
void CreateRadialAxes();
// Description:
// Build requested number of radial axes with respect to specified pole.
void BuildRadialAxes();
// Description:
// Prepare ticks on polar axis with respect to coordinate offset
void BuildPolarAxisTicks( double );
// Description:
// Build polar axis labels and arcs with respect to specified pole.
void BuildPolarAxisLabelsArcs();
// Description:
// Convenience methods
double FFix(double );
double FSign(double, double );
// Description:
// Automatically rescale titles and labels
// NB: Current implementation only for perspective projections.
void AutoScale( vtkViewport* viewport );
// Description:
// Coordinates of the pole
// Default: (0,0,0).
double Pole[3];
// Description:
// Number of radial axes
// Default: VTK_DEFAULT_NUMBER_OF_RADIAL_AXES
int NumberOfRadialAxes;
// Description:
// Number of polar arcs
int NumberOfPolarAxisTicks;
// Description:
// Whether the number of polar axis ticks and arcs should be automatically calculated
// Default: TRUE
bool AutoSubdividePolarAxis;
// Description:
// Maximum polar radius (minimum is always 0)
// Default: 1
double MaximumRadius;
// Description:
// Auto-scale polar radius (with respect to average length scale of x-y bounding box)
bool AutoScaleRadius;
// Description:
// Minimum polar angle
// Default: 0.
double MinimumAngle;
// Description:
// Maximum polar angle
// Default: 90.
double MaximumAngle;
// Description:
// Smallest radial angle distinguishable from polar axis
double SmallestVisiblePolarAngle;
// Description:
// Explicit actor bounds
double Bounds[6];
// Description:
// Structures for polar arcs
vtkPolyData *PolarArcs;
vtkPolyDataMapper *PolarArcsMapper;
vtkActor *PolarArcsActor;
// Description:
// Camera attached to the polar axes system
vtkCamera *Camera;
// Description:
// Control variables for polar axis
vtkAxisActor* PolarAxis;
// Description:
// Control variables for non-polar radial axes
vtkAxisActor** RadialAxes;
// Description:
// Title to be used for the polar axis
// NB: Non-polar radial axes use the polar angle as title and have no labels
char *PolarAxisTitle;
char *PolarLabelFormat;
// Description:
// Display angle units (degrees) to label radial axes
// Default is true
bool RadialUnits;
// Description:
// If enabled the actor will not be visible at a certain distance from the camera.
// Default is true
int EnableDistanceLOD;
// Description:
// Default is 0.80
// This determines at what fraction of camera far clip range, actor is not visible.
double DistanceLODThreshold;
// Description:
// If enabled the actor will not be visible at a certain view angle.
// Default is true.
int EnableViewAngleLOD;
// Description:
// This determines at what view angle to geometry will make the geometry not visibile.
// Default is 0.3.
double ViewAngleLODThreshold;
// Description:
// Visibility of polar axis and its title, labels, ticks (major only)
int PolarAxisVisibility;
int PolarTitleVisibility;
int PolarLabelVisibility;
int PolarTickVisibility;
// Description:
// Visibility of radial axes and their titles
int RadialAxesVisibility;
int RadialTitleVisibility;
// Description:
// Visibility of polar arcs
int PolarArcsVisibility;
int RenderCount;
int RenderSomething;
// Description:
// Text properties of polar axis title and labels
vtkTextProperty *PolarAxisTitleTextProperty;
vtkTextProperty *PolarAxisLabelTextProperty;
// Description:
// General properties of polar axis
vtkProperty* PolarAxisProperty;
// Description:
// General properties of radial axes
vtkProperty* RadialAxesProperty;
vtkTimeStamp BuildTime;
// Description:
// Title scale factor
double TitleScale;
// Description:
// Label scale factor
double LabelScale;
// Description:
// Label screen offset
double LabelScreenOffset;
// Description:
// Text screen size
double ScreenSize;
private:
vtkPolarAxesActor( const vtkPolarAxesActor& ); // Not implemented
void operator=( const vtkPolarAxesActor& ); // Not implemented
};
#endif
|