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) override;
42 
46  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
47 
51  void Render(vtkRenderer *ren, vtkActor *act) override;
52 
54 
57  void SetInputData(vtkPolyData *in);
60 
62 
65  void Update(int port) override;
66  void Update() override;
67  int Update(int port, vtkInformationVector* requests) override;
68  int Update(vtkInformation* requests) 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_SIZEHINT(6) override;
96  void GetBounds(double bounds[6]) override
97  { this->Superclass::GetBounds(bounds); }
98 
103 
116  virtual void MapDataArrayToVertexAttribute(
117  const char* vertexAttributeName,
118  const char* dataArrayName, int fieldAssociation, int componentno = -1);
119 
120  // Specify a data array to use as the texture coordinate
121  // for a named texture. See vtkProperty.h for how to
122  // name textures.
123  virtual void MapDataArrayToMultiTextureAttribute(
124  const char *textureName,
125  const char* dataArrayName, int fieldAssociation, int componentno = -1);
126 
130  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
131 
135  virtual void RemoveAllVertexAttributeMappings();
136 
142  vtkInformationVector*) override;
143 
144 protected:
146  ~vtkPolyDataMapper() override {}
147 
153  virtual void ComputeBounds();
154 
155  int Piece;
159 
160  int FillInputPortInformation(int, vtkInformation*) override;
161 
162 private:
163  vtkPolyDataMapper(const vtkPolyDataMapper&) = delete;
164  void operator=(const vtkPolyDataMapper&) = delete;
165 };
166 
167 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:36
vtkMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkMapper::ShallowCopy
void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
vtkMapper.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkMapper::Render
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkPolyDataMapper::NumberOfSubPieces
int NumberOfSubPieces
Definition: vtkPolyDataMapper.h:157
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:80
vtkAlgorithm::Update
virtual void Update()
vtkPolyDataMapper::~vtkPolyDataMapper
~vtkPolyDataMapper() override
Definition: vtkPolyDataMapper.h:146
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyDataMapper::GhostLevel
int GhostLevel
Definition: vtkPolyDataMapper.h:158
vtkMapper::GetInput
vtkDataSet * GetInput()
Get the input as a vtkDataSet.
vtkPolyDataMapper::NumberOfPieces
int NumberOfPieces
Definition: vtkPolyDataMapper.h:156
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkMapper::GetBounds
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkPolyDataMapper::Piece
int Piece
Definition: vtkPolyDataMapper.h:155
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkAlgorithm::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:81
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:52