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) override;
43 
47  void RenderPiece(vtkRenderer *ren, vtkActor *act) override;
48 
50 
56  vtkGetObjectMacro(Painter, vtkPainter);
57  void SetPainter(vtkPainter*);
59 
65  void ReleaseGraphicsResources(vtkWindow *) override;
66 
79  const char* vertexAttributeName,
80  const char* dataArrayName, int fieldAssociation, int componentno=-1) override;
81 
83  int unit,
84  const char* dataArrayName, int fieldAssociation, int componentno=-1) override;
85 
89  void RemoveVertexAttributeMapping(const char* vertexAttributeName) override;
90 
94  void RemoveAllVertexAttributeMappings() override;
95 
97 
100  vtkGetObjectMacro(SelectionPainter, vtkPainter);
101  void SetSelectionPainter(vtkPainter*);
103 
110  bool GetSupportsSelection() override
111  { return (this->SelectionPainter != 0); }
112 
123  bool GetIsOpaque() override;
124 
125 protected:
127  ~vtkPainterPolyDataMapper() override;
128 
134  void ComputeBounds() override;
135 
140  virtual void UpdatePainterInformation();
141 
145  void ReportReferences(vtkGarbageCollector *collector) override;
146 
150  // Painter used when rendering for hardware selection
151  // (look at vtkHardwareSelector).
153  vtkPainterPolyDataMapperObserver* Observer;
154 private:
156  void operator=(const vtkPainterPolyDataMapper&) = delete;
157 };
158 
159 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
virtual void MapDataArrayToMultiTextureAttribute(int unit, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
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.
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
Detect and break reference loops.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
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().
virtual void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
Select a data array from the point/cell data and map it to a generic vertex attribute.
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:111