00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkCubeAxesActor2D_h
00052 #define __vtkCubeAxesActor2D_h
00053
00054 #include "vtkActor2D.h"
00055
00056 #define VTK_FLY_OUTER_EDGES 0
00057 #define VTK_FLY_CLOSEST_TRIAD 1
00058
00059 class vtkAxisActor2D;
00060 class vtkCamera;
00061 class vtkDataSet;
00062 class vtkTextProperty;
00063
00064 class VTK_HYBRID_EXPORT vtkCubeAxesActor2D : public vtkActor2D
00065 {
00066 public:
00067 vtkTypeRevisionMacro(vtkCubeAxesActor2D,vtkActor2D);
00068 void PrintSelf(ostream& os, vtkIndent indent);
00069
00073 static vtkCubeAxesActor2D *New();
00074
00076
00077 int RenderOverlay(vtkViewport*);
00078 int RenderOpaqueGeometry(vtkViewport*);
00079 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) {return 0;}
00081
00083 virtual int HasTranslucentPolygonalGeometry();
00084
00086
00089 virtual void SetInput(vtkDataSet*);
00090 vtkGetObjectMacro(Input, vtkDataSet);
00092
00094
00096 void SetViewProp(vtkProp* prop);
00097 vtkGetObjectMacro(ViewProp, vtkProp);
00099
00101
00105 vtkSetVector6Macro(Bounds,double);
00106 double *GetBounds();
00107 void GetBounds(double& xmin, double& xmax, double& ymin, double& ymax,
00108 double& zmin, double& zmax);
00109 void GetBounds(double bounds[6]);
00111
00113
00116 vtkSetVector6Macro(Ranges,double);
00117 double *GetRanges();
00118 void GetRanges(double& xmin, double& xmax, double& ymin, double& ymax,
00119 double& zmin, double& zmax);
00120 void GetRanges(double ranges[6]);
00122
00124
00126 vtkSetMacro(UseRanges,int);
00127 vtkGetMacro(UseRanges,int);
00128 vtkBooleanMacro(UseRanges,int);
00130
00132
00134 virtual void SetCamera(vtkCamera*);
00135 vtkGetObjectMacro(Camera,vtkCamera);
00137
00139
00141 vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_CLOSEST_TRIAD);
00142 vtkGetMacro(FlyMode, int);
00143 void SetFlyModeToOuterEdges()
00144 {this->SetFlyMode(VTK_FLY_OUTER_EDGES);};
00145 void SetFlyModeToClosestTriad()
00146 {this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);};
00148
00150
00154 vtkSetMacro(Scaling,int);
00155 vtkGetMacro(Scaling,int);
00156 vtkBooleanMacro(Scaling,int);
00158
00160
00163 vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00164 vtkGetMacro(NumberOfLabels, int);
00166
00168
00170 vtkSetStringMacro(XLabel);
00171 vtkGetStringMacro(XLabel);
00172 vtkSetStringMacro(YLabel);
00173 vtkGetStringMacro(YLabel);
00174 vtkSetStringMacro(ZLabel);
00175 vtkGetStringMacro(ZLabel);
00177
00179
00181 vtkAxisActor2D *GetXAxisActor2D()
00182 {return this->XAxis;}
00183 vtkAxisActor2D *GetYAxisActor2D()
00184 {return this->YAxis;}
00185 vtkAxisActor2D *GetZAxisActor2D()
00186 {return this->ZAxis;}
00188
00190
00192 virtual void SetAxisTitleTextProperty(vtkTextProperty *p);
00193 vtkGetObjectMacro(AxisTitleTextProperty,vtkTextProperty);
00195
00197
00199 virtual void SetAxisLabelTextProperty(vtkTextProperty *p);
00200 vtkGetObjectMacro(AxisLabelTextProperty,vtkTextProperty);
00202
00204
00206 vtkSetStringMacro(LabelFormat);
00207 vtkGetStringMacro(LabelFormat);
00209
00211
00213 vtkSetClampMacro(FontFactor, double, 0.1, 2.0);
00214 vtkGetMacro(FontFactor, double);
00216
00218
00221 vtkSetClampMacro(Inertia, int, 1, VTK_LARGE_INTEGER);
00222 vtkGetMacro(Inertia, int);
00224
00226
00232 vtkSetClampMacro(ShowActualBounds, int, 0, 1);
00233 vtkGetMacro(ShowActualBounds, int);
00235
00237
00240 vtkSetMacro(CornerOffset, double);
00241 vtkGetMacro(CornerOffset, double);
00243
00247 void ReleaseGraphicsResources(vtkWindow *);
00248
00250
00251 vtkSetMacro(XAxisVisibility,int);
00252 vtkGetMacro(XAxisVisibility,int);
00253 vtkBooleanMacro(XAxisVisibility,int);
00254 vtkSetMacro(YAxisVisibility,int);
00255 vtkGetMacro(YAxisVisibility,int);
00256 vtkBooleanMacro(YAxisVisibility,int);
00257 vtkSetMacro(ZAxisVisibility,int);
00258 vtkGetMacro(ZAxisVisibility,int);
00259 vtkBooleanMacro(ZAxisVisibility,int);
00261
00263 void ShallowCopy(vtkCubeAxesActor2D *actor);
00264
00265
00266 #if defined(_COMPILER_VERSION)
00267 # pragma set woff 3303
00268 #endif
00269 #if defined(__INTEL_COMPILER)
00270 # pragma warning (push)
00271 # pragma warning (disable:858)
00272 #endif
00273
00274 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00275 # define SetPropA SetProp
00276 # define SetPropW SetProp
00277 # define GetPropA GetProp
00278 # define GetPropW GetProp
00279 #endif
00280
00283 VTK_LEGACY(virtual void SetProp(vtkProp* prop));
00284
00287 VTK_LEGACY(virtual vtkProp* GetProp());
00288
00289 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00290 # undef SetPropW
00291 # undef SetPropA
00292 # undef GetPropW
00293 # undef GetPropA
00294
00295 VTK_LEGACY(virtual void SetPropA(vtkProp* prop));
00296 VTK_LEGACY(virtual void SetPropW(vtkProp* prop));
00297 VTK_LEGACY(virtual vtkProp* GetPropA());
00298 VTK_LEGACY(virtual vtkProp* GetPropW());
00299
00300 #endif
00301
00302
00303 #if defined(__INTEL_COMPILER)
00304 # pragma warning (pop)
00305 #endif
00306 #if defined(_COMPILER_VERSION)
00307 # pragma reset woff 3303
00308 #endif
00309
00310 protected:
00311 vtkCubeAxesActor2D();
00312 ~vtkCubeAxesActor2D();
00313
00314 vtkDataSet *Input;
00315 vtkProp *ViewProp;
00316 double Bounds[6];
00317 double Ranges[6];
00318 int UseRanges;
00319
00320 vtkCamera *Camera;
00321 int FlyMode;
00322 int Scaling;
00323
00324 vtkAxisActor2D *XAxis;
00325 vtkAxisActor2D *YAxis;
00326 vtkAxisActor2D *ZAxis;
00327
00328 vtkTextProperty *AxisTitleTextProperty;
00329 vtkTextProperty *AxisLabelTextProperty;
00330
00331 vtkTimeStamp BuildTime;
00332
00333 int NumberOfLabels;
00334 char *XLabel;
00335 char *YLabel;
00336 char *ZLabel;
00337 char *Labels[3];
00338
00339 int XAxisVisibility;
00340 int YAxisVisibility;
00341 int ZAxisVisibility;
00342
00343 char *LabelFormat;
00344 double FontFactor;
00345 double CornerOffset;
00346 int Inertia;
00347 int RenderCount;
00348 int InertiaAxes[8];
00349
00350 int RenderSomething;
00351
00352
00353 int ShowActualBounds;
00354
00355
00356 void TransformBounds(vtkViewport *viewport, double bounds[6],
00357 double pts[8][3]);
00358 int ClipBounds(vtkViewport *viewport, double pts[8][3], double bounds[6]);
00359 double EvaluatePoint(double planes[24], double x[3]);
00360 double EvaluateBounds(double planes[24], double bounds[6]);
00361 void AdjustAxes(double pts[8][3], double bounds[6],
00362 int idx, int xIdx, int yIdx, int zIdx, int zIdx2,
00363 int xAxes, int yAxes, int zAxes,
00364 double xCoords[4], double yCoords[4], double zCoords[4],
00365 double xRange[2], double yRange[2], double zRange[2]);
00366
00367 private:
00368
00369 void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
00370 private:
00371 vtkCubeAxesActor2D(const vtkCubeAxesActor2D&);
00372 void operator=(const vtkCubeAxesActor2D&);
00373 };
00374
00375
00376 #endif