VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkExtentSplitter.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 =========================================================================*/ 00028 #ifndef __vtkExtentSplitter_h 00029 #define __vtkExtentSplitter_h 00030 00031 #include "vtkObject.h" 00032 00033 class vtkExtentSplitterInternals; 00034 00035 class VTK_COMMON_EXPORT vtkExtentSplitter : public vtkObject 00036 { 00037 public: 00038 vtkTypeMacro(vtkExtentSplitter,vtkObject); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 static vtkExtentSplitter *New(); 00041 00043 00046 void AddExtentSource(int id, int priority, int x0, int x1, 00047 int y0, int y1, int z0, int z1); 00048 void AddExtentSource(int id, int priority, int* extent); 00049 void RemoveExtentSource(int id); 00050 void RemoveAllExtentSources(); 00052 00054 00056 void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1); 00057 void AddExtent(int* extent); 00059 00064 int ComputeSubExtents(); 00065 00069 int GetNumberOfSubExtents(); 00070 00072 00075 int* GetSubExtent(int index); 00076 void GetSubExtent(int index, int* extent); 00078 00082 int GetSubExtentSource(int index); 00083 00085 00090 vtkGetMacro(PointMode, int); 00091 vtkSetMacro(PointMode, int); 00092 vtkBooleanMacro(PointMode, int); 00094 00095 protected: 00096 vtkExtentSplitter(); 00097 ~vtkExtentSplitter(); 00098 00099 // Internal utility methods. 00100 void SplitExtent(int* extent, int* subextent); 00101 int IntersectExtents(const int* extent1, const int* extent2, int* result); 00102 int Min(int a, int b); 00103 int Max(int a, int b); 00104 00105 // Internal implementation data. 00106 vtkExtentSplitterInternals* Internal; 00107 00108 // On if reading only all points (but not always all cells) is 00109 // necessary. Used for reading volumes of planar slices storing 00110 // only point data. 00111 int PointMode; 00112 00113 private: 00114 vtkExtentSplitter(const vtkExtentSplitter&); // Not implemented. 00115 void operator=(const vtkExtentSplitter&); // Not implemented. 00116 }; 00117 00118 #endif