VTK
dox/Hybrid/vtkAnnotatedCubeActor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAnnotatedCubeActor.h
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 =========================================================================*/
00044 #ifndef __vtkAnnotatedCubeActor_h
00045 #define __vtkAnnotatedCubeActor_h
00046 
00047 #include "vtkProp3D.h"
00048 
00049 class vtkActor;
00050 class vtkAppendPolyData;
00051 class vtkAssembly;
00052 class vtkCubeSource;
00053 class vtkFeatureEdges;
00054 class vtkPropCollection;
00055 class vtkProperty;
00056 class vtkRenderer;
00057 class vtkTransform;
00058 class vtkTransformFilter;
00059 class vtkVectorText;
00060 
00061 class VTK_HYBRID_EXPORT vtkAnnotatedCubeActor : public vtkProp3D
00062 {
00063 public:
00064   static vtkAnnotatedCubeActor *New();
00065   vtkTypeMacro(vtkAnnotatedCubeActor,vtkProp3D);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00071   virtual void GetActors(vtkPropCollection *);
00072 
00074 
00075   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00076   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00078 
00080   virtual int HasTranslucentPolygonalGeometry();
00081   
00083   void ShallowCopy(vtkProp *prop);
00084 
00088   void ReleaseGraphicsResources(vtkWindow *);
00089 
00091 
00094   void GetBounds(double bounds[6]);
00095   double *GetBounds();
00097 
00099   unsigned long int GetMTime();
00100 
00102 
00103   void SetFaceTextScale(double);
00104   vtkGetMacro(FaceTextScale, double);
00106 
00108 
00109   vtkProperty *GetXPlusFaceProperty();
00110   vtkProperty *GetXMinusFaceProperty();
00111   vtkProperty *GetYPlusFaceProperty();
00112   vtkProperty *GetYMinusFaceProperty();
00113   vtkProperty *GetZPlusFaceProperty();
00114   vtkProperty *GetZMinusFaceProperty();
00116 
00118   vtkProperty *GetCubeProperty();
00119 
00121   vtkProperty *GetTextEdgesProperty();
00122 
00124 
00125   vtkSetStringMacro( XPlusFaceText );
00126   vtkGetStringMacro( XPlusFaceText );
00127   vtkSetStringMacro( XMinusFaceText );
00128   vtkGetStringMacro( XMinusFaceText );
00129   vtkSetStringMacro( YPlusFaceText );
00130   vtkGetStringMacro( YPlusFaceText );
00131   vtkSetStringMacro( YMinusFaceText );
00132   vtkGetStringMacro( YMinusFaceText );
00133   vtkSetStringMacro( ZPlusFaceText );
00134   vtkGetStringMacro( ZPlusFaceText );
00135   vtkSetStringMacro( ZMinusFaceText );
00136   vtkGetStringMacro( ZMinusFaceText );
00138 
00140 
00141   void SetTextEdgesVisibility(int);
00142   int GetTextEdgesVisibility();
00144 
00146 
00147   void SetCubeVisibility(int);
00148   int GetCubeVisibility();
00150 
00152 
00153   void SetFaceTextVisibility(int);
00154   int GetFaceTextVisibility();
00156 
00158 
00159   vtkSetMacro(XFaceTextRotation,double);
00160   vtkGetMacro(XFaceTextRotation,double);
00161   vtkSetMacro(YFaceTextRotation,double);
00162   vtkGetMacro(YFaceTextRotation,double);
00163   vtkSetMacro(ZFaceTextRotation,double);
00164   vtkGetMacro(ZFaceTextRotation,double);
00166 
00168 
00169   vtkAssembly *GetAssembly()
00170     { return this->Assembly; }
00172 
00173 protected:
00174   vtkAnnotatedCubeActor();
00175   ~vtkAnnotatedCubeActor();
00176 
00177   vtkCubeSource      *CubeSource;
00178   vtkActor           *CubeActor;
00179 
00180   vtkAppendPolyData  *AppendTextEdges;
00181   vtkFeatureEdges    *ExtractTextEdges;
00182   vtkActor           *TextEdgesActor;
00183 
00184   void                UpdateProps();
00185 
00186   char               *XPlusFaceText;
00187   char               *XMinusFaceText;
00188   char               *YPlusFaceText;
00189   char               *YMinusFaceText;
00190   char               *ZPlusFaceText;
00191   char               *ZMinusFaceText;
00192 
00193   double              FaceTextScale;
00194 
00195   double              XFaceTextRotation;
00196   double              YFaceTextRotation;
00197   double              ZFaceTextRotation;
00198 
00199   vtkVectorText      *XPlusFaceVectorText;
00200   vtkVectorText      *XMinusFaceVectorText;
00201   vtkVectorText      *YPlusFaceVectorText;
00202   vtkVectorText      *YMinusFaceVectorText;
00203   vtkVectorText      *ZPlusFaceVectorText;
00204   vtkVectorText      *ZMinusFaceVectorText;
00205 
00206   vtkActor           *XPlusFaceActor;
00207   vtkActor           *XMinusFaceActor;
00208   vtkActor           *YPlusFaceActor;
00209   vtkActor           *YMinusFaceActor;
00210   vtkActor           *ZPlusFaceActor;
00211   vtkActor           *ZMinusFaceActor;
00212 
00213   vtkTransformFilter *TransformFilter;
00214   vtkTransform       *Transform;
00215 
00216   vtkAssembly        *Assembly;
00217 
00218 private:
00219   vtkAnnotatedCubeActor(const vtkAnnotatedCubeActor&);  // Not implemented.
00220   void operator=(const vtkAnnotatedCubeActor&);  // Not implemented.
00221 };
00222 
00223 #endif
00224