00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00076 #ifndef __vtkPlaneSource_h
00077 #define __vtkPlaneSource_h
00078
00079 #include "vtkPolyDataSource.h"
00080
00081 class VTK_EXPORT vtkPlaneSource : public vtkPolyDataSource
00082 {
00083 public:
00084 void PrintSelf(ostream& os, vtkIndent indent);
00085 vtkTypeMacro(vtkPlaneSource,vtkPolyDataSource);
00086
00089 static vtkPlaneSource *New();
00090
00092 vtkSetMacro(XResolution,int);
00093 vtkGetMacro(XResolution,int);
00094
00096 vtkSetMacro(YResolution,int);
00097 vtkGetMacro(YResolution,int);
00098
00100 void SetResolution(const int xR, const int yR);
00101 void GetResolution(int& xR,int& yR) {
00102 xR=this->XResolution; yR=this->YResolution;};
00103
00105 vtkSetVector3Macro(Origin,float);
00106 vtkGetVectorMacro(Origin,float,3);
00107
00109 void SetPoint1(float x, float y, float z);
00110 void SetPoint1(float pnt[3]);
00111 vtkGetVectorMacro(Point1,float,3);
00112
00114 void SetPoint2(float x, float y, float z);
00115 void SetPoint2(float pnt[3]);
00116 vtkGetVectorMacro(Point2,float,3);
00117
00121 void SetCenter(float x, float y, float z);
00122 void SetCenter(float center[3]);
00123 vtkGetVectorMacro(Center,float,3);
00124
00128 void SetNormal(float nx, float ny, float nz);
00129 void SetNormal(float n[3]);
00130 vtkGetVectorMacro(Normal,float,3);
00131
00134 void Push(float distance);
00135
00136 protected:
00137 vtkPlaneSource();
00138 ~vtkPlaneSource() {};
00139 vtkPlaneSource(const vtkPlaneSource&) {};
00140 void operator=(const vtkPlaneSource&) {};
00141
00142 void Execute();
00143
00144 int XResolution;
00145 int YResolution;
00146 float Origin[3];
00147 float Point1[3];
00148 float Point2[3];
00149 float Normal[3];
00150 float Center[3];
00151
00152 int UpdatePlane(float v1[3], float v2[3]);
00153 };
00154
00155 #endif
00156
00157