VTK
dox/Rendering/Core/vtkCompositePolyDataMapper2.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCompositePolyDataMapper2.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkCompositePolyDataMapper2_h
00028 #define __vtkCompositePolyDataMapper2_h
00029 
00030 #include "vtkRenderingCoreModule.h" // For export macro
00031 #include "vtkPainterPolyDataMapper.h"
00032 #include "vtkSmartPointer.h" // for vtkSmartPointer
00033 
00034 class vtkCompositeDataDisplayAttributes;
00035 
00036 class VTKRENDERINGCORE_EXPORT vtkCompositePolyDataMapper2 : public vtkPainterPolyDataMapper
00037 {
00038 public:
00039   static vtkCompositePolyDataMapper2* New();
00040   vtkTypeMacro(vtkCompositePolyDataMapper2, vtkPainterPolyDataMapper);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00051   virtual bool GetIsOpaque();
00052 
00054 
00055   void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *attributes);
00056   vtkCompositeDataDisplayAttributes* GetCompositeDataDisplayAttributes();
00058 
00060 
00061   void SetBlockVisibility(unsigned int index, bool visible);
00062   bool GetBlockVisibility(unsigned int index) const;
00063   void RemoveBlockVisibility(unsigned int index);
00064   void RemoveBlockVisibilites();
00066 
00068 
00069   void SetBlockColor(unsigned int index, double color[3]);
00070   void SetBlockColor(unsigned int index, double r, double g, double b)
00071     {
00072     double color[3] = {r, g, b};
00073     this->SetBlockColor(index, color);
00074     }
00075   double* GetBlockColor(unsigned int index);
00076   void RemoveBlockColor(unsigned int index);
00077   void RemoveBlockColors();
00079 
00081 
00082   void SetBlockOpacity(unsigned int index, double opacity);
00083   double GetBlockOpacity(unsigned int index);
00084   void RemoveBlockOpacity(unsigned int index);
00085   void RemoveBlockOpacities();
00087 
00088 //BTX
00089 protected:
00090   vtkCompositePolyDataMapper2();
00091   ~vtkCompositePolyDataMapper2();
00092 
00096   vtkExecutive* CreateDefaultExecutive();
00097 
00099   virtual int FillInputPortInformation(int port, vtkInformation* info);
00100 
00102   virtual void ComputeBounds();
00103 
00106   virtual void UpdatePainterInformation();
00107 
00109   vtkTimeStamp BoundsMTime;
00110 
00112   vtkSmartPointer<vtkCompositeDataDisplayAttributes> CompositeAttributes;
00113 
00114   vtkPainter* SelectionCompositePainter;
00115 
00116 private:
00117   vtkCompositePolyDataMapper2(const vtkCompositePolyDataMapper2&); // Not implemented.
00118   void operator=(const vtkCompositePolyDataMapper2&); // Not implemented.
00119 //ETX
00120 };
00121 
00122 #endif
00123 
00124