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);
40 
51  virtual bool GetIsOpaque();
52 
54 
57  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *attributes);
58  vtkCompositeDataDisplayAttributes* 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 RemoveBlockVisibilites();
70 
72 
75  void SetBlockColor(unsigned int index, double color[3]);
76  void SetBlockColor(unsigned int index, double r, double g, double b)
77  {
78  double color[3] = {r, g, b};
79  this->SetBlockColor(index, color);
80  }
81  double* GetBlockColor(unsigned int index);
82  void RemoveBlockColor(unsigned int index);
83  void RemoveBlockColors();
85 
87 
90  void SetBlockOpacity(unsigned int index, double opacity);
91  double GetBlockOpacity(unsigned int index);
92  void RemoveBlockOpacity(unsigned int index);
93  void RemoveBlockOpacities();
95 
96 protected:
99 
106 
111 
115  virtual void ComputeBounds();
116 
121  virtual void UpdatePainterInformation();
122 
127 
132 
134 
135 private:
136  vtkMTimeType LastOpaqueCheckTime;
137  bool LastOpaqueCheckValue;
138 
139 private:
140  vtkCompositePolyDataMapper2(const vtkCompositePolyDataMapper2&) VTK_DELETE_FUNCTION;
141  void operator=(const vtkCompositePolyDataMapper2&) VTK_DELETE_FUNCTION;
142 
143 };
144 
145 #endif
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
virtual void UpdatePainterInformation()
Called when the PainterInformation becomes obsolete.
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
Store vtkAlgorithm input/output information.
mapper for composite dataset consisting of polygonal data.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
rendering attributes for a multi-block dataset.
vtkSmartPointer< vtkCompositeDataDisplayAttributes > CompositeAttributes
Composite data set attributes.
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:49
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
void SetBlockColor(unsigned int index, double r, double g, double b)
Set/get the color for a block given its flat index.
virtual void ComputeBounds()
Called in GetBounds().
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkPainterPolyDataMapper * New()
virtual bool GetIsOpaque()
Returns if the mapper does not expect to have translucent geometry.
Abstract class for drawing poly data.
Definition: vtkPainter.h:61
vtkTimeStamp BoundsMTime
Time stamp for computation of bounds.
PolyDataMapper using painters.