VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkReflectionFilter.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 =========================================================================*/ 00027 #ifndef __vtkReflectionFilter_h 00028 #define __vtkReflectionFilter_h 00029 00030 #include "vtkFiltersGeneralModule.h" // For export macro 00031 #include "vtkDataObjectAlgorithm.h" 00032 class vtkUnstructuredGrid; 00033 class vtkDataSet; 00034 00035 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm 00036 { 00037 public: 00038 static vtkReflectionFilter *New(); 00039 00040 vtkTypeMacro(vtkReflectionFilter, vtkDataObjectAlgorithm); 00041 void PrintSelf(ostream &os, vtkIndent indent); 00042 00043 //BTX 00044 enum ReflectionPlane 00045 { 00046 USE_X_MIN = 0, 00047 USE_Y_MIN = 1, 00048 USE_Z_MIN = 2, 00049 USE_X_MAX = 3, 00050 USE_Y_MAX = 4, 00051 USE_Z_MAX = 5, 00052 USE_X = 6, 00053 USE_Y = 7, 00054 USE_Z = 8 00055 }; 00056 //ETX 00057 00059 00060 vtkSetClampMacro(Plane, int, 0, 8); 00061 vtkGetMacro(Plane, int); 00062 void SetPlaneToX() { this->SetPlane(USE_X); }; 00063 void SetPlaneToY() { this->SetPlane(USE_Y); }; 00064 void SetPlaneToZ() { this->SetPlane(USE_Z); }; 00065 void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }; 00066 void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }; 00067 void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }; 00068 void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }; 00069 void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }; 00070 void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }; 00072 00074 00076 vtkSetMacro(Center, double); 00077 vtkGetMacro(Center, double); 00079 00081 00083 vtkSetMacro(CopyInput, int); 00084 vtkGetMacro(CopyInput, int); 00085 vtkBooleanMacro(CopyInput, int); 00087 00088 protected: 00089 vtkReflectionFilter(); 00090 ~vtkReflectionFilter(); 00091 00093 00095 virtual int RequestDataObject(vtkInformation*, 00096 vtkInformationVector**, 00097 vtkInformationVector*); 00099 00101 00102 virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, 00103 double bounds[6]); 00105 00107 virtual int ComputeBounds(vtkDataObject* input, double bounds[6]); 00108 00109 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00110 virtual int FillInputPortInformation(int port, vtkInformation *info); 00111 00112 int Plane; 00113 double Center; 00114 int CopyInput; 00115 00116 void FlipVector(double tuple[3], int mirrorDir[3]); 00117 00118 private: 00119 vtkReflectionFilter(const vtkReflectionFilter&); // Not implemented 00120 void operator=(const vtkReflectionFilter&); // Not implemented 00121 }; 00122 00123 #endif 00124 00125