00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00050 #ifndef __vtkPlaneSource_h
00051 #define __vtkPlaneSource_h
00052
00053 #include "vtkPolyDataAlgorithm.h"
00054
00055 class VTK_GRAPHICS_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
00056 {
00057 public:
00058 void PrintSelf(ostream& os, vtkIndent indent);
00059 vtkTypeRevisionMacro(vtkPlaneSource,vtkPolyDataAlgorithm);
00060
00063 static vtkPlaneSource *New();
00064
00066
00067 vtkSetMacro(XResolution,int);
00068 vtkGetMacro(XResolution,int);
00070
00072
00073 vtkSetMacro(YResolution,int);
00074 vtkGetMacro(YResolution,int);
00076
00078
00079 void SetResolution(const int xR, const int yR);
00080 void GetResolution(int& xR,int& yR) {
00081 xR=this->XResolution; yR=this->YResolution;};
00083
00085
00086 vtkSetVector3Macro(Origin,double);
00087 vtkGetVectorMacro(Origin,double,3);
00089
00091
00092 void SetPoint1(double x, double y, double z);
00093 void SetPoint1(double pnt[3]);
00094 vtkGetVectorMacro(Point1,double,3);
00096
00098
00099 void SetPoint2(double x, double y, double z);
00100 void SetPoint2(double pnt[3]);
00101 vtkGetVectorMacro(Point2,double,3);
00103
00105
00108 void SetCenter(double x, double y, double z);
00109 void SetCenter(double center[3]);
00110 vtkGetVectorMacro(Center,double,3);
00112
00114
00117 void SetNormal(double nx, double ny, double nz);
00118 void SetNormal(double n[3]);
00119 vtkGetVectorMacro(Normal,double,3);
00121
00124 void Push(double distance);
00125
00126 protected:
00127 vtkPlaneSource();
00128 ~vtkPlaneSource() {};
00129
00130 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00131
00132 int XResolution;
00133 int YResolution;
00134 double Origin[3];
00135 double Point1[3];
00136 double Point2[3];
00137 double Normal[3];
00138 double Center[3];
00139
00140 int UpdatePlane(double v1[3], double v2[3]);
00141 private:
00142 vtkPlaneSource(const vtkPlaneSource&);
00143 void operator=(const vtkPlaneSource&);
00144 };
00145
00146 #endif