VTK
vtkPolyDataMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataMapper.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 =========================================================================*/
25 #ifndef vtkPolyDataMapper_h
26 #define vtkPolyDataMapper_h
27 
28 #include "vtkRenderingCoreModule.h" // For export macro
29 #include "vtkMapper.h"
30 #include "vtkTexture.h" // used to include texture unit enum.
31 
32 class vtkPolyData;
33 class vtkRenderer;
34 class vtkRenderWindow;
35 
36 class VTKRENDERINGCORE_EXPORT vtkPolyDataMapper : public vtkMapper
37 {
38 public:
39  static vtkPolyDataMapper *New();
40  vtkTypeMacro(vtkPolyDataMapper, vtkMapper);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
46  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
47 
51  void Render(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
52 
54 
57  void SetInputData(vtkPolyData *in);
60 
62 
65  void Update(int port) VTK_OVERRIDE;
66  void Update() VTK_OVERRIDE;
67  int Update(int port, vtkInformationVector* requests) VTK_OVERRIDE;
68  int Update(vtkInformation* requests) VTK_OVERRIDE;
70 
72 
75  vtkSetMacro(Piece, int);
76  vtkGetMacro(Piece, int);
77  vtkSetMacro(NumberOfPieces, int);
78  vtkGetMacro(NumberOfPieces, int);
79  vtkSetMacro(NumberOfSubPieces, int);
80  vtkGetMacro(NumberOfSubPieces, int);
82 
84 
87  vtkSetMacro(GhostLevel, int);
88  vtkGetMacro(GhostLevel, int);
90 
95  double *GetBounds() VTK_OVERRIDE;
96  void GetBounds(double bounds[6]) VTK_OVERRIDE
97  { this->Superclass::GetBounds(bounds); }
98 
103 
115  virtual void MapDataArrayToVertexAttribute(
116  const char* vertexAttributeName,
117  const char* dataArrayName, int fieldAssociation, int componentno = -1);
118 
119  virtual void MapDataArrayToMultiTextureAttribute(
120  int unit,
121  const char* dataArrayName, int fieldAssociation, int componentno = -1);
122 
126  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
127 
131  virtual void RemoveAllVertexAttributeMappings();
132 
138  vtkInformationVector*) VTK_OVERRIDE;
139 
140 protected:
142  ~vtkPolyDataMapper() VTK_OVERRIDE {}
143 
149  virtual void ComputeBounds();
150 
151  int Piece;
155 
156  int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
157 
158 private:
159  vtkPolyDataMapper(const vtkPolyDataMapper&) VTK_DELETE_FUNCTION;
160  void operator=(const vtkPolyDataMapper&) VTK_DELETE_FUNCTION;
161 };
162 
163 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
Store vtkAlgorithm input/output information.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
abstract specification for renderers
Definition: vtkRenderer.h:57
virtual void Update()
Updates the extensions string.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Update()
Bring this algorithm's outputs up-to-date.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:85
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
abstract class specifies interface to map data
map vtkPolyData to graphics primitives
create a window for renderers to draw into
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkDataSet * GetInput()
Get the input as a vtkDataSet.
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.