VTK
vtkAnnotatedCubeActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAnnotatedCubeActor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
39 #ifndef vtkAnnotatedCubeActor_h
40 #define vtkAnnotatedCubeActor_h
41 
42 #include "vtkRenderingAnnotationModule.h" // For export macro
43 #include "vtkProp3D.h"
44 
45 class vtkActor;
46 class vtkAppendPolyData;
47 class vtkAssembly;
48 class vtkCubeSource;
49 class vtkFeatureEdges;
50 class vtkPropCollection;
51 class vtkProperty;
52 class vtkRenderer;
53 class vtkTransform;
54 class vtkTransformFilter;
55 class vtkVectorText;
56 
57 class VTKRENDERINGANNOTATION_EXPORT vtkAnnotatedCubeActor : public vtkProp3D
58 {
59 public:
60  static vtkAnnotatedCubeActor *New();
62  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63 
69  void GetActors(vtkPropCollection *) VTK_OVERRIDE;
70 
72 
75  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
76  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
78 
82  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
83 
87  void ShallowCopy(vtkProp *prop) VTK_OVERRIDE;
88 
94  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
95 
97 
101  void GetBounds(double bounds[6]);
102  double *GetBounds() VTK_OVERRIDE;
104 
108  vtkMTimeType GetMTime() VTK_OVERRIDE;
109 
111 
114  void SetFaceTextScale(double);
115  vtkGetMacro(FaceTextScale, double);
117 
119 
122  vtkProperty *GetXPlusFaceProperty();
123  vtkProperty *GetXMinusFaceProperty();
124  vtkProperty *GetYPlusFaceProperty();
125  vtkProperty *GetYMinusFaceProperty();
126  vtkProperty *GetZPlusFaceProperty();
127  vtkProperty *GetZMinusFaceProperty();
129 
133  vtkProperty *GetCubeProperty();
134 
138  vtkProperty *GetTextEdgesProperty();
139 
141 
144  vtkSetStringMacro( XPlusFaceText );
145  vtkGetStringMacro( XPlusFaceText );
146  vtkSetStringMacro( XMinusFaceText );
147  vtkGetStringMacro( XMinusFaceText );
148  vtkSetStringMacro( YPlusFaceText );
149  vtkGetStringMacro( YPlusFaceText );
150  vtkSetStringMacro( YMinusFaceText );
151  vtkGetStringMacro( YMinusFaceText );
152  vtkSetStringMacro( ZPlusFaceText );
153  vtkGetStringMacro( ZPlusFaceText );
154  vtkSetStringMacro( ZMinusFaceText );
155  vtkGetStringMacro( ZMinusFaceText );
157 
159 
162  void SetTextEdgesVisibility(int);
163  int GetTextEdgesVisibility();
165 
167 
170  void SetCubeVisibility(int);
171  int GetCubeVisibility();
173 
175 
178  void SetFaceTextVisibility(int);
179  int GetFaceTextVisibility();
181 
183 
186  vtkSetMacro(XFaceTextRotation,double);
187  vtkGetMacro(XFaceTextRotation,double);
188  vtkSetMacro(YFaceTextRotation,double);
189  vtkGetMacro(YFaceTextRotation,double);
190  vtkSetMacro(ZFaceTextRotation,double);
191  vtkGetMacro(ZFaceTextRotation,double);
193 
197  vtkAssembly *GetAssembly()
198  { return this->Assembly; }
199 
200 protected:
202  ~vtkAnnotatedCubeActor() VTK_OVERRIDE;
203 
204  vtkCubeSource *CubeSource;
205  vtkActor *CubeActor;
206 
207  vtkAppendPolyData *AppendTextEdges;
208  vtkFeatureEdges *ExtractTextEdges;
209  vtkActor *TextEdgesActor;
210 
211  void UpdateProps();
212 
213  char *XPlusFaceText;
214  char *XMinusFaceText;
215  char *YPlusFaceText;
216  char *YMinusFaceText;
217  char *ZPlusFaceText;
218  char *ZMinusFaceText;
219 
220  double FaceTextScale;
221 
222  double XFaceTextRotation;
223  double YFaceTextRotation;
224  double ZFaceTextRotation;
225 
226  vtkVectorText *XPlusFaceVectorText;
227  vtkVectorText *XMinusFaceVectorText;
228  vtkVectorText *YPlusFaceVectorText;
229  vtkVectorText *YMinusFaceVectorText;
230  vtkVectorText *ZPlusFaceVectorText;
231  vtkVectorText *ZMinusFaceVectorText;
232 
233  vtkActor *XPlusFaceActor;
234  vtkActor *XMinusFaceActor;
235  vtkActor *YPlusFaceActor;
236  vtkActor *YMinusFaceActor;
237  vtkActor *ZPlusFaceActor;
238  vtkActor *ZMinusFaceActor;
239 
240  vtkTransformFilter *TransformFilter;
242 
243  vtkAssembly *Assembly;
244 
245 private:
246  vtkAnnotatedCubeActor(const vtkAnnotatedCubeActor&) VTK_DELETE_FUNCTION;
247  void operator=(const vtkAnnotatedCubeActor&) VTK_DELETE_FUNCTION;
248 };
249 
250 #endif
251 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
a 3D cube with face labels
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract specification for Viewports
Definition: vtkViewport.h:44
represent surface properties of a geometric object
Definition: vtkProperty.h:58
abstract specification for renderers
Definition: vtkRenderer.h:57
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
create a polygonal representation of a cube
Definition: vtkCubeSource.h:30
a simple class to control print indentation
Definition: vtkIndent.h:33
extract boundary, non-manifold, and/or sharp edges from polygonal data
appends one or more polygonal datasets together
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
create hierarchies of vtkProp3Ds (transformable props)
Definition: vtkAssembly.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
transform points and associated normals and vectors
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void GetActors(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors or volumes...
Definition: vtkProp.h:55
create polygonal text
Definition: vtkVectorText.h:41
Transform
Definition: ADIOSDefs.h:39