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 00064 00067 static vtkInformationIntegerKey* POLYGON_OFFSET_FACES(); 00068 protected: 00069 vtkCoincidentTopologyResolutionPainter(); 00070 ~vtkCoincidentTopologyResolutionPainter(); 00072 00075 virtual void ProcessInformation(vtkInformation*); 00076 00077 // These are method to set ivars. These are purpisefully protected. 00078 // The only means to affect these values is thru information object. 00079 vtkSetMacro(ResolveCoincidentTopology, int); 00080 vtkSetMacro(ZShift, double); 00081 vtkSetMacro(OffsetFaces, int); 00082 void SetPolygonOffsetParameters(double factor, double units) 00083 { 00084 if (this->PolygonOffsetFactor != factor || 00085 this->PolygonOffsetUnits != units) 00086 { 00087 this->PolygonOffsetFactor = factor; 00088 this->PolygonOffsetUnits = units; 00089 this->Modified(); 00090 } 00091 } 00092 00093 int ResolveCoincidentTopology; 00094 double PolygonOffsetFactor; 00095 double PolygonOffsetUnits; 00096 double ZShift; 00097 int OffsetFaces; 00098 private: 00099 vtkCoincidentTopologyResolutionPainter(const vtkCoincidentTopologyResolutionPainter&); // Not implemented. 00100 void operator=(const vtkCoincidentTopologyResolutionPainter&); // Not implemented. 00101 }; 00102 00103 00104 #endif 00105