VTK
vtkCompositePainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositePainter.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 vtkCompositePainter_h
26 #define vtkCompositePainter_h
27 
28 #include "vtkRenderingOpenGLModule.h" // For export macro
29 #include "vtkPainter.h"
30 #include "vtkColor.h" // needed for vtkColor3d
31 #include <stack> // needed for RenderBlockState.
32 
35 class vtkProperty;
36 class vtkRenderWindow;
37 
38 class VTKRENDERINGOPENGL_EXPORT vtkCompositePainter : public vtkPainter
39 {
40 public:
41  static vtkCompositePainter* New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
49  virtual vtkDataObject* GetOutput();
50 
55  static vtkInformationObjectBaseKey* DISPLAY_ATTRIBUTES();
56 
62  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *attributes);
63  vtkGetObjectMacro(CompositeDataDisplayAttributes, vtkCompositeDataDisplayAttributes)
64 
65 protected:
67  ~vtkCompositePainter();
68 
72  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
73 
78  virtual void ProcessInformation(vtkInformation* information);
79 
87  virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
88  unsigned long typeflags, bool forceCompileOnly);
89 
91  {
92  public:
93  std::stack<bool> Visibility;
94  std::stack<double> Opacity;
95  std::stack<vtkColor3d> AmbientColor;
96  std::stack<vtkColor3d> DiffuseColor;
97  std::stack<vtkColor3d> SpecularColor;
98 
103  };
104 
105  void RenderBlock(vtkRenderer *renderer,
106  vtkActor *actor,
107  unsigned long typeflags,
108  bool forceCompileOnly,
109  vtkDataObject *dobj,
110  unsigned int &flat_index,
111  RenderBlockState &state);
112 
116  virtual void UpdateRenderingState(
118 
121 private:
122  vtkCompositePainter(const vtkCompositePainter&) VTK_DELETE_FUNCTION;
123  void operator=(const vtkCompositePainter&) VTK_DELETE_FUNCTION;
124 
125 };
126 
127 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
painter that can be inserted before any vtkDataSet painting chain to handle composite datasets...
Store vtkAlgorithm input/output information.
represent surface properties of a geometric object
Definition: vtkProperty.h:64
rendering attributes for a multi-block dataset.
virtual vtkDataObject * GetOutput()
Get the output data object from this painter.
Definition: vtkPainter.h:174
abstract specification for renderers
Definition: vtkRenderer.h:63
Detect and break reference loops.
vtkCompositeDataDisplayAttributes * CompositeDataDisplayAttributes
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for vtkObjectBase values.
vtkDataObject * OutputData
create a window for renderers to draw into
virtual void UpdateRenderingState(vtkRenderWindow *, vtkProperty *, RenderBlockState &)
Overridden in vtkOpenGLCompositePainter to pass attributes to OpenGL.
Abstract class for drawing poly data.
Definition: vtkPainter.h:61
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:64
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.