VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkCompositeDataDisplayAttributes.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCompositeDataDisplayAttributes.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 =========================================================================*/
00026 #ifndef vtkCompositeDataDisplayAttributes_h
00027 #define vtkCompositeDataDisplayAttributes_h
00028 
00029 #include "vtkRenderingCoreModule.h" // for export macro
00030 #include "vtkObject.h"
00031 #include "vtkColor.h" // for vtkColor3d
00032 
00033 #include <map> // for std::map
00034 
00035 class VTKRENDERINGCORE_EXPORT vtkCompositeDataDisplayAttributes : public vtkObject
00036 {
00037 public:
00038   static vtkCompositeDataDisplayAttributes* New();
00039   vtkTypeMacro(vtkCompositeDataDisplayAttributes, vtkObject)
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043   bool HasBlockVisibilities() const;
00044 
00046 
00047   void SetBlockVisibility(unsigned int flat_index, bool visible);
00048   bool GetBlockVisibility(unsigned int flat_index) const;
00050 
00053   bool HasBlockVisibility(unsigned int flat_index) const;
00054 
00056   void RemoveBlockVisibility(unsigned int flat_index);
00057 
00060   void RemoveBlockVisibilites();
00061 
00063 
00064   void SetBlockColor(unsigned int flat_index, const double color[3]);
00065   void GetBlockColor(unsigned int flat_index, double color[3]) const;
00066   vtkColor3d GetBlockColor(unsigned int flat_index) const;
00068 
00070   bool HasBlockColors() const;
00071 
00073   bool HasBlockColor(unsigned int flat_index) const;
00074 
00076   void RemoveBlockColor(unsigned int flat_index);
00077 
00079   void RemoveBlockColors();
00080 
00082 
00083   void SetBlockOpacity(unsigned int flat_index, double opacity);
00084   double GetBlockOpacity(unsigned int flat_index) const;
00086 
00088   bool HasBlockOpacities() const;
00089 
00091   bool HasBlockOpacity(unsigned int flat_index) const;
00092 
00094   void RemoveBlockOpacity(unsigned int flat_index);
00095 
00097   void RemoveBlockOpacities();
00098 
00099 protected:
00100   vtkCompositeDataDisplayAttributes();
00101   ~vtkCompositeDataDisplayAttributes();
00102 
00103 private:
00104   vtkCompositeDataDisplayAttributes(const vtkCompositeDataDisplayAttributes&); // Not implemented.
00105   void operator=(const vtkCompositeDataDisplayAttributes&); // Not implemented.
00106 
00107 private:
00108   std::map<unsigned int, bool> BlockVisibilities;
00109   std::map<unsigned int, vtkColor3d> BlockColors;
00110   std::map<unsigned int, double> BlockOpacities;
00111 };
00112 
00113 #endif // vtkCompositeDataDisplayAttributes_h