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);
43 
47  virtual void RenderPiece(vtkRenderer *ren, vtkActor *act);
48 
50 
56  vtkGetObjectMacro(Painter, vtkPainter);
57  void SetPainter(vtkPainter*);
59 
66 
78  virtual void MapDataArrayToVertexAttribute(
79  const char* vertexAttributeName,
80  const char* dataArrayName, int fieldAssociation, int componentno=-1);
81 
83  int unit,
84  const char* dataArrayName, int fieldAssociation, int componentno=-1);
85 
89  virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
90 
94  virtual void RemoveAllVertexAttributeMappings();
95 
97 
100  vtkGetObjectMacro(SelectionPainter, vtkPainter);
101  void SetSelectionPainter(vtkPainter*);
103 
110  virtual bool GetSupportsSelection()
111  { return (this->SelectionPainter != 0); }
112 
123  virtual bool GetIsOpaque();
124 
125 protected:
128 
134  virtual void ComputeBounds();
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
virtual void MapDataArrayToMultiTextureAttribute(int unit, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:119
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
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
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkPolyDataMapper * New()
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
PolyDataMapper using painters.