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 "vtkPolyDataAlgorithm.h" 00057 00058 class VTK_GRAPHICS_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm 00059 { 00060 public: 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 vtkTypeMacro(vtkPlaneSource,vtkPolyDataAlgorithm); 00063 00066 static vtkPlaneSource *New(); 00067 00069 00070 vtkSetMacro(XResolution,int); 00071 vtkGetMacro(XResolution,int); 00073 00075 00076 vtkSetMacro(YResolution,int); 00077 vtkGetMacro(YResolution,int); 00079 00081 00082 void SetResolution(const int xR, const int yR); 00083 void GetResolution(int& xR,int& yR) { 00084 xR=this->XResolution; yR=this->YResolution;}; 00086 00088 00089 vtkSetVector3Macro(Origin,double); 00090 vtkGetVectorMacro(Origin,double,3); 00092 00094 00095 void SetPoint1(double x, double y, double z); 00096 void SetPoint1(double pnt[3]); 00097 vtkGetVectorMacro(Point1,double,3); 00099 00101 00102 void SetPoint2(double x, double y, double z); 00103 void SetPoint2(double pnt[3]); 00104 vtkGetVectorMacro(Point2,double,3); 00106 00108 00111 void SetCenter(double x, double y, double z); 00112 void SetCenter(double center[3]); 00113 vtkGetVectorMacro(Center,double,3); 00115 00117 00120 void SetNormal(double nx, double ny, double nz); 00121 void SetNormal(double n[3]); 00122 vtkGetVectorMacro(Normal,double,3); 00124 00127 void Push(double distance); 00128 00129 protected: 00130 vtkPlaneSource(); 00131 ~vtkPlaneSource() {}; 00132 00133 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00134 00135 int XResolution; 00136 int YResolution; 00137 double Origin[3]; 00138 double Point1[3]; 00139 double Point2[3]; 00140 double Normal[3]; 00141 double Center[3]; 00142 00143 int UpdatePlane(double v1[3], double v2[3]); 00144 private: 00145 vtkPlaneSource(const vtkPlaneSource&); // Not implemented. 00146 void operator=(const vtkPlaneSource&); // Not implemented. 00147 }; 00148 00149 #endif