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 =========================================================================*/
31 #ifndef vtkPolyDataMapper_h
32 #define vtkPolyDataMapper_h
33 
34 #include "vtkMapper.h"
35 #include "vtkRenderingCoreModule.h" // For export macro
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:
45  static vtkPolyDataMapper* New();
46  vtkTypeMacro(vtkPolyDataMapper, vtkMapper);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  virtual void RenderPiece(vtkRenderer*, vtkActor*){};
53 
57  void Render(vtkRenderer* ren, vtkActor* act) override;
58 
60 
63  void SetInputData(vtkPolyData* in);
66 
68 
71  void Update(int port) override;
72  void Update() override;
73  vtkTypeBool Update(int port, vtkInformationVector* requests) override;
74  vtkTypeBool 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 
98 
106  vtkSetMacro(SeamlessU, bool);
107  vtkGetMacro(SeamlessU, bool);
108  vtkBooleanMacro(SeamlessU, bool);
109  vtkSetMacro(SeamlessV, bool);
110  vtkGetMacro(SeamlessV, bool);
111  vtkBooleanMacro(SeamlessV, bool);
113 
118  double* GetBounds() VTK_SIZEHINT(6) override;
119  void GetBounds(double bounds[6]) override { this->Superclass::GetBounds(bounds); }
120 
124  void ShallowCopy(vtkAbstractMapper* m) override;
125 
138  virtual void MapDataArrayToVertexAttribute(const char* vertexAttributeName,
139  const char* dataArrayName, int fieldAssociation, int componentno = -1);
140 
141  // Specify a data array to use as the texture coordinate
142  // for a named texture. See vtkProperty.h for how to
143  // name textures.
144  virtual void MapDataArrayToMultiTextureAttribute(
145  const char* textureName, const char* dataArrayName, int fieldAssociation, int componentno = -1);
146 
150  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
151 
155  virtual void RemoveAllVertexAttributeMappings();
156 
162 
163 protected:
165  ~vtkPolyDataMapper() override = default;
166 
172  virtual void ComputeBounds();
173 
174  int Piece;
178  bool SeamlessU, SeamlessV;
179 
180  int FillInputPortInformation(int, vtkInformation*) override;
181 
182 private:
183  vtkPolyDataMapper(const vtkPolyDataMapper&) = delete;
184  void operator=(const vtkPolyDataMapper&) = delete;
185 };
186 
187 #endif
void GetBounds(T a, double bds[6])
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
Store vtkAlgorithm input/output information.
abstract specification for renderers
Definition: vtkRenderer.h:72
virtual void RenderPiece(vtkRenderer *, vtkActor *)
Implemented by sub classes.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
int vtkTypeBool
Definition: vtkABI.h:69
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
a simple class to control print indentation
Definition: vtkIndent.h:39
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.
#define VTK_SIZEHINT(...)
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:87
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()
std::map< DataSetType, DataSet > Piece
Definition: VTXTypes.h:54
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
vtkDataSet * GetInput()
Get the input as a vtkDataSet.
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.