/usr/include/vtk-6.3/vtkCubeAxesActor2D.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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkCubeAxesActor2D.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
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 vtkCubeAxesActor2D - create a 2D plot of a bounding box edges - used for navigation
// .SECTION Description
// vtkCubeAxesActor2D is a composite actor that draws three axes of the
// bounding box of an input dataset. The axes include labels and titles
// for the x-y-z axes. The algorithm selects the axes that are on the
// "exterior" of the bounding box, exterior as determined from examining
// outer edges of the bounding box in projection (display) space. Alternatively,
// the edges closest to the viewer (i.e., camera position) can be drawn.
//
// To use this object you must define a bounding box and the camera used
// to render the vtkCubeAxesActor2D. The camera is used to control the
// scaling and position of the vtkCubeAxesActor2D so that it fits in the
// viewport and always remains visible.)
//
// The font property of the axes titles and labels can be modified through the
// AxisTitleTextProperty and AxisLabelTextProperty attributes. You may also
// use the GetXAxisActor2D, GetYAxisActor2D or GetZAxisActor2D methods
// to access each individual axis actor to modify their font properties.
//
// The bounding box to use is defined in one of three ways. First, if the Input
// ivar is defined, then the input dataset's bounds is used. If the Input is
// not defined, and the Prop (superclass of all actors) is defined, then the
// Prop's bounds is used. If neither the Input or Prop is defined, then the
// Bounds instance variable (an array of six doubles) is used.
//
// .SECTION See Also
// vtkActor2D vtkAxisActor2D vtkXYPlotActor vtkTextProperty
#ifndef vtkCubeAxesActor2D_h
#define vtkCubeAxesActor2D_h
#include "vtkRenderingAnnotationModule.h" // For export macro
#include "vtkActor2D.h"
#define VTK_FLY_OUTER_EDGES 0
#define VTK_FLY_CLOSEST_TRIAD 1
#define VTK_FLY_NONE 2
class vtkAlgorithmOutput;
class vtkAxisActor2D;
class vtkCamera;
class vtkCubeAxesActor2DConnection;
class vtkDataSet;
class vtkTextProperty;
class VTKRENDERINGANNOTATION_EXPORT vtkCubeAxesActor2D : public vtkActor2D
{
public:
vtkTypeMacro(vtkCubeAxesActor2D,vtkActor2D);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Instantiate object with bold, italic, and shadow enabled; font family
// set to Arial; and label format "6.3g". The number of labels per axis
// is set to 3.
static vtkCubeAxesActor2D *New();
// Description:
// Draw the axes as per the vtkProp superclass' API.
int RenderOverlay(vtkViewport*);
int RenderOpaqueGeometry(vtkViewport*);
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) {return 0;}
// Description:
// Does this prop have some translucent polygonal geometry?
virtual int HasTranslucentPolygonalGeometry();
// Description:
// Use the bounding box of this input dataset to draw the cube axes. If this
// is not specified, then the class will attempt to determine the bounds from
// the defined Prop or Bounds.
virtual void SetInputConnection(vtkAlgorithmOutput*);
virtual void SetInputData(vtkDataSet*);
virtual vtkDataSet* GetInput();
// Description:
// Use the bounding box of this prop to draw the cube axes. The
// ViewProp is used to determine the bounds only if the Input is not
// defined.
void SetViewProp(vtkProp* prop);
vtkGetObjectMacro(ViewProp, vtkProp);
// Description:
// Explicitly specify the region in space around which to draw the bounds.
// The bounds is 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]);
// Description:
// Explicitly specify the range of values used on the bounds.
// The ranges are specified according to (xmin,xmax, ymin,ymax, zmin,zmax),
// making sure that the min's are less than the max's.
vtkSetVector6Macro(Ranges,double);
double *GetRanges();
void GetRanges(double& xmin, double& xmax, double& ymin, double& ymax,
double& zmin, double& zmax);
void GetRanges(double ranges[6]);
// Description:
// Explicitly specify an origin for the axes. These usually intersect at one of the
// corners of the bounding box, however users have the option to override this if
// necessary
vtkSetMacro( XOrigin, double );
vtkSetMacro( YOrigin, double );
vtkSetMacro( ZOrigin, double );
// Description:
// Set/Get a flag that controls whether the axes use the data ranges
// or the ranges set by SetRanges. By default the axes use the data
// ranges.
vtkSetMacro(UseRanges,int);
vtkGetMacro(UseRanges,int);
vtkBooleanMacro(UseRanges,int);
// Description:
// Set/Get the camera to perform scaling and translation of the
// vtkCubeAxesActor2D.
virtual void SetCamera(vtkCamera*);
vtkGetObjectMacro(Camera,vtkCamera);
// Description:
// Specify a mode to control how the axes are drawn: either outer edges
// or closest triad to the camera position, or you may also disable flying
// of the axes.
vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_NONE);
vtkGetMacro(FlyMode, int);
void SetFlyModeToOuterEdges()
{this->SetFlyMode(VTK_FLY_OUTER_EDGES);};
void SetFlyModeToClosestTriad()
{this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);};
void SetFlyModeToNone()
{this->SetFlyMode(VTK_FLY_NONE);};
// Description:
// Set/Get a flag that controls whether the axes are scaled to fit in
// the viewport. If off, the axes size remains constant (i.e., stay the
// size of the bounding box). By default scaling is on so the axes are
// scaled to fit inside the viewport.
vtkSetMacro(Scaling,int);
vtkGetMacro(Scaling,int);
vtkBooleanMacro(Scaling,int);
// Description:
// Set/Get the number of annotation labels to show along the x, y, and
// z axes. This values is a suggestion: the number of labels may vary
// depending on the particulars of the data.
vtkSetClampMacro(NumberOfLabels, int, 0, 50);
vtkGetMacro(NumberOfLabels, int);
// Description:
// Set/Get the labels for the x, y, and z axes. By default,
// use "X", "Y" and "Z".
vtkSetStringMacro(XLabel);
vtkGetStringMacro(XLabel);
vtkSetStringMacro(YLabel);
vtkGetStringMacro(YLabel);
vtkSetStringMacro(ZLabel);
vtkGetStringMacro(ZLabel);
// Description:
// Retrieve handles to the X, Y and Z axis (so that you can set their text
// properties for example)
vtkAxisActor2D *GetXAxisActor2D()
{return this->XAxis;}
vtkAxisActor2D *GetYAxisActor2D()
{return this->YAxis;}
vtkAxisActor2D *GetZAxisActor2D()
{return this->ZAxis;}
// Description:
// Set/Get the title text property of all axes. Note that each axis can
// be controlled individually through the GetX/Y/ZAxisActor2D() methods.
virtual void SetAxisTitleTextProperty(vtkTextProperty *p);
vtkGetObjectMacro(AxisTitleTextProperty,vtkTextProperty);
// Description:
// Set/Get the labels text property of all axes. Note that each axis can
// be controlled individually through the GetX/Y/ZAxisActor2D() methods.
virtual void SetAxisLabelTextProperty(vtkTextProperty *p);
vtkGetObjectMacro(AxisLabelTextProperty,vtkTextProperty);
// Description:
// Set/Get the format with which to print the labels on each of the
// x-y-z axes.
vtkSetStringMacro(LabelFormat);
vtkGetStringMacro(LabelFormat);
// Description:
// Set/Get the factor that controls the overall size of the fonts used
// to label and title the axes.
vtkSetClampMacro(FontFactor, double, 0.1, 2.0);
vtkGetMacro(FontFactor, double);
// Description:
// Set/Get the inertial factor that controls how often (i.e, how
// many renders) the axes can switch position (jump from one axes
// to another).
vtkSetClampMacro(Inertia, int, 1, VTK_INT_MAX);
vtkGetMacro(Inertia, int);
// Description:
// Set/Get the variable that controls whether the actual
// bounds of the dataset are always shown. Setting this variable
// to 1 means that clipping is disabled and that the actual
// value of the bounds is displayed even with corner offsets
// Setting this variable to 0 means these axis will clip
// themselves and show variable bounds (legacy mode)
vtkSetClampMacro(ShowActualBounds, int, 0, 1);
vtkGetMacro(ShowActualBounds, int);
// Description:
// Specify an offset value to "pull back" the axes from the corner at
// which they are joined to avoid overlap of axes labels. The
// "CornerOffset" is the fraction of the axis length to pull back.
vtkSetMacro(CornerOffset, double);
vtkGetMacro(CornerOffset, double);
// 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:
// Turn on and off the visibility of each axis.
vtkSetMacro(XAxisVisibility,int);
vtkGetMacro(XAxisVisibility,int);
vtkBooleanMacro(XAxisVisibility,int);
vtkSetMacro(YAxisVisibility,int);
vtkGetMacro(YAxisVisibility,int);
vtkBooleanMacro(YAxisVisibility,int);
vtkSetMacro(ZAxisVisibility,int);
vtkGetMacro(ZAxisVisibility,int);
vtkBooleanMacro(ZAxisVisibility,int);
// Description:
// Shallow copy of a CubeAxesActor2D.
void ShallowCopy(vtkCubeAxesActor2D *actor);
protected:
vtkCubeAxesActor2D();
~vtkCubeAxesActor2D();
vtkCubeAxesActor2DConnection* ConnectionHolder;
vtkProp *ViewProp; //Define bounds from actor/assembly, or
double Bounds[6]; //Define bounds explicitly
double Ranges[6]; //Define ranges explicitly
int UseRanges; //Flag to use ranges or not
vtkCamera *Camera;
int FlyMode;
int Scaling;
vtkAxisActor2D *XAxis;
vtkAxisActor2D *YAxis;
vtkAxisActor2D *ZAxis;
vtkTextProperty *AxisTitleTextProperty;
vtkTextProperty *AxisLabelTextProperty;
vtkTimeStamp BuildTime;
int NumberOfLabels;
char *XLabel;
char *YLabel;
char *ZLabel;
char *Labels[3];
int XAxisVisibility;
int YAxisVisibility;
int ZAxisVisibility;
char *LabelFormat;
double FontFactor;
double CornerOffset;
int Inertia;
int RenderCount;
int InertiaAxes[8];
int RenderSomething;
// Always show the actual bounds of the object
int ShowActualBounds;
double XOrigin;
double YOrigin;
double ZOrigin;
// various helper methods
void TransformBounds(vtkViewport *viewport, double bounds[6],
double pts[8][3]);
int ClipBounds(vtkViewport *viewport, double pts[8][3], double bounds[6]);
double EvaluatePoint(double planes[24], double x[3]);
double EvaluateBounds(double planes[24], double bounds[6]);
void AdjustAxes(double pts[8][3], double bounds[6],
int idx, int xIdx, int yIdx, int zIdx, int zIdx2,
int xAxes, int yAxes, int zAxes,
double xCoords[4], double yCoords[4], double zCoords[4],
double xRange[2], double yRange[2], double zRange[2]);
private:
// hide the superclass' ShallowCopy() from the user and the compiler.
void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
private:
vtkCubeAxesActor2D(const vtkCubeAxesActor2D&); // Not implemented.
void operator=(const vtkCubeAxesActor2D&); // Not implemented.
};
#endif
|