23 #ifndef VTKAMRCUTPLANE_H_
24 #define VTKAMRCUTPLANE_H_
26 #include "vtkFiltersAMRModule.h"
27 #include "vtkMultiBlockDataSetAlgorithm.h"
32 class vtkMultiBlockDataSet;
33 class vtkOverlappingAMR;
34 class vtkMultiProcessController;
36 class vtkInformationVector;
46 class VTKFILTERSAMR_EXPORT
vtkAMRCutPlane :
public vtkMultiBlockDataSetAlgorithm
51 void PrintSelf(ostream &oss, vtkIndent indent );
55 vtkSetVector3Macro(Center,
double);
60 vtkSetVector3Macro(Normal,
double);
65 vtkSetMacro(LevelOfResolution,
int);
66 vtkGetMacro(LevelOfResolution,
int);
71 vtkSetMacro(UseNativeCutter,
bool);
72 vtkGetMacro(UseNativeCutter,
bool);
73 vtkBooleanMacro(UseNativeCutter,
bool);
79 vtkSetMacro(Controller, vtkMultiProcessController*);
80 vtkGetMacro(Controller, vtkMultiProcessController*);
85 virtual int RequestData(
86 vtkInformation*,vtkInformationVector**,vtkInformationVector*);
87 virtual int FillInputPortInformation(
int port, vtkInformation *info);
88 virtual int FillOutputPortInformation(
int port, vtkInformation *info);
94 virtual int RequestInformation(
96 vtkInformationVector **inputVector,
97 vtkInformationVector *outputVector );
102 virtual int RequestUpdateExtent(
103 vtkInformation*, vtkInformationVector**, vtkInformationVector* );
112 vtkPlane* GetCutPlane( vtkOverlappingAMR *metadata );
116 void ExtractCellFromGrid(
117 vtkUniformGrid *grid, vtkCell* cell,
118 std::map<vtkIdType,vtkIdType>& gridPntMapping,
120 vtkCellArray *cells );
126 void ExtractPointDataFromGrid(
127 vtkUniformGrid *grid,
128 std::map<vtkIdType,vtkIdType>& gridPntMapping,
136 void ExtractCellDataFromGrid(
137 vtkUniformGrid *grid,
138 std::vector<vtkIdType>& cellIdxList,
146 void ComputeAMRBlocksToLoad( vtkPlane* p, vtkOverlappingAMR* m);
150 void InitializeCenter(
double min[3],
double max[3] );
154 bool PlaneIntersectsAMRBox( vtkPlane* pl,
double bounds[6] );
155 bool PlaneIntersectsAMRBox(
double plane[4],
double bounds[6] );
159 bool PlaneIntersectsCell( vtkPlane *pl, vtkCell *cell );
162 bool IsAMRData2D( vtkOverlappingAMR *input );
168 unsigned int blockIdx,
169 vtkUniformGrid *grid, vtkMultiBlockDataSet *dataSet );
vtkMultiProcessController * Controller
std::vector< int > BlocksToLoad