VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPlaneSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlaneSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
53 #ifndef __vtkPlaneSource_h
54 #define __vtkPlaneSource_h
55 
56 #include "vtkFiltersSourcesModule.h" // For export macro
57 #include "vtkPolyDataAlgorithm.h"
58 
59 class VTKFILTERSSOURCES_EXPORT vtkPlaneSource : public vtkPolyDataAlgorithm
60 {
61 public:
62  void PrintSelf(ostream& os, vtkIndent indent);
63  vtkTypeMacro(vtkPlaneSource,vtkPolyDataAlgorithm);
64 
67  static vtkPlaneSource *New();
68 
70 
71  vtkSetMacro(XResolution,int);
72  vtkGetMacro(XResolution,int);
74 
76 
77  vtkSetMacro(YResolution,int);
78  vtkGetMacro(YResolution,int);
80 
82 
83  void SetResolution(const int xR, const int yR);
84  void GetResolution(int& xR,int& yR) {
85  xR=this->XResolution; yR=this->YResolution;};
87 
89 
90  vtkSetVector3Macro(Origin,double);
91  vtkGetVectorMacro(Origin,double,3);
93 
95 
96  void SetPoint1(double x, double y, double z);
97  void SetPoint1(double pnt[3]);
98  vtkGetVectorMacro(Point1,double,3);
100 
102 
103  void SetPoint2(double x, double y, double z);
104  void SetPoint2(double pnt[3]);
105  vtkGetVectorMacro(Point2,double,3);
107 
109 
112  void SetCenter(double x, double y, double z);
113  void SetCenter(double center[3]);
114  vtkGetVectorMacro(Center,double,3);
116 
118 
121  void SetNormal(double nx, double ny, double nz);
122  void SetNormal(double n[3]);
123  vtkGetVectorMacro(Normal,double,3);
125 
128  void Push(double distance);
129 
130 protected:
131  vtkPlaneSource();
133 
134  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
135 
138  double Origin[3];
139  double Point1[3];
140  double Point2[3];
141  double Normal[3];
142  double Center[3];
143 
144  int UpdatePlane(double v1[3], double v2[3]);
145 private:
146  vtkPlaneSource(const vtkPlaneSource&); // Not implemented.
147  void operator=(const vtkPlaneSource&); // Not implemented.
148 };
149 
150 #endif
void GetResolution(int &xR, int &yR)
create an array of quadrilaterals located in a plane