VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOverlappingAMR.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 =========================================================================*/ 00033 #ifndef vtkOverlappingAmr_h 00034 #define vtkOverlappingAmr_h 00035 00036 #include "vtkCommonDataModelModule.h" // For export macro 00037 #include "vtkUniformGridAMR.h" 00038 00039 class vtkAMRBox; 00040 class vtkCompositeDataIterator; 00041 class vtkUniformGrid; 00042 class vtkAMRInformation; 00043 class vtkInformationIdTypeKey; 00044 00045 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR: public vtkUniformGridAMR 00046 { 00047 public: 00048 static vtkOverlappingAMR *New(); 00049 00051 virtual int GetDataObjectType() {return VTK_OVERLAPPING_AMR;} 00052 00053 vtkTypeMacro(vtkOverlappingAMR,vtkUniformGridAMR); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00057 virtual vtkCompositeDataIterator* NewIterator(); 00058 00060 00061 void SetOrigin(const double*); 00062 double* GetOrigin(); 00064 00066 00067 void SetSpacing(unsigned int level, const double spacing[3]); 00068 void GetSpacing(unsigned int level, double spacing[3]); 00070 00072 00073 void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box) ; 00074 const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id) ; 00076 00078 void GetBounds(unsigned int level, unsigned int id, double* bb); 00079 00080 00082 void GetOrigin(unsigned int level, unsigned int id, double origin[3]); 00083 00084 static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS(); 00085 00086 //BTX 00088 00089 static vtkOverlappingAMR* GetData(vtkInformation* info) 00090 { return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(info)); } 00091 static vtkOverlappingAMR* GetData(vtkInformationVector* v, int i=0) 00092 { return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(v, i)); } 00093 //ETX 00095 00102 void SetRefinementRatio(unsigned int level, int refRatio); 00103 00105 int GetRefinementRatio(unsigned int level); 00106 00108 00110 void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId); 00111 int GetAMRBlockSourceIndex(unsigned int level, unsigned int id); 00113 00116 int GetRefinementRatio(vtkCompositeDataIterator* iter); 00117 00119 bool HasChildrenInformation(); 00120 00123 void GenerateParentChildInformation(); 00124 00128 unsigned int *GetParents(unsigned int level, unsigned int index, unsigned int& numParents); 00129 00133 unsigned int *GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren); 00134 00136 void PrintParentChildInfo(unsigned int level, unsigned int index); 00137 00138 //Unhide superclass method 00139 void GetBounds(double b[6]) { Superclass::GetBounds(b);} 00140 00142 bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId); 00143 00145 00146 vtkAMRInformation* GetAMRInfo(){ return Superclass::GetAMRInfo();} 00147 virtual void SetAMRInfo(vtkAMRInformation* info){ return Superclass::SetAMRInfo(info);} 00149 00151 00154 void Audit(); 00155 protected: 00156 vtkOverlappingAMR(); 00157 virtual ~vtkOverlappingAMR(); 00159 00160 private: 00161 vtkOverlappingAMR(const vtkOverlappingAMR&); // Not implemented. 00162 void operator=(const vtkOverlappingAMR&); // Not implemented. 00163 }; 00164 00165 #endif