VTK
vtkChooserPainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkChooserPainter.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 vtkChooserPainter_h
29 #define vtkChooserPainter_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
32 #include "vtkPolyDataPainter.h"
33 
34 class VTKRENDERINGOPENGL_EXPORT vtkChooserPainter : public vtkPolyDataPainter
35 {
36 public:
37  static vtkChooserPainter *New();
39  void PrintSelf(ostream &os, vtkIndent indent);
40 
41  void SetVertPainter(vtkPolyDataPainter*);
42  void SetLinePainter(vtkPolyDataPainter*);
43  void SetPolyPainter(vtkPolyDataPainter*);
44  void SetStripPainter(vtkPolyDataPainter*);
45 
46  /*
47  * Release any graphics resources that are being consumed by this mapper.
48  * The parameter window could be used to determine which graphic
49  * resources to release. Merely propagates the call to the painter.
50  */
51  // void ReleaseGraphicsResources(vtkWindow *);
52 
53 protected:
56 
61 
62 
63 
72  virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
73 
78  virtual void ChoosePainters(vtkRenderer *renderer, vtkActor*);
79 
84  virtual void SelectPainters(vtkRenderer *renderer, vtkActor* actor,
85  const char *&vertpaintertype,
86  const char *&linepaintertype,
87  const char *&polypaintertype,
88  const char *&strippaintertype);
89 
93  virtual void UpdateChoosenPainters();
94 
98  virtual vtkPolyDataPainter *CreatePainter(const char *paintertype);
99 
107  virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
108  unsigned long typeflags, bool forceCompileOnly);
109 
113  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
114 
117 
118 private:
119  vtkChooserPainter(const vtkChooserPainter &) VTK_DELETE_FUNCTION;
120  void operator=(const vtkChooserPainter &) VTK_DELETE_FUNCTION;
121 };
122 
123 #endif //_vtkChooserPainter_h
vtkTimeStamp PaintersChoiceTime
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
virtual void RenderInternal(vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
Performs the actual rendering.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual void PrepareForRendering(vtkRenderer *, vtkActor *)
Some subclasses may need to do some preprocessing before the actual rendering can be done eg...
Definition: vtkPainter.h:210
abstract specification for renderers
Definition: vtkRenderer.h:63
Detect and break reference loops.
void ReportReferences(vtkGarbageCollector *collector) override
Take part in garbage collection.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPolyDataPainter * PolyPainter
vtkPolyDataPainter * StripPainter
vtkPolyDataPainter * VertPainter
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataPainter * LinePainter
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Painter that selects painters to render primitives.
Abstract class for drawing poly data.
vtkRenderer * LastRenderer