00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCutMaterial.h,v $ 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 =========================================================================*/ 00027 #ifndef __vtkCutMaterial_h 00028 #define __vtkCutMaterial_h 00029 00030 #include "vtkDataSetToPolyDataFilter.h" 00031 00032 class vtkPlane; 00033 00034 class VTK_PARALLEL_EXPORT vtkCutMaterial : public vtkDataSetToPolyDataFilter 00035 { 00036 public: 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 vtkTypeRevisionMacro(vtkCutMaterial,vtkDataSetToPolyDataFilter); 00039 static vtkCutMaterial *New(); 00040 00042 00043 vtkSetStringMacro(MaterialArrayName); 00044 vtkGetStringMacro(MaterialArrayName); 00046 00048 00049 vtkSetMacro(Material, int); 00050 vtkGetMacro(Material, int); 00052 00054 00055 vtkSetStringMacro(ArrayName); 00056 vtkGetStringMacro(ArrayName); 00058 00060 00061 vtkSetVector3Macro(UpVector, double); 00062 vtkGetVector3Macro(UpVector, double); 00064 00066 00068 vtkGetVector3Macro(MaximumPoint, double); 00069 vtkGetVector3Macro(CenterPoint, double); 00070 vtkGetVector3Macro(Normal, double); 00072 00073 protected: 00074 vtkCutMaterial(); 00075 ~vtkCutMaterial(); 00076 00077 void Execute(); //generate output data 00078 void ComputeMaximumPoint(vtkDataSet *input); 00079 void ComputeNormal(); 00080 00081 char *MaterialArrayName; 00082 int Material; 00083 char *ArrayName; 00084 double UpVector[3]; 00085 double MaximumPoint[3]; 00086 double CenterPoint[3]; 00087 double Normal[3]; 00088 00089 vtkPlane *PlaneFunction; 00090 00091 private: 00092 vtkCutMaterial(const vtkCutMaterial&); // Not implemented. 00093 void operator=(const vtkCutMaterial&); // Not implemented. 00094 }; 00095 00096 #endif