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 =========================================================================*/
25 #ifndef vtkPainterPolyDataMapper_h
26 #define vtkPainterPolyDataMapper_h
27 
28 #include "vtkRenderingOpenGLModule.h" // For export macro
29 #include "vtkPolyDataMapper.h"
30 
31 class vtkPainterPolyDataMapperObserver;
32 class vtkPainter;
33 
34 class VTKRENDERINGOPENGL_EXPORT vtkPainterPolyDataMapper : public vtkPolyDataMapper
35 {
36 public:
37  static vtkPainterPolyDataMapper* New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
44  void RenderPiece(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
45 
47 
53  vtkGetObjectMacro(Painter, vtkPainter);
54  void SetPainter(vtkPainter*);
56 
62  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
63 
75  void MapDataArrayToVertexAttribute(
76  const char* vertexAttributeName,
77  const char* dataArrayName, int fieldAssociation, int componentno=-1) VTK_OVERRIDE;
78 
79  void MapDataArrayToMultiTextureAttribute(
80  int unit,
81  const char* dataArrayName, int fieldAssociation, int componentno=-1) VTK_OVERRIDE;
82 
86  void RemoveVertexAttributeMapping(const char* vertexAttributeName) VTK_OVERRIDE;
87 
91  void RemoveAllVertexAttributeMappings() VTK_OVERRIDE;
92 
94 
97  vtkGetObjectMacro(SelectionPainter, vtkPainter);
98  void SetSelectionPainter(vtkPainter*);
100 
107  bool GetSupportsSelection() VTK_OVERRIDE
108  { return (this->SelectionPainter != 0); }
109 
120  bool GetIsOpaque() VTK_OVERRIDE;
121 
122 protected:
124  ~vtkPainterPolyDataMapper() VTK_OVERRIDE;
125 
131  void ComputeBounds() VTK_OVERRIDE;
132 
137  virtual void UpdatePainterInformation();
138 
142  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
143 
144  vtkInformation* PainterInformation;
145  vtkTimeStamp PainterUpdateTime;
146  vtkPainter* Painter;
147  // Painter used when rendering for hardware selection
148  // (look at vtkHardwareSelector).
149  vtkPainter* SelectionPainter;
150  vtkPainterPolyDataMapperObserver* Observer;
151 private:
152  vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkPainterPolyDataMapper&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
abstract specification for renderers
Definition: vtkRenderer.h:57
virtual bool GetIsOpaque()
Returns if the mapper does not expect to have translucent geometry.
virtual void RenderPiece(vtkRenderer *ren, vtkActor *act)=0
Implemented by sub classes.
Detect and break reference loops.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
map vtkPolyData to graphics primitives
Abstract class for drawing poly data.
Definition: vtkPainter.h:61
static vtkPolyDataMapper * New()
PolyDataMapper using painters.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:113