Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkCubeAxesActor2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCubeAxesActor2D.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   int RenderTranslucentGeometry(vtkViewport *) {return 0;}
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 // Disable warnings about qualifiers on return types.
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 const SetProp(vtkProp* prop));
00281 
00284   VTK_LEGACY(virtual vtkProp* const GetProp());
00285 
00286 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00287 # undef SetPropW
00288 # undef SetPropA
00289 # undef GetPropW
00290 # undef GetPropA
00291   //BTX
00292   VTK_LEGACY(virtual void const SetPropA(vtkProp* prop));
00293   VTK_LEGACY(virtual void const SetPropW(vtkProp* prop));
00294   VTK_LEGACY(virtual vtkProp* const GetPropA());
00295   VTK_LEGACY(virtual vtkProp* const GetPropW());
00296   //ETX
00297 #endif
00298 
00299 // Reset disabled warning about qualifiers on return types.
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;    //Define bounds from input data, or
00312   vtkProp    *ViewProp;     //Define bounds from actor/assembly, or
00313   double      Bounds[6]; //Define bounds explicitly
00314   double      Ranges[6]; //Define ranges explicitly
00315   int        UseRanges; //Flag to use ranges or not
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   // Always show the actual bounds of the object
00350   int ShowActualBounds;
00351   
00352   // various helper methods
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   // hide the superclass' ShallowCopy() from the user and the compiler.
00366   void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
00367 private:
00368   vtkCubeAxesActor2D(const vtkCubeAxesActor2D&);  // Not implemented.
00369   void operator=(const vtkCubeAxesActor2D&);  // Not implemented.
00370 };
00371 
00372 
00373 #endif

Generated on Mon Jan 21 23:07:27 2008 for VTK by  doxygen 1.4.3-20050530