VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkCutMaterial.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCutMaterial.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 =========================================================================*/
27 #ifndef __vtkCutMaterial_h
28 #define __vtkCutMaterial_h
29 
30 #include "vtkFiltersParallelModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 class vtkPlane;
34 
35 class VTKFILTERSPARALLEL_EXPORT vtkCutMaterial : public vtkPolyDataAlgorithm
36 {
37 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39  vtkTypeMacro(vtkCutMaterial,vtkPolyDataAlgorithm);
40  static vtkCutMaterial *New();
41 
43 
44  vtkSetStringMacro(MaterialArrayName);
45  vtkGetStringMacro(MaterialArrayName);
47 
49 
50  vtkSetMacro(Material, int);
51  vtkGetMacro(Material, int);
53 
55 
56  vtkSetStringMacro(ArrayName);
57  vtkGetStringMacro(ArrayName);
59 
61 
62  vtkSetVector3Macro(UpVector, double);
63  vtkGetVector3Macro(UpVector, double);
65 
67 
69  vtkGetVector3Macro(MaximumPoint, double);
70  vtkGetVector3Macro(CenterPoint, double);
71  vtkGetVector3Macro(Normal, double);
73 
74 protected:
76  ~vtkCutMaterial();
77 
78  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
79  virtual int FillInputPortInformation(int port, vtkInformation *info);
80  void ComputeMaximumPoint(vtkDataSet *input);
81  void ComputeNormal();
82 
84  int Material;
85  char *ArrayName;
86  double UpVector[3];
87  double MaximumPoint[3];
88  double CenterPoint[3];
89  double Normal[3];
90 
91  vtkPlane *PlaneFunction;
92 
93 private:
94  vtkCutMaterial(const vtkCutMaterial&); // Not implemented.
95  void operator=(const vtkCutMaterial&); // Not implemented.
96 };
97 
98 #endif
char * MaterialArrayName
vtkPlane * PlaneFunction
Automatically computes the cut plane for a material array pair.