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 
60 
62 
65  void SetBlockVisibility(unsigned int index, bool visible);
66  bool GetBlockVisibility(unsigned int index) const;
67  void RemoveBlockVisibility(unsigned int index);
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);
85 
87 
90  void SetBlockOpacity(unsigned int index, double opacity);
91  double GetBlockOpacity(unsigned int index);
92  void RemoveBlockOpacity(unsigned int index);
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
vtkCompositePolyDataMapper2::CompositeAttributes
vtkSmartPointer< vtkCompositeDataDisplayAttributes > CompositeAttributes
Composite data set attributes.
Definition: vtkCompositePolyDataMapper2.h:131
vtkCompositePolyDataMapper2::RemoveBlockOpacities
void RemoveBlockOpacities()
vtkCompositePolyDataMapper2::GetBlockColor
double * GetBlockColor(unsigned int index)
vtkCompositePolyDataMapper2::SetBlockVisibility
void SetBlockVisibility(unsigned int index, bool visible)
Set/get the visibility for a block given its flat index.
vtkCompositePolyDataMapper2::GetIsOpaque
virtual bool GetIsOpaque()
Returns if the mapper does not expect to have translucent geometry.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPainterPolyDataMapper
PolyDataMapper using painters.
Definition: vtkPainterPolyDataMapper.h:38
vtkCompositePolyDataMapper2::~vtkCompositePolyDataMapper2
~vtkCompositePolyDataMapper2()
vtkSmartPointer< vtkCompositeDataDisplayAttributes >
vtkCompositePolyDataMapper2::BoundsMTime
vtkTimeStamp BoundsMTime
Time stamp for computation of bounds.
Definition: vtkCompositePolyDataMapper2.h:126
vtkCompositePolyDataMapper2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCompositePolyDataMapper2::SelectionCompositePainter
vtkPainter * SelectionCompositePainter
Definition: vtkCompositePolyDataMapper2.h:133
vtkCompositePolyDataMapper2
mapper for composite dataset consisting of polygonal data.
Definition: vtkCompositePolyDataMapper2.h:35
vtkCompositePolyDataMapper2::RemoveBlockColor
void RemoveBlockColor(unsigned int index)
vtkCompositePolyDataMapper2::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Need to define the type of data handled by this mapper.
vtkCompositeDataDisplayAttributes
rendering attributes for a multi-block dataset.
Definition: vtkCompositeDataDisplayAttributes.h:40
vtkCompositePolyDataMapper2::SetBlockOpacity
void SetBlockOpacity(unsigned int index, double opacity)
Set/get the opacity for a block given its flat index.
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkCompositePolyDataMapper2::GetCompositeDataDisplayAttributes
vtkCompositeDataDisplayAttributes * GetCompositeDataDisplayAttributes()
vtkX3D::color
@ color
Definition: vtkX3D.h:221
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:50
vtkCompositePolyDataMapper2::UpdatePainterInformation
virtual void UpdatePainterInformation()
Called when the PainterInformation becomes obsolete.
vtkCompositePolyDataMapper2::GetBlockOpacity
double GetBlockOpacity(unsigned int index)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPainter
Abstract class for drawing poly data.
Definition: vtkPainter.h:62
vtkSmartPointer.h
vtkCompositePolyDataMapper2::SetBlockColor
void SetBlockColor(unsigned int index, double r, double g, double b)
Definition: vtkCompositePolyDataMapper2.h:76
vtkCompositePolyDataMapper2::RemoveBlockColors
void RemoveBlockColors()
vtkCompositePolyDataMapper2::ComputeBounds
virtual void ComputeBounds()
Need to loop over the hierarchy to compute bounds.
vtkCompositePolyDataMapper2::RemoveBlockOpacity
void RemoveBlockOpacity(unsigned int index)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkCompositePolyDataMapper2::New
static vtkCompositePolyDataMapper2 * New()
vtkPainterPolyDataMapper.h
vtkCompositePolyDataMapper2::RemoveBlockVisibilites
void RemoveBlockVisibilites()
vtkCompositePolyDataMapper2::SetBlockColor
void SetBlockColor(unsigned int index, double color[3])
Set/get the color for a block given its flat index.
vtkCompositePolyDataMapper2::RemoveBlockVisibility
void RemoveBlockVisibility(unsigned int index)
vtkCompositePolyDataMapper2::CreateDefaultExecutive
vtkExecutive * CreateDefaultExecutive()
We need to override this method because the standard streaming demand driven pipeline is not what we ...
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkCompositePolyDataMapper2::SetCompositeDataDisplayAttributes
void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *attributes)
Set/get the composite data set attributes.
vtkCompositePolyDataMapper2::GetBlockVisibility
bool GetBlockVisibility(unsigned int index) const
vtkCompositePolyDataMapper2::vtkCompositePolyDataMapper2
vtkCompositePolyDataMapper2()