VTK
vtkPainterPolyDataMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPainterPolyDataMapper.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 =========================================================================*/
27 #ifndef __vtkPainterPolyDataMapper_h
28 #define __vtkPainterPolyDataMapper_h
29 
30 #include "vtkPolyDataMapper.h"
31 
32 class vtkPainterPolyDataMapperObserver;
33 class vtkPainter;
34 
36 {
37 public:
38  static vtkPainterPolyDataMapper* New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act);
44 
46 
50  vtkGetObjectMacro(Painter, vtkPainter);
51  void SetPainter(vtkPainter*);
53 
58 
60 
68  virtual void MapDataArrayToVertexAttribute(
69  const char* vertexAttributeName,
70  const char* dataArrayName, int fieldAssociation, int componentno=-1);
72 
74  int unit,
75  const char* dataArrayName, int fieldAssociation, int componentno=-1);
76 
78  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
79 
81  virtual void RemoveAllVertexAttributeMappings();
82 
84 
85  vtkGetObjectMacro(SelectionPainter, vtkPainter);
86  void SetSelectionPainter(vtkPainter*);
88 
90 
94  virtual bool GetSupportsSelection()
95  { return (this->SelectionPainter != 0); }
97 
98 protected:
101 
106  virtual void ComputeBounds();
107 
110  virtual void UpdatePainterInformation();
111 
113  virtual void ReportReferences(vtkGarbageCollector *collector);
114 
118  // Painter used when rendering for hardware selection
119  // (look at vtkHardwareSelector).
121  vtkPainterPolyDataMapperObserver* Observer;
122 private:
123  vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented.
124  void operator=(const vtkPainterPolyDataMapper&); // Not implemented.
125 };
126 
127 #endif
128