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);
48 
52  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
53 
57  virtual void Render(vtkRenderer *ren, vtkActor *act);
58 
60 
66 
68 
71  virtual void Update(int port);
72  virtual void Update();
73  virtual int Update(int port, vtkInformationVector* requests);
74  virtual int Update(vtkInformation* requests);
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  virtual double *GetBounds();
102  virtual void GetBounds(double bounds[6])
103  { this->Superclass::GetBounds(bounds); }
104 
109 
122  const char* vertexAttributeName,
123  const char* dataArrayName, int fieldAssociation, int componentno = -1);
124 
126  int unit,
127  const char* dataArrayName, int fieldAssociation, int componentno = -1);
128 
132  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
133 
138 
145 
146 protected:
149 
155  virtual void ComputeBounds();
156 
157  int Piece;
161 
163 
164 private:
165  vtkPolyDataMapper(const vtkPolyDataMapper&) VTK_DELETE_FUNCTION;
166  void operator=(const vtkPolyDataMapper&) VTK_DELETE_FUNCTION;
167 };
168 
169 #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:52
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
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.
virtual void Update(int port)
Bring this algorithm's outputs up-to-date.
vtkPolyData * GetInput()
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
virtual void RenderPiece(vtkRenderer *ren, vtkActor *act)=0
Implemented by sub classes.
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
virtual int Update(vtkInformation *requests)
Convenience method to update an algorithm after passing requests to its first output port.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Render(vtkRenderer *ren, vtkActor *act)
This calls RenderPiece (in a for loop if streaming is necessary).
virtual void MapDataArrayToMultiTextureAttribute(int unit, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual double * GetBounds()
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
virtual void Update()
virtual int Update(int port, vtkInformationVector *requests)
This method enables the passing of data requests to the algorithm to be used during execution (in add...
void SetInputData(vtkPolyData *in)
Specify the input data to map.
static vtkPolyDataMapper * New()
virtual void ComputeBounds()
Called in GetBounds().
virtual void GetBounds(double bounds[6])
Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
see vtkAlgorithm for details
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.