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 =========================================================================*/
30 #ifndef vtkPolyDataMapper_h
31 #define vtkPolyDataMapper_h
32 
33 #include "vtkRenderingCoreModule.h" // For export macro
34 #include "vtkMapper.h"
35 #include "vtkTexture.h" // used to include texture unit enum.
36 
37 class vtkPolyData;
38 class vtkRenderer;
39 class vtkRenderWindow;
40 
42 {
43 public:
44  static vtkPolyDataMapper *New();
45  vtkTypeMacro(vtkPolyDataMapper, vtkMapper);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
50 
52  virtual void Render(vtkRenderer *ren, vtkActor *act);
53 
55 
56  void SetInputData(vtkPolyData *in);
59 
61 
62  void Update();
63  void Update(int port);
65 
67 
68  vtkSetMacro(Piece, int);
69  vtkGetMacro(Piece, int);
70  vtkSetMacro(NumberOfPieces, int);
71  vtkGetMacro(NumberOfPieces, int);
72  vtkSetMacro(NumberOfSubPieces, int);
73  vtkGetMacro(NumberOfSubPieces, int);
75 
77 
78  vtkSetMacro(GhostLevel, int);
79  vtkGetMacro(GhostLevel, int);
81 
83 
85  virtual double *GetBounds();
86  virtual void GetBounds(double bounds[6])
87  { this->Superclass::GetBounds(bounds); }
89 
92 
94 
102  virtual void MapDataArrayToVertexAttribute(
103  const char* vertexAttributeName,
104  const char* dataArrayName, int fieldAssociation, int componentno = -1);
106 
107  virtual void MapDataArrayToMultiTextureAttribute(
108  int unit,
109  const char* dataArrayName, int fieldAssociation, int componentno = -1);
110 
112  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
113 
115  virtual void RemoveAllVertexAttributeMappings();
116 
118 
119  virtual int ProcessRequest(vtkInformation*,
123 
124 protected:
127 
132  virtual void ComputeBounds();
133 
134  int Piece;
138 
139  virtual int FillInputPortInformation(int, vtkInformation*);
140 
141 private:
142  vtkPolyDataMapper(const vtkPolyDataMapper&); // Not implemented.
143  void operator=(const vtkPolyDataMapper&); // Not implemented.
144 };
145 
146 #endif
virtual void GetBounds(double bounds[6])
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
void ShallowCopy(vtkAbstractMapper *m)
Store vtkAlgorithm input/output information.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
abstract specification for renderers
Definition: vtkRenderer.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
virtual double * GetBounds()=0
virtual void Update()
virtual int FillInputPortInformation(int port, vtkInformation *info)
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:89
abstract class specifies interface to map data
map vtkPolyData to graphics primitives
create a window for renderers to draw into
#define VTKRENDERINGCORE_EXPORT
virtual double * GetBounds()
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkDataSet * GetInput()
virtual void Render(vtkRenderer *ren, vtkActor *a)=0