00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCoincidentTopologyResolutionPainter.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 =========================================================================*/ 00025 #ifndef __vtkCoincidentTopologyResolutionPainter_h 00026 #define __vtkCoincidentTopologyResolutionPainter_h 00027 00028 #include "vtkPolyDataPainter.h" 00029 00030 class vtkInformationIntegerKey; 00031 class vtkInformationDoubleKey; 00032 class vtkInformationDoubleVectorKey; 00033 00034 class VTK_RENDERING_EXPORT vtkCoincidentTopologyResolutionPainter : 00035 public vtkPolyDataPainter 00036 { 00037 public: 00038 static vtkCoincidentTopologyResolutionPainter* New(); 00039 vtkTypeMacro(vtkCoincidentTopologyResolutionPainter, 00040 vtkPolyDataPainter); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00053 static vtkInformationIntegerKey* RESOLVE_COINCIDENT_TOPOLOGY(); 00054 00057 static vtkInformationDoubleKey* Z_SHIFT(); 00058 00061 static vtkInformationDoubleVectorKey* POLYGON_OFFSET_PARAMETERS(); 00062 00066 static vtkInformationIntegerKey* POLYGON_OFFSET_FACES(); 00067 protected: 00068 vtkCoincidentTopologyResolutionPainter(); 00069 ~vtkCoincidentTopologyResolutionPainter(); 00070 00073 virtual void ProcessInformation(vtkInformation*); 00074 00075 // These are method to set ivars. These are purpisefully protected. 00076 // The only means to affect these values is thru information object. 00077 vtkSetMacro(ResolveCoincidentTopology, int); 00078 vtkSetMacro(ZShift, double); 00079 vtkSetMacro(OffsetFaces, int); 00080 void SetPolygonOffsetParameters(double factor, double units) 00081 { 00082 if (this->PolygonOffsetFactor != factor || 00083 this->PolygonOffsetUnits != units) 00084 { 00085 this->PolygonOffsetFactor = factor; 00086 this->PolygonOffsetUnits = units; 00087 this->Modified(); 00088 } 00089 } 00090 00091 int ResolveCoincidentTopology; 00092 double PolygonOffsetFactor; 00093 double PolygonOffsetUnits; 00094 double ZShift; 00095 int OffsetFaces; 00096 private: 00097 vtkCoincidentTopologyResolutionPainter(const vtkCoincidentTopologyResolutionPainter&); // Not implemented. 00098 void operator=(const vtkCoincidentTopologyResolutionPainter&); // Not implemented. 00099 }; 00100 00101 00102 #endif 00103