VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPlaneSource.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 =========================================================================*/ 00053 #ifndef vtkPlaneSource_h 00054 #define vtkPlaneSource_h 00055 00056 #include "vtkFiltersSourcesModule.h" // For export macro 00057 #include "vtkPolyDataAlgorithm.h" 00058 00059 class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm 00060 { 00061 public: 00062 void PrintSelf(ostream& os, vtkIndent indent); 00063 vtkTypeMacro(vtkPlaneSource,vtkPolyDataAlgorithm); 00064 00067 static vtkPlaneSource *New(); 00068 00070 00071 vtkSetMacro(XResolution,int); 00072 vtkGetMacro(XResolution,int); 00074 00076 00077 vtkSetMacro(YResolution,int); 00078 vtkGetMacro(YResolution,int); 00080 00082 00083 void SetResolution(const int xR, const int yR); 00084 void GetResolution(int& xR,int& yR) { 00085 xR=this->XResolution; yR=this->YResolution;}; 00087 00089 00090 vtkSetVector3Macro(Origin,double); 00091 vtkGetVectorMacro(Origin,double,3); 00093 00095 00096 void SetPoint1(double x, double y, double z); 00097 void SetPoint1(double pnt[3]); 00098 vtkGetVectorMacro(Point1,double,3); 00100 00102 00103 void SetPoint2(double x, double y, double z); 00104 void SetPoint2(double pnt[3]); 00105 vtkGetVectorMacro(Point2,double,3); 00107 00109 00112 void SetCenter(double x, double y, double z); 00113 void SetCenter(double center[3]); 00114 vtkGetVectorMacro(Center,double,3); 00116 00118 00121 void SetNormal(double nx, double ny, double nz); 00122 void SetNormal(double n[3]); 00123 vtkGetVectorMacro(Normal,double,3); 00125 00128 void Push(double distance); 00129 00131 00135 vtkSetMacro(OutputPointsPrecision,int); 00136 vtkGetMacro(OutputPointsPrecision,int); 00138 00139 protected: 00140 vtkPlaneSource(); 00141 ~vtkPlaneSource() {} 00142 00143 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00144 00145 int XResolution; 00146 int YResolution; 00147 double Origin[3]; 00148 double Point1[3]; 00149 double Point2[3]; 00150 double Normal[3]; 00151 double Center[3]; 00152 int OutputPointsPrecision; 00153 00154 int UpdatePlane(double v1[3], double v2[3]); 00155 private: 00156 vtkPlaneSource(const vtkPlaneSource&); // Not implemented. 00157 void operator=(const vtkPlaneSource&); // Not implemented. 00158 }; 00159 00160 #endif