VTK  9.2.20220818
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 =========================================================================*/
140 #ifndef vtkPolyDataMapper_h
141 #define vtkPolyDataMapper_h
142 
143 #include "vtkMapper.h"
144 #include "vtkRenderingCoreModule.h" // For export macro
145 //#include "vtkTexture.h" // used to include texture unit enum.
146 
147 class vtkPolyData;
148 class vtkRenderer;
149 class vtkRenderWindow;
150 
151 class VTKRENDERINGCORE_EXPORT vtkPolyDataMapper : public vtkMapper
152 {
153 public:
155  vtkTypeMacro(vtkPolyDataMapper, vtkMapper);
156  void PrintSelf(ostream& os, vtkIndent indent) override;
157 
161  virtual void RenderPiece(vtkRenderer*, vtkActor*){};
162 
166  void Render(vtkRenderer* ren, vtkActor* act) override;
167 
169 
175 
177 
180  void Update(int port) override;
181  void Update() override;
182  vtkTypeBool Update(int port, vtkInformationVector* requests) override;
183  vtkTypeBool Update(vtkInformation* requests) override;
185 
187 
190  vtkSetMacro(Piece, int);
191  vtkGetMacro(Piece, int);
192  vtkSetMacro(NumberOfPieces, int);
193  vtkGetMacro(NumberOfPieces, int);
194  vtkSetMacro(NumberOfSubPieces, int);
195  vtkGetMacro(NumberOfSubPieces, int);
197 
199 
202  vtkSetMacro(GhostLevel, int);
203  vtkGetMacro(GhostLevel, int);
205 
207 
215  vtkSetMacro(SeamlessU, bool);
216  vtkGetMacro(SeamlessU, bool);
217  vtkBooleanMacro(SeamlessU, bool);
218  vtkSetMacro(SeamlessV, bool);
219  vtkGetMacro(SeamlessV, bool);
220  vtkBooleanMacro(SeamlessV, bool);
222 
227  double* GetBounds() VTK_SIZEHINT(6) override;
228  void GetBounds(double bounds[6]) override { this->Superclass::GetBounds(bounds); }
229 
233  void ShallowCopy(vtkAbstractMapper* m) override;
234 
247  virtual void MapDataArrayToVertexAttribute(const char* vertexAttributeName,
248  const char* dataArrayName, int fieldAssociation, int componentno = -1);
249 
250  // Specify a data array to use as the texture coordinate
251  // for a named texture. See vtkProperty.h for how to
252  // name textures.
254  const char* textureName, const char* dataArrayName, int fieldAssociation, int componentno = -1);
255 
259  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
260 
265 
271 
272 protected:
274  ~vtkPolyDataMapper() override = default;
275 
281  virtual void ComputeBounds();
282 
283  int Piece;
287  bool SeamlessU, SeamlessV;
288 
290 
291 private:
292  vtkPolyDataMapper(const vtkPolyDataMapper&) = delete;
293  void operator=(const vtkPolyDataMapper&) = delete;
294 };
295 
296 #endif
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:161
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:177
map vtkPolyData to graphics primitives
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.
vtkPolyData * GetInput()
Specify the input data to map.
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.
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
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.
static vtkPolyDataMapper * New()
virtual void ComputeBounds()
Called in GetBounds().
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:182
void GetBounds(T a, double bds[6])
@ port
Definition: vtkX3D.h:453
std::map< DataSetType, DataSet > Piece
Definition: VTXTypes.h:54
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)