00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00048 #ifndef __vtkCubeAxesActor2D_h
00049 #define __vtkCubeAxesActor2D_h
00050
00051 #include "vtkActor2D.h"
00052
00053 #define VTK_FLY_OUTER_EDGES 0
00054 #define VTK_FLY_CLOSEST_TRIAD 1
00055
00056 class vtkAxisActor2D;
00057 class vtkCamera;
00058 class vtkDataSet;
00059 class vtkTextProperty;
00060
00061 class VTK_HYBRID_EXPORT vtkCubeAxesActor2D : public vtkActor2D
00062 {
00063 public:
00064 vtkTypeRevisionMacro(vtkCubeAxesActor2D,vtkActor2D);
00065 void PrintSelf(ostream& os, vtkIndent indent);
00066
00070 static vtkCubeAxesActor2D *New();
00071
00073
00074 int RenderOverlay(vtkViewport*);
00075 int RenderOpaqueGeometry(vtkViewport*);
00076 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) {return 0;}
00078
00080 virtual int HasTranslucentPolygonalGeometry();
00081
00083
00086 virtual void SetInput(vtkDataSet*);
00087 vtkGetObjectMacro(Input, vtkDataSet);
00089
00091
00093 void SetViewProp(vtkProp* prop);
00094 vtkGetObjectMacro(ViewProp, vtkProp);
00096
00098
00102 vtkSetVector6Macro(Bounds,double);
00103 double *GetBounds();
00104 void GetBounds(double& xmin, double& xmax, double& ymin, double& ymax,
00105 double& zmin, double& zmax);
00106 void GetBounds(double bounds[6]);
00108
00110
00113 vtkSetVector6Macro(Ranges,double);
00114 double *GetRanges();
00115 void GetRanges(double& xmin, double& xmax, double& ymin, double& ymax,
00116 double& zmin, double& zmax);
00117 void GetRanges(double ranges[6]);
00119
00121
00123 vtkSetMacro(UseRanges,int);
00124 vtkGetMacro(UseRanges,int);
00125 vtkBooleanMacro(UseRanges,int);
00127
00129
00131 virtual void SetCamera(vtkCamera*);
00132 vtkGetObjectMacro(Camera,vtkCamera);
00134
00136
00138 vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_CLOSEST_TRIAD);
00139 vtkGetMacro(FlyMode, int);
00140 void SetFlyModeToOuterEdges()
00141 {this->SetFlyMode(VTK_FLY_OUTER_EDGES);};
00142 void SetFlyModeToClosestTriad()
00143 {this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);};
00145
00147
00151 vtkSetMacro(Scaling,int);
00152 vtkGetMacro(Scaling,int);
00153 vtkBooleanMacro(Scaling,int);
00155
00157
00160 vtkSetClampMacro(NumberOfLabels, int, 0, 50);
00161 vtkGetMacro(NumberOfLabels, int);
00163
00165
00167 vtkSetStringMacro(XLabel);
00168 vtkGetStringMacro(XLabel);
00169 vtkSetStringMacro(YLabel);
00170 vtkGetStringMacro(YLabel);
00171 vtkSetStringMacro(ZLabel);
00172 vtkGetStringMacro(ZLabel);
00174
00176
00178 vtkAxisActor2D *GetXAxisActor2D()
00179 {return this->XAxis;}
00180 vtkAxisActor2D *GetYAxisActor2D()
00181 {return this->YAxis;}
00182 vtkAxisActor2D *GetZAxisActor2D()
00183 {return this->ZAxis;}
00185
00187
00189 virtual void SetAxisTitleTextProperty(vtkTextProperty *p);
00190 vtkGetObjectMacro(AxisTitleTextProperty,vtkTextProperty);
00192
00194
00196 virtual void SetAxisLabelTextProperty(vtkTextProperty *p);
00197 vtkGetObjectMacro(AxisLabelTextProperty,vtkTextProperty);
00199
00201
00203 vtkSetStringMacro(LabelFormat);
00204 vtkGetStringMacro(LabelFormat);
00206
00208
00210 vtkSetClampMacro(FontFactor, double, 0.1, 2.0);
00211 vtkGetMacro(FontFactor, double);
00213
00215
00218 vtkSetClampMacro(Inertia, int, 1, VTK_LARGE_INTEGER);
00219 vtkGetMacro(Inertia, int);
00221
00223
00229 vtkSetClampMacro(ShowActualBounds, int, 0, 1);
00230 vtkGetMacro(ShowActualBounds, int);
00232
00234
00237 vtkSetMacro(CornerOffset, double);
00238 vtkGetMacro(CornerOffset, double);
00240
00244 void ReleaseGraphicsResources(vtkWindow *);
00245
00247
00248 vtkSetMacro(XAxisVisibility,int);
00249 vtkGetMacro(XAxisVisibility,int);
00250 vtkBooleanMacro(XAxisVisibility,int);
00251 vtkSetMacro(YAxisVisibility,int);
00252 vtkGetMacro(YAxisVisibility,int);
00253 vtkBooleanMacro(YAxisVisibility,int);
00254 vtkSetMacro(ZAxisVisibility,int);
00255 vtkGetMacro(ZAxisVisibility,int);
00256 vtkBooleanMacro(ZAxisVisibility,int);
00258
00260 void ShallowCopy(vtkCubeAxesActor2D *actor);
00261
00262
00263 #if defined(_COMPILER_VERSION)
00264 # pragma set woff 3303
00265 #endif
00266 #if defined(__INTEL_COMPILER)
00267 # pragma warning (push)
00268 # pragma warning (disable:858)
00269 #endif
00270
00271 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00272 # define SetPropA SetProp
00273 # define SetPropW SetProp
00274 # define GetPropA GetProp
00275 # define GetPropW GetProp
00276 #endif
00277
00280 VTK_LEGACY(virtual void SetProp(vtkProp* prop));
00281
00284 VTK_LEGACY(virtual vtkProp* GetProp());
00285
00286 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00287 # undef SetPropW
00288 # undef SetPropA
00289 # undef GetPropW
00290 # undef GetPropA
00291
00292 VTK_LEGACY(virtual void SetPropA(vtkProp* prop));
00293 VTK_LEGACY(virtual void SetPropW(vtkProp* prop));
00294 VTK_LEGACY(virtual vtkProp* GetPropA());
00295 VTK_LEGACY(virtual vtkProp* GetPropW());
00296
00297 #endif
00298
00299
00300 #if defined(__INTEL_COMPILER)
00301 # pragma warning (pop)
00302 #endif
00303 #if defined(_COMPILER_VERSION)
00304 # pragma reset woff 3303
00305 #endif
00306
00307 protected:
00308 vtkCubeAxesActor2D();
00309 ~vtkCubeAxesActor2D();
00310
00311 vtkDataSet *Input;
00312 vtkProp *ViewProp;
00313 double Bounds[6];
00314 double Ranges[6];
00315 int UseRanges;
00316
00317 vtkCamera *Camera;
00318 int FlyMode;
00319 int Scaling;
00320
00321 vtkAxisActor2D *XAxis;
00322 vtkAxisActor2D *YAxis;
00323 vtkAxisActor2D *ZAxis;
00324
00325 vtkTextProperty *AxisTitleTextProperty;
00326 vtkTextProperty *AxisLabelTextProperty;
00327
00328 vtkTimeStamp BuildTime;
00329
00330 int NumberOfLabels;
00331 char *XLabel;
00332 char *YLabel;
00333 char *ZLabel;
00334 char *Labels[3];
00335
00336 int XAxisVisibility;
00337 int YAxisVisibility;
00338 int ZAxisVisibility;
00339
00340 char *LabelFormat;
00341 double FontFactor;
00342 double CornerOffset;
00343 int Inertia;
00344 int RenderCount;
00345 int InertiaAxes[8];
00346
00347 int RenderSomething;
00348
00349
00350 int ShowActualBounds;
00351
00352
00353 void TransformBounds(vtkViewport *viewport, double bounds[6],
00354 double pts[8][3]);
00355 int ClipBounds(vtkViewport *viewport, double pts[8][3], double bounds[6]);
00356 double EvaluatePoint(double planes[24], double x[3]);
00357 double EvaluateBounds(double planes[24], double bounds[6]);
00358 void AdjustAxes(double pts[8][3], double bounds[6],
00359 int idx, int xIdx, int yIdx, int zIdx, int zIdx2,
00360 int xAxes, int yAxes, int zAxes,
00361 double xCoords[4], double yCoords[4], double zCoords[4],
00362 double xRange[2], double yRange[2], double zRange[2]);
00363
00364 private:
00365
00366 void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
00367 private:
00368 vtkCubeAxesActor2D(const vtkCubeAxesActor2D&);
00369 void operator=(const vtkCubeAxesActor2D&);
00370 };
00371
00372
00373 #endif