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 =========================================================================*/
28 #ifndef vtkPainterPolyDataMapper_h
29 #define vtkPainterPolyDataMapper_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
32 #include "vtkPolyDataMapper.h"
33 
34 class vtkPainterPolyDataMapperObserver;
35 class vtkPainter;
36 
37 class VTKRENDERINGOPENGL_EXPORT vtkPainterPolyDataMapper : public vtkPolyDataMapper
38 {
39 public:
40  static vtkPainterPolyDataMapper* New();
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
47  void RenderPiece(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
48 
50 
56  vtkGetObjectMacro(Painter, vtkPainter);
57  void SetPainter(vtkPainter*);
59 
65  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
66 
78  void MapDataArrayToVertexAttribute(
79  const char* vertexAttributeName,
80  const char* dataArrayName, int fieldAssociation, int componentno=-1) VTK_OVERRIDE;
81 
82  void MapDataArrayToMultiTextureAttribute(
83  int unit,
84  const char* dataArrayName, int fieldAssociation, int componentno=-1) VTK_OVERRIDE;
85 
89  void RemoveVertexAttributeMapping(const char* vertexAttributeName) VTK_OVERRIDE;
90 
94  void RemoveAllVertexAttributeMappings() VTK_OVERRIDE;
95 
97 
100  vtkGetObjectMacro(SelectionPainter, vtkPainter);
101  void SetSelectionPainter(vtkPainter*);
103 
110  bool GetSupportsSelection() VTK_OVERRIDE
111  { return (this->SelectionPainter != 0); }
112 
123  bool GetIsOpaque() VTK_OVERRIDE;
124 
125 protected:
127  ~vtkPainterPolyDataMapper() VTK_OVERRIDE;
128 
134  void ComputeBounds() VTK_OVERRIDE;
135 
140  virtual void UpdatePainterInformation();
141 
145  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
146 
150  // Painter used when rendering for hardware selection
151  // (look at vtkHardwareSelector).
153  vtkPainterPolyDataMapperObserver* Observer;
154 private:
155  vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&) VTK_DELETE_FUNCTION;
156  void operator=(const vtkPainterPolyDataMapper&) VTK_DELETE_FUNCTION;
157 };
158 
159 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
Store vtkAlgorithm input/output information.
void ReportReferences(vtkGarbageCollector *) override
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkPainterPolyDataMapperObserver * Observer
abstract specification for renderers
Definition: vtkRenderer.h:63
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:37
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ComputeBounds()
Called in GetBounds().
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:119