00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkReflectionFilter_h
00028 #define __vtkReflectionFilter_h
00029
00030 #include "vtkDataObjectAlgorithm.h"
00031 class vtkUnstructuredGrid;
00032 class vtkDataSet;
00033
00034 class VTK_GRAPHICS_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
00035 {
00036 public:
00037 static vtkReflectionFilter *New();
00038
00039 vtkTypeMacro(vtkReflectionFilter, vtkDataObjectAlgorithm);
00040 void PrintSelf(ostream &os, vtkIndent indent);
00041
00042
00043 enum ReflectionPlane
00044 {
00045 USE_X_MIN = 0,
00046 USE_Y_MIN = 1,
00047 USE_Z_MIN = 2,
00048 USE_X_MAX = 3,
00049 USE_Y_MAX = 4,
00050 USE_Z_MAX = 5,
00051 USE_X = 6,
00052 USE_Y = 7,
00053 USE_Z = 8
00054 };
00055
00056
00058
00059 vtkSetClampMacro(Plane, int, 0, 8);
00060 vtkGetMacro(Plane, int);
00061 void SetPlaneToX() { this->SetPlane(USE_X); };
00062 void SetPlaneToY() { this->SetPlane(USE_Y); };
00063 void SetPlaneToZ() { this->SetPlane(USE_Z); };
00064 void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); };
00065 void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); };
00066 void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); };
00067 void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); };
00068 void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); };
00069 void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); };
00071
00073
00075 vtkSetMacro(Center, double);
00076 vtkGetMacro(Center, double);
00078
00080
00082 vtkSetMacro(CopyInput, int);
00083 vtkGetMacro(CopyInput, int);
00084 vtkBooleanMacro(CopyInput, int);
00086
00087 protected:
00088 vtkReflectionFilter();
00089 ~vtkReflectionFilter();
00090
00092
00094 virtual int RequestDataObject(vtkInformation*,
00095 vtkInformationVector**,
00096 vtkInformationVector*);
00098
00100
00101 virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output,
00102 double bounds[6]);
00104
00106 virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
00107
00108 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00109 virtual int FillInputPortInformation(int port, vtkInformation *info);
00110
00111 int Plane;
00112 double Center;
00113 int CopyInput;
00114
00115 void FlipVector(double tuple[3], int mirrorDir[3]);
00116
00117 private:
00118 vtkReflectionFilter(const vtkReflectionFilter&);
00119 void operator=(const vtkReflectionFilter&);
00120 };
00121
00122 #endif
00123
00124