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) override;
44 
49  vtkDataObject* GetOutput() override;
50 
55  static vtkInformationObjectBaseKey* DISPLAY_ATTRIBUTES();
56 
62  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributesLegacy *attributes);
63  vtkGetObjectMacro(CompositeDataDisplayAttributes, vtkCompositeDataDisplayAttributesLegacy)
64 
65 protected:
67  ~vtkCompositePainter() override;
68 
72  void ReportReferences(vtkGarbageCollector *collector) override;
73 
78  void ProcessInformation(vtkInformation* information) override;
79 
87  void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
88  unsigned long typeflags, bool forceCompileOnly) override;
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&) = delete;
123  void operator=(const vtkCompositePainter&) = delete;
124 
125 };
126 
127 #endif
rendering attributes for a multi-block dataset.
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...
virtual void RenderInternal(vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
Performs the actual rendering.
Store vtkAlgorithm input/output information.
represent surface properties of a geometric object
Definition: vtkProperty.h:65
virtual void ProcessInformation(vtkInformation *)
Called before RenderInternal() if the Information has been changed since the last time this method wa...
Definition: vtkPainter.h:233
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.
void ReportReferences(vtkGarbageCollector *collector) override
Take part in garbage collection.
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
vtkCompositeDataDisplayAttributesLegacy * CompositeDataDisplayAttributes
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
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.