VTK  9.2.6
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=========================================================================*/
24
25#ifndef vtkPolyDataMapper_h
26#define vtkPolyDataMapper_h
27
28#include "vtkMapper.h"
29#include "vtkRenderingCoreModule.h" // For export macro
30//#include "vtkTexture.h" // used to include texture unit enum.
31
32class vtkPolyData;
33class vtkRenderer;
34class vtkRenderWindow;
35
36class VTKRENDERINGCORE_EXPORT vtkPolyDataMapper : public vtkMapper
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
46 virtual void RenderPiece(vtkRenderer*, vtkActor*){};
47
51 void Render(vtkRenderer* ren, vtkActor* act) override;
52
54
60
62
65 void Update(int port) override;
66 void Update() override;
67 vtkTypeBool Update(int port, vtkInformationVector* requests) override;
68 vtkTypeBool 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
92
100 vtkSetMacro(SeamlessU, bool);
101 vtkGetMacro(SeamlessU, bool);
102 vtkBooleanMacro(SeamlessU, bool);
103 vtkSetMacro(SeamlessV, bool);
104 vtkGetMacro(SeamlessV, bool);
105 vtkBooleanMacro(SeamlessV, bool);
107
112 double* GetBounds() VTK_SIZEHINT(6) override;
113 void GetBounds(double bounds[6]) override { this->Superclass::GetBounds(bounds); }
114
119
132 virtual void MapDataArrayToVertexAttribute(const char* vertexAttributeName,
133 const char* dataArrayName, int fieldAssociation, int componentno = -1);
134
135 // Specify a data array to use as the texture coordinate
136 // for a named texture. See vtkProperty.h for how to
137 // name textures.
139 const char* textureName, const char* dataArrayName, int fieldAssociation, int componentno = -1);
140
144 virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
145
150
156
157protected:
159 ~vtkPolyDataMapper() override = default;
160
166 virtual void ComputeBounds();
167
168 int Piece;
173
175
176private:
177 vtkPolyDataMapper(const vtkPolyDataMapper&) = delete;
178 void operator=(const vtkPolyDataMapper&) = delete;
179};
180
181#endif
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:46
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
void Update(int port) override
Bring this algorithm's outputs up-to-date.
virtual void MapDataArrayToMultiTextureAttribute(const char *textureName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkTypeBool Update(vtkInformation *requests) override
Bring this algorithm's outputs up-to-date.
vtkTypeBool Update(int port, vtkInformationVector *requests) override
Bring this algorithm's outputs up-to-date.
~vtkPolyDataMapper() override=default
void Update() override
Bring this algorithm's outputs up-to-date.
virtual void RenderPiece(vtkRenderer *, vtkActor *)
Implemented by sub classes.
void SetInputData(vtkPolyData *in)
Specify the input data to map.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkPolyData * GetInput()
Specify the input data to map.
virtual void ComputeBounds()
Called in GetBounds().
static vtkPolyDataMapper * New()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
create a window for renderers to draw into
abstract specification for renderers
Definition vtkRenderer.h:67
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_SIZEHINT(...)