VTK
vtkActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkActor.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 =========================================================================*/
37 #ifndef vtkActor_h
38 #define vtkActor_h
39 
40 #include "vtkRenderingCoreModule.h" // For export macro
41 #include "vtkProp3D.h"
42 
43 class vtkRenderer;
44 class vtkPropCollection;
45 class vtkActorCollection;
46 class vtkTexture;
47 class vtkMapper;
48 class vtkProperty;
49 
51 {
52 public:
53  vtkTypeMacro(vtkActor, vtkProp3D);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
59  static vtkActor *New();
60 
64  virtual void GetActors(vtkPropCollection *);
65 
67 
68  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
69  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
71 
73  virtual int HasTranslucentPolygonalGeometry();
74 
80  virtual void Render(vtkRenderer *, vtkMapper *) {}
81 
83  void ShallowCopy(vtkProp *prop);
84 
89 
91 
96  void SetProperty(vtkProperty *lut);
97  vtkProperty *GetProperty();
99 
103  virtual vtkProperty* MakeProperty();
104 
106 
110  void SetBackfaceProperty(vtkProperty *lut);
111  vtkGetObjectMacro(BackfaceProperty,vtkProperty);
113 
115 
118  virtual void SetTexture(vtkTexture*);
119  vtkGetObjectMacro(Texture, vtkTexture);
121 
126  virtual void SetMapper(vtkMapper *);
127 
129 
130  vtkGetObjectMacro(Mapper, vtkMapper);
132 
134 
137  void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );}
138  double *GetBounds();
140 
147  virtual void ApplyProperties() {}
148 
150  unsigned long int GetMTime();
151 
156  virtual unsigned long GetRedrawMTime();
157 
162  virtual bool GetSupportsSelection();
163 
164 protected:
165  vtkActor();
166  ~vtkActor();
167 
168  // is this actor opaque
169  int GetIsOpaque();
170 
175 
176  // Bounds are cached in an actor - the MapperBounds are also cache to
177  // help know when the Bounds need to be recomputed.
178  double MapperBounds[6];
180 
181 private:
182  vtkActor(const vtkActor&); // Not implemented.
183  void operator=(const vtkActor&); // Not implemented.
184 };
185 
186 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual void Render(vtkRenderer *, vtkMapper *)
Definition: vtkActor.h:80
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
vtkTimeStamp BoundsMTime
Definition: vtkActor.h:179
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:63
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:198
virtual int HasTranslucentPolygonalGeometry()
Definition: vtkProp.h:262
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkProperty * Property
Definition: vtkActor.h:171
virtual bool GetSupportsSelection()
Definition: vtkProp.h:366
abstract specification for renderers
Definition: vtkRenderer.h:63
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:42
vtkTexture * Texture
Definition: vtkActor.h:173
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:270
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
void ShallowCopy(vtkProp *prop)
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
vtkProperty * BackfaceProperty
Definition: vtkActor.h:172
void GetBounds(double bounds[6])
Definition: vtkActor.h:137
virtual unsigned long GetRedrawMTime()
Definition: vtkProp.h:103
handles properties associated with a texture map
Definition: vtkTexture.h:69
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:89
a list of actors
virtual void ApplyProperties()
Definition: vtkActor.h:147
vtkMapper * Mapper
Definition: vtkActor.h:174
#define VTKRENDERINGCORE_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:200
virtual double * GetBounds()=0
static vtkObject * New()
unsigned long int GetMTime()
virtual void GetActors(vtkPropCollection *)
Definition: vtkProp.h:62