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 "vtkMapper.h"
34 #include "vtkTexture.h" // used to include texture unit enum.
35 
36 class vtkPolyData;
37 class vtkRenderer;
38 class vtkRenderWindow;
39 
41 {
42 public:
43  static vtkPolyDataMapper *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0;
49 
51  virtual void Render(vtkRenderer *ren, vtkActor *act);
52 
54 
55  void SetInput(vtkPolyData *in);
58 
60  void Update();
61 
63 
64  vtkSetMacro(Piece, int);
65  vtkGetMacro(Piece, int);
66  vtkSetMacro(NumberOfPieces, int);
67  vtkGetMacro(NumberOfPieces, int);
68  vtkSetMacro(NumberOfSubPieces, int);
69  vtkGetMacro(NumberOfSubPieces, int);
71 
73 
74  vtkSetMacro(GhostLevel, int);
75  vtkGetMacro(GhostLevel, int);
77 
79 
81  virtual double *GetBounds();
82  virtual void GetBounds(double bounds[6])
83  {this->Superclass::GetBounds(bounds);};
85 
88 
90 
98  virtual void MapDataArrayToVertexAttribute(
99  const char* vertexAttributeName,
100  const char* dataArrayName, int fieldAssociation, int componentno=-1);
102 
103  virtual void MapDataArrayToMultiTextureAttribute(
104  int unit,
105  const char* dataArrayName, int fieldAssociation, int componentno=-1);
106 
108  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
109 
111  virtual void RemoveAllVertexAttributeMappings();
112 
113 protected:
116 
121  virtual void ComputeBounds();
122 
123  int Piece;
127 
128  virtual int FillInputPortInformation(int, vtkInformation*);
129 
130 private:
131  vtkPolyDataMapper(const vtkPolyDataMapper&); // Not implemented.
132  void operator=(const vtkPolyDataMapper&); // Not implemented.
133 };
134 
135 #endif