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 =========================================================================*/
31 #ifndef vtkPolyDataMapper_h
32 #define vtkPolyDataMapper_h
33 
34 #include "vtkRenderingCoreModule.h" // For export macro
35 #include "vtkMapper.h"
36 //#include "vtkTexture.h" // used to include texture unit enum.
37 
38 class vtkPolyData;
39 class vtkRenderer;
40 class vtkRenderWindow;
41 
42 class VTKRENDERINGCORE_EXPORT vtkPolyDataMapper : public vtkMapper
43 {
44 public:
46  vtkTypeMacro(vtkPolyDataMapper, vtkMapper);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
53 
57  void Render(vtkRenderer *ren, vtkActor *act) override;
58 
60 
66 
68 
71  void Update(int port) override;
72  void Update() override;
73  int Update(int port, vtkInformationVector* requests) override;
74  int Update(vtkInformation* requests) override;
76 
78 
81  vtkSetMacro(Piece, int);
82  vtkGetMacro(Piece, int);
83  vtkSetMacro(NumberOfPieces, int);
84  vtkGetMacro(NumberOfPieces, int);
85  vtkSetMacro(NumberOfSubPieces, int);
86  vtkGetMacro(NumberOfSubPieces, int);
88 
90 
93  vtkSetMacro(GhostLevel, int);
94  vtkGetMacro(GhostLevel, int);
96 
101  double *GetBounds() VTK_SIZEHINT(6) override;
102  void GetBounds(double bounds[6]) override
103  { this->Superclass::GetBounds(bounds); }
104 
108  void ShallowCopy(vtkAbstractMapper *m) override;
109 
123  const char* vertexAttributeName,
124  const char* dataArrayName, int fieldAssociation, int componentno = -1);
125 
126  // Specify a data array to use as the texture coordinate
127  // for a named texture. See vtkProperty.h for how to
128  // name textures.
130  const char *textureName,
131  const char* dataArrayName, int fieldAssociation, int componentno = -1);
132 
136  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
137 
142 
148  vtkInformationVector*) override;
149 
150 protected:
152  ~vtkPolyDataMapper() override {}
153 
159  virtual void ComputeBounds();
160 
161  int Piece;
165 
167 
168 private:
169  vtkPolyDataMapper(const vtkPolyDataMapper&) = delete;
170  void operator=(const vtkPolyDataMapper&) = delete;
171 };
172 
173 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:43
vtkPolyDataMapper::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
vtkPolyDataMapper::MapDataArrayToMultiTextureAttribute
virtual void MapDataArrayToMultiTextureAttribute(const char *textureName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
vtkPolyDataMapper::SetInputData
void SetInputData(vtkPolyData *in)
Specify the input data to map.
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkPolyDataMapper::RenderPiece
virtual void RenderPiece(vtkRenderer *ren, vtkActor *act)=0
Implemented by sub classes.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPolyDataMapper::RemoveVertexAttributeMapping
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
vtkPolyDataMapper::ShallowCopy
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
vtkPolyDataMapper::Update
int Update(int port, vtkInformationVector *requests) override
This method enables the passing of data requests to the algorithm to be used during execution (in add...
vtkPolyDataMapper::vtkPolyDataMapper
vtkPolyDataMapper()
vtkPolyDataMapper::Update
void Update() override
vtkPolyDataMapper::Update
int Update(vtkInformation *requests) override
Convenience method to update an algorithm after passing requests to its first output port.
vtkMapper.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkPolyDataMapper::NumberOfSubPieces
int NumberOfSubPieces
Definition: vtkPolyDataMapper.h:163
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:87
vtkPolyDataMapper::GetBounds
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkPolyDataMapper::~vtkPolyDataMapper
~vtkPolyDataMapper() override
Definition: vtkPolyDataMapper.h:152
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPolyDataMapper::Render
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
vtkPolyDataMapper::GetInput
vtkPolyData * GetInput()
vtkPolyDataMapper::GhostLevel
int GhostLevel
Definition: vtkPolyDataMapper.h:164
vtkPolyDataMapper::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkPolyDataMapper::Update
void Update(int port) override
Bring this algorithm's outputs up-to-date.
vtkPolyDataMapper::NumberOfPieces
int NumberOfPieces
Definition: vtkPolyDataMapper.h:162
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkPolyDataMapper::Piece
int Piece
Definition: vtkPolyDataMapper.h:161
vtkPolyDataMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataMapper::New
static vtkPolyDataMapper * New()
vtkPolyDataMapper::MapDataArrayToVertexAttribute
virtual void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
Select a data array from the point/cell data and map it to a generic vertex attribute.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkPolyDataMapper::ComputeBounds
virtual void ComputeBounds()
Called in GetBounds().
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:88
vtkPolyDataMapper::RemoveAllVertexAttributeMappings
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:56