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

dox/Hybrid/vtkCubeAxesActor2D.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCubeAxesActor2D.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00055 #ifndef __vtkCubeAxesActor2D_h 00056 #define __vtkCubeAxesActor2D_h 00057 00058 #include "vtkActor2D.h" 00059 00060 #define VTK_FLY_OUTER_EDGES 0 00061 #define VTK_FLY_CLOSEST_TRIAD 1 00062 00063 class vtkAxisActor2D; 00064 class vtkCamera; 00065 class vtkDataSet; 00066 class vtkTextProperty; 00067 00068 class VTK_HYBRID_EXPORT vtkCubeAxesActor2D : public vtkActor2D 00069 { 00070 public: 00071 vtkTypeRevisionMacro(vtkCubeAxesActor2D,vtkActor2D); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 00077 static vtkCubeAxesActor2D *New(); 00078 00080 00081 int RenderOverlay(vtkViewport*); 00082 int RenderOpaqueGeometry(vtkViewport*); 00083 int RenderTranslucentGeometry(vtkViewport *) {return 0;} 00085 00087 00090 virtual void SetInput(vtkDataSet*); 00091 vtkGetObjectMacro(Input, vtkDataSet); 00093 00095 00097 virtual void SetProp(vtkProp*); 00098 vtkGetObjectMacro(Prop, vtkProp); 00100 00102 00106 vtkSetVector6Macro(Bounds,float); 00107 float *GetBounds(); 00108 void GetBounds(float& xmin, float& xmax, float& ymin, float& ymax, 00109 float& zmin, float& zmax); 00110 void GetBounds(float bounds[6]); 00112 00114 00117 vtkSetVector6Macro(Ranges,float); 00118 float *GetRanges(); 00119 void GetRanges(float& xmin, float& xmax, float& ymin, float& ymax, 00120 float& zmin, float& zmax); 00121 void GetRanges(float ranges[6]); 00123 00125 00127 vtkSetMacro(UseRanges,int); 00128 vtkGetMacro(UseRanges,int); 00129 vtkBooleanMacro(UseRanges,int); 00131 00133 00135 virtual void SetCamera(vtkCamera*); 00136 vtkGetObjectMacro(Camera,vtkCamera); 00138 00140 00142 vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_CLOSEST_TRIAD); 00143 vtkGetMacro(FlyMode, int); 00144 void SetFlyModeToOuterEdges() 00145 {this->SetFlyMode(VTK_FLY_OUTER_EDGES);}; 00146 void SetFlyModeToClosestTriad() 00147 {this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);}; 00149 00151 00155 vtkSetMacro(Scaling,int); 00156 vtkGetMacro(Scaling,int); 00157 vtkBooleanMacro(Scaling,int); 00159 00161 00164 vtkSetClampMacro(NumberOfLabels, int, 0, 50); 00165 vtkGetMacro(NumberOfLabels, int); 00167 00169 00171 vtkSetStringMacro(XLabel); 00172 vtkGetStringMacro(XLabel); 00173 vtkSetStringMacro(YLabel); 00174 vtkGetStringMacro(YLabel); 00175 vtkSetStringMacro(ZLabel); 00176 vtkGetStringMacro(ZLabel); 00178 00180 00182 vtkAxisActor2D *GetXAxisActor2D() 00183 {return this->XAxis;} 00184 vtkAxisActor2D *GetYAxisActor2D() 00185 {return this->YAxis;} 00186 vtkAxisActor2D *GetZAxisActor2D() 00187 {return this->ZAxis;} 00189 00191 00193 virtual void SetAxisTitleTextProperty(vtkTextProperty *p); 00194 vtkGetObjectMacro(AxisTitleTextProperty,vtkTextProperty); 00196 00198 00200 virtual void SetAxisLabelTextProperty(vtkTextProperty *p); 00201 vtkGetObjectMacro(AxisLabelTextProperty,vtkTextProperty); 00203 00204 #ifndef VTK_REMOVE_LEGACY_CODE 00205 00206 00211 virtual void SetFontFamily(int val); 00212 virtual int GetFontFamily(); 00213 void SetFontFamilyToArial() { this->SetFontFamily(VTK_ARIAL); }; 00214 void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);}; 00215 void SetFontFamilyToTimes() { this->SetFontFamily(VTK_TIMES); }; 00217 #endif 00218 00219 #ifndef VTK_REMOVE_LEGACY_CODE 00220 00221 00224 virtual void SetBold(int val); 00225 virtual int GetBold(); 00226 vtkBooleanMacro(Bold, int); 00228 #endif 00229 00230 #ifndef VTK_REMOVE_LEGACY_CODE 00231 00232 00235 virtual void SetItalic(int val); 00236 virtual int GetItalic(); 00237 vtkBooleanMacro(Italic, int); 00239 #endif 00240 00241 #ifndef VTK_REMOVE_LEGACY_CODE 00242 00243 00246 virtual void SetShadow(int val); 00247 virtual int GetShadow(); 00248 vtkBooleanMacro(Shadow, int); 00250 #endif 00251 00253 00255 vtkSetStringMacro(LabelFormat); 00256 vtkGetStringMacro(LabelFormat); 00258 00260 00262 vtkSetClampMacro(FontFactor, float, 0.1, 2.0); 00263 vtkGetMacro(FontFactor, float); 00265 00267 00270 vtkSetClampMacro(Inertia, int, 1, VTK_LARGE_INTEGER); 00271 vtkGetMacro(Inertia, float); 00273 00275 00278 vtkSetMacro(CornerOffset, float); 00279 vtkGetMacro(CornerOffset, float); 00281 00285 void ReleaseGraphicsResources(vtkWindow *); 00286 00288 00289 vtkSetMacro(XAxisVisibility,int); 00290 vtkGetMacro(XAxisVisibility,int); 00291 vtkBooleanMacro(XAxisVisibility,int); 00292 vtkSetMacro(YAxisVisibility,int); 00293 vtkGetMacro(YAxisVisibility,int); 00294 vtkBooleanMacro(YAxisVisibility,int); 00295 vtkSetMacro(ZAxisVisibility,int); 00296 vtkGetMacro(ZAxisVisibility,int); 00297 vtkBooleanMacro(ZAxisVisibility,int); 00299 00301 void ShallowCopy(vtkCubeAxesActor2D *actor); 00302 00303 protected: 00304 vtkCubeAxesActor2D(); 00305 ~vtkCubeAxesActor2D(); 00306 00307 vtkDataSet *Input; //Define bounds from input data, or 00308 vtkProp *Prop; //Define bounds from actor/assembly, or 00309 float Bounds[6]; //Define bounds explicitly 00310 float Ranges[6]; //Define ranges explicitly 00311 int UseRanges; //Flag to use ranges or not 00312 00313 vtkCamera *Camera; 00314 int FlyMode; 00315 int Scaling; 00316 00317 vtkAxisActor2D *XAxis; 00318 vtkAxisActor2D *YAxis; 00319 vtkAxisActor2D *ZAxis; 00320 00321 vtkTextProperty *AxisTitleTextProperty; 00322 vtkTextProperty *AxisLabelTextProperty; 00323 00324 vtkTimeStamp BuildTime; 00325 00326 int NumberOfLabels; 00327 char *XLabel; 00328 char *YLabel; 00329 char *ZLabel; 00330 char *Labels[3]; 00331 00332 int XAxisVisibility; 00333 int YAxisVisibility; 00334 int ZAxisVisibility; 00335 00336 char *LabelFormat; 00337 float FontFactor; 00338 float CornerOffset; 00339 int Inertia; 00340 int RenderCount; 00341 int InertiaAxes[8]; 00342 00343 int RenderSomething; 00344 00345 // various helper methods 00346 void TransformBounds(vtkViewport *viewport, float bounds[6], 00347 float pts[8][3]); 00348 int ClipBounds(vtkViewport *viewport, float pts[8][3], float bounds[6]); 00349 float EvaluatePoint(float planes[24], float x[3]); 00350 float EvaluateBounds(float planes[24], float bounds[6]); 00351 void AdjustAxes(float pts[8][3], float bounds[6], 00352 int idx, int xIdx, int yIdx, int zIdx, int zIdx2, 00353 int xAxes, int yAxes, int zAxes, 00354 float xCoords[4], float yCoords[4], float zCoords[4], 00355 float xRange[2], float yRange[2], float zRange[2]); 00356 00357 private: 00358 // hide the superclass' ShallowCopy() from the user and the compiler. 00359 void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); }; 00360 private: 00361 vtkCubeAxesActor2D(const vtkCubeAxesActor2D&); // Not implemented. 00362 void operator=(const vtkCubeAxesActor2D&); // Not implemented. 00363 }; 00364 00365 00366 #endif