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 =========================================================================*/
28 #ifndef vtkCompositePolyDataMapper2_h
29 #define vtkCompositePolyDataMapper2_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkSmartPointer.h" // for vtkSmartPointer
34 
36 
37 class VTKRENDERINGOPENGL_EXPORT vtkCompositePolyDataMapper2 : public vtkPainterPolyDataMapper
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
54  bool GetIsOpaque() override;
55 
57 
60  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributesLegacy *attributes);
61  vtkCompositeDataDisplayAttributesLegacy* GetCompositeDataDisplayAttributes();
63 
65 
68  void SetBlockVisibility(unsigned int index, bool visible);
69  bool GetBlockVisibility(unsigned int index) const;
70  void RemoveBlockVisibility(unsigned int index);
71  void RemoveBlockVisibilities();
72  VTK_LEGACY(void RemoveBlockVisibilites());
74 
76 
79  void SetBlockColor(unsigned int index, double color[3]);
80  void SetBlockColor(unsigned int index, double r, double g, double b)
81  {
82  double color[3] = {r, g, b};
83  this->SetBlockColor(index, color);
84  }
85  double* GetBlockColor(unsigned int index);
86  void RemoveBlockColor(unsigned int index);
87  void RemoveBlockColors();
89 
91 
94  void SetBlockOpacity(unsigned int index, double opacity);
95  double GetBlockOpacity(unsigned int index);
96  void RemoveBlockOpacity(unsigned int index);
97  void RemoveBlockOpacities();
99 
100 protected:
102  ~vtkCompositePolyDataMapper2() override;
103 
110 
114  int FillInputPortInformation(int port, vtkInformation* info) override;
115 
119  void ComputeBounds() override;
120 
125  void UpdatePainterInformation() override;
126 
131 
136 
138 
139 private:
140  vtkMTimeType LastOpaqueCheckTime;
141  bool LastOpaqueCheckValue;
142 
143 private:
145  void operator=(const vtkCompositePolyDataMapper2&) = delete;
146 
147 };
148 
149 #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.