VTK
vtkAMRCutPlane.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRCutPlane.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
23 #ifndef VTKAMRCUTPLANE_H_
24 #define VTKAMRCUTPLANE_H_
25 
26 #include "vtkFiltersAMRModule.h" // For export macro
28 
29 #include <vector> // For STL vector
30 #include <map> // For STL map
31 
33 class vtkOverlappingAMR;
35 class vtkInformation;
37 class vtkIndent;
38 class vtkPlane;
39 class vtkUniformGrid;
40 class vtkCell;
41 class vtkPoints;
42 class vtkCellArray;
43 class vtkPointData;
44 class vtkCellData;
45 
47 {
48 public:
49  static vtkAMRCutPlane *New();
51  void PrintSelf(ostream &oss, vtkIndent indent );
52 
54 
55  vtkSetVector3Macro(Center, double);
57 
59 
62 
64 
65  vtkSetMacro(LevelOfResolution, int);
66  vtkGetMacro(LevelOfResolution, int);
68 
70  */
71  vtkSetMacro(UseNativeCutter, bool);
72  vtkGetMacro(UseNativeCutter, bool);
73  vtkBooleanMacro(UseNativeCutter, bool);
75 
77 
82 
83  // Standard pipeline routines
84 
85  virtual int RequestData(
89 
90 
92 
94  virtual int RequestInformation(
95  vtkInformation *rqst,
96  vtkInformationVector **inputVector,
97  vtkInformationVector *outputVector );
99 
101 
102  virtual int RequestUpdateExtent(
105 
106 protected:
108  virtual ~vtkAMRCutPlane();
109 
113 
115 
117  vtkUniformGrid *grid, vtkCell* cell,
118  std::map<vtkIdType,vtkIdType>& gridPntMapping,
119  vtkPoints *nodes,
120  vtkCellArray *cells );
122 
124 
127  vtkUniformGrid *grid,
128  std::map<vtkIdType,vtkIdType>& gridPntMapping,
129  vtkIdType NumNodes,
130  vtkPointData *PD );
132 
134 
137  vtkUniformGrid *grid,
138  std::vector<vtkIdType>& cellIdxList,
139  vtkCellData *CD);
141 
147 
148  // Descriription:
149  // Initializes the cut-plane center given the min/max bounds.
150  void InitializeCenter( double min[3], double max[3] );
151 
153 
154  bool PlaneIntersectsAMRBox( vtkPlane* pl, double bounds[6] );
155  bool PlaneIntersectsAMRBox( double plane[4], double bounds[6] );
157 
160 
163 
165 
167  vtkPlane *cutPlane,
168  unsigned int blockIdx,
169  vtkUniformGrid *grid, vtkMultiBlockDataSet *dataSet );
171 
173  double Center[3];
174  double Normal[3];
178 
179 // BTX
180  std::vector<int> BlocksToLoad;
181 // ETX
182 
183 private:
184  vtkAMRCutPlane(const vtkAMRCutPlane& ); // Not implemented
185  void operator=(const vtkAMRCutPlane& ); // Not implemented
186 };
187 
188 #endif /* VTKAMRCUTPLANE_H_ */
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkAMRCutPlane::Controller
vtkMultiProcessController * Controller
Definition: vtkAMRCutPlane.h:177
vtkAMRCutPlane::PlaneIntersectsCell
bool PlaneIntersectsCell(vtkPlane *pl, vtkCell *cell)
vtkPlane
perform various plane computations
Definition: vtkPlane.h:37
vtkAMRCutPlane::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkAMRCutPlane::ExtractCellFromGrid
void ExtractCellFromGrid(vtkUniformGrid *grid, vtkCell *cell, std::map< vtkIdType, vtkIdType > &gridPntMapping, vtkPoints *nodes, vtkCellArray *cells)
vtkgl::m
const GLfloat * m
Definition: vtkgl.h:18169
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkAMRCutPlane::BlocksToLoad
std::vector< int > BlocksToLoad
Definition: vtkAMRCutPlane.h:180
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkAMRCutPlane::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkX3D::Normal
@ Normal
Definition: vtkX3D.h:45
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:40
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkAMRCutPlane::PrintSelf
void PrintSelf(ostream &oss, vtkIndent indent)
vtkAMRCutPlane::New
static vtkAMRCutPlane * New()
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:51
vtkAMRCutPlane::vtkAMRCutPlane
vtkAMRCutPlane()
vtkAMRCutPlane::RequestInformation
virtual int RequestInformation(vtkInformation *rqst, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:30
vtkAMRCutPlane::CutAMRBlock
void CutAMRBlock(vtkPlane *cutPlane, unsigned int blockIdx, vtkUniformGrid *grid, vtkMultiBlockDataSet *dataSet)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkAMRCutPlane::~vtkAMRCutPlane
virtual ~vtkAMRCutPlane()
vtkFiltersAMRModule.h
vtkAMRCutPlane::PlaneIntersectsAMRBox
bool PlaneIntersectsAMRBox(vtkPlane *pl, double bounds[6])
vtkAMRCutPlane::PlaneIntersectsAMRBox
bool PlaneIntersectsAMRBox(double plane[4], double bounds[6])
vtkAMRCutPlane::ExtractCellDataFromGrid
void ExtractCellDataFromGrid(vtkUniformGrid *grid, std::vector< vtkIdType > &cellIdxList, vtkCellData *CD)
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:85
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkAMRCutPlane::UseNativeCutter
bool UseNativeCutter
Definition: vtkAMRCutPlane.h:176
vtkAMRCutPlane::IsAMRData2D
bool IsAMRData2D(vtkOverlappingAMR *input)
vtkAMRCutPlane::ExtractPointDataFromGrid
void ExtractPointDataFromGrid(vtkUniformGrid *grid, std::map< vtkIdType, vtkIdType > &gridPntMapping, vtkIdType NumNodes, vtkPointData *PD)
vtkMultiBlockDataSetAlgorithm.h
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkAMRCutPlane::GetCutPlane
vtkPlane * GetCutPlane(vtkOverlappingAMR *metadata)
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:46
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkAMRCutPlane
Definition: vtkAMRCutPlane.h:47
VTKFILTERSAMR_EXPORT
#define VTKFILTERSAMR_EXPORT
Definition: vtkFiltersAMRModule.h:15
vtkAMRCutPlane::LevelOfResolution
int LevelOfResolution
Definition: vtkAMRCutPlane.h:172
vtkAMRCutPlane::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkAMRCutPlane::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkAMRCutPlane::InitializeCenter
void InitializeCenter(double min[3], double max[3])
vtkAMRCutPlane::initialRequest
bool initialRequest
Definition: vtkAMRCutPlane.h:175
vtkAMRCutPlane::ComputeAMRBlocksToLoad
void ComputeAMRBlocksToLoad(vtkPlane *p, vtkOverlappingAMR *m)
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32