VTK
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 "vtkPolyDataAlgorithm.h"
57 
59 {
60 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
63 
66  static vtkPlaneSource *New();
67 
69 
70  vtkSetMacro(XResolution,int);
71  vtkGetMacro(XResolution,int);
73 
75 
76  vtkSetMacro(YResolution,int);
77  vtkGetMacro(YResolution,int);
79 
81 
82  void SetResolution(const int xR, const int yR);
83  void GetResolution(int& xR,int& yR) {
84  xR=this->XResolution; yR=this->YResolution;};
86 
88 
89  vtkSetVector3Macro(Origin,double);
90  vtkGetVectorMacro(Origin,double,3);
92 
94 
95  void SetPoint1(double x, double y, double z);
96  void SetPoint1(double pnt[3]);
97  vtkGetVectorMacro(Point1,double,3);
99 
101 
102  void SetPoint2(double x, double y, double z);
103  void SetPoint2(double pnt[3]);
104  vtkGetVectorMacro(Point2,double,3);
106 
108 
111  void SetCenter(double x, double y, double z);
112  void SetCenter(double center[3]);
113  vtkGetVectorMacro(Center,double,3);
115 
117 
120  void SetNormal(double nx, double ny, double nz);
121  void SetNormal(double n[3]);
122  vtkGetVectorMacro(Normal,double,3);
124 
127  void Push(double distance);
128 
129 protected:
130  vtkPlaneSource();
132 
134 
137  double Origin[3];
138  double Point1[3];
139  double Point2[3];
140  double Normal[3];
141  double Center[3];
142 
143  int UpdatePlane(double v1[3], double v2[3]);
144 private:
145  vtkPlaneSource(const vtkPlaneSource&); // Not implemented.
146  void operator=(const vtkPlaneSource&); // Not implemented.
147 };
148 
149 #endif