VTK
vtkCompositePolyDataMapper2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositePolyDataMapper2.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 vtkCompositePolyDataMapper2_h
26 #define vtkCompositePolyDataMapper2_h
27 
28 #include "vtkRenderingOpenGLModule.h" // For export macro
30 #include "vtkSmartPointer.h" // for vtkSmartPointer
31 
33 
34 class VTKRENDERINGOPENGL_EXPORT vtkCompositePolyDataMapper2 : public vtkPainterPolyDataMapper
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
51  bool GetIsOpaque() override;
52 
54 
57  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributesLegacy *attributes);
58  vtkCompositeDataDisplayAttributesLegacy* GetCompositeDataDisplayAttributes();
60 
62 
65  void SetBlockVisibility(unsigned int index, bool visible);
66  bool GetBlockVisibility(unsigned int index) const;
67  void RemoveBlockVisibility(unsigned int index);
68  void RemoveBlockVisibilities();
69  VTK_LEGACY(void RemoveBlockVisibilites());
71 
73 
76  void SetBlockColor(unsigned int index, double color[3]);
77  void SetBlockColor(unsigned int index, double r, double g, double b)
78  {
79  double color[3] = {r, g, b};
80  this->SetBlockColor(index, color);
81  }
82  double* GetBlockColor(unsigned int index);
83  void RemoveBlockColor(unsigned int index);
84  void RemoveBlockColors();
86 
88 
91  void SetBlockOpacity(unsigned int index, double opacity);
92  double GetBlockOpacity(unsigned int index);
93  void RemoveBlockOpacity(unsigned int index);
94  void RemoveBlockOpacities();
96 
97 protected:
99  ~vtkCompositePolyDataMapper2() override;
100 
107 
111  int FillInputPortInformation(int port, vtkInformation* info) override;
112 
116  void ComputeBounds() override;
117 
122  void UpdatePainterInformation() override;
123 
128 
133 
135 
136 private:
137  vtkMTimeType LastOpaqueCheckTime;
138  bool LastOpaqueCheckValue;
139 
140 private:
142  void operator=(const vtkCompositePolyDataMapper2&) = delete;
143 
144 };
145 
146 #endif
rendering attributes for a multi-block dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void UpdatePainterInformation()
Called when the PainterInformation becomes obsolete.
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
mapper for composite dataset consisting of polygonal data.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
void ComputeBounds() override
Called in GetBounds().
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:49
void SetBlockColor(unsigned int index, double r, double g, double b)
Set/get the color for a block given its flat index.
a simple class to control print indentation
Definition: vtkIndent.h:39
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
static vtkPainterPolyDataMapper * New()
Abstract class for drawing poly data.
Definition: vtkPainter.h:61
bool GetIsOpaque() override
Returns if the mapper does not expect to have translucent geometry.
vtkTimeStamp BoundsMTime
Time stamp for computation of bounds.
PolyDataMapper using painters.
vtkSmartPointer< vtkCompositeDataDisplayAttributesLegacy > CompositeAttributes
Composite data set attributes.