Graphics/vtkPlaneSource.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Graphics/vtkPlaneSource.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkPlaneSource.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00067 #ifndef __vtkPlaneSource_h
    00068 #define __vtkPlaneSource_h
    00069
    00070 #include "vtkPolyDataSource.h"
    00071
    00072 class VTK_GRAPHICS_EXPORT vtkPlaneSource : public vtkPolyDataSource
    00073 {
    00074 public:
    00075   void PrintSelf(ostream& os, vtkIndent indent);
    00076   vtkTypeRevisionMacro(vtkPlaneSource,vtkPolyDataSource);
    00077
    00080   static vtkPlaneSource *New();
    00081
    00083
    00084   vtkSetMacro(XResolution,int);
    00085   vtkGetMacro(XResolution,int);
    00087
    00089
    00090   vtkSetMacro(YResolution,int);
    00091   vtkGetMacro(YResolution,int);
    00093
    00095
    00096   void SetResolution(const int xR, const int yR);
    00097   void GetResolution(int& xR,int& yR) {
    00098     xR=this->XResolution; yR=this->YResolution;};
    00100
    00102
    00103   vtkSetVector3Macro(Origin,float);
    00104   vtkGetVectorMacro(Origin,float,3);
    00106
    00108
    00109   void SetPoint1(float x, float y, float z);
    00110   void SetPoint1(float pnt[3]);
    00111   vtkGetVectorMacro(Point1,float,3);
    00113
    00115
    00116   void SetPoint2(float x, float y, float z);
    00117   void SetPoint2(float pnt[3]);
    00118   vtkGetVectorMacro(Point2,float,3);
    00120
    00122
    00125   void SetCenter(float x, float y, float z);
    00126   void SetCenter(float center[3]);
    00127   vtkGetVectorMacro(Center,float,3);
    00129
    00131
    00134   void SetNormal(float nx, float ny, float nz);
    00135   void SetNormal(float n[3]);
    00136   vtkGetVectorMacro(Normal,float,3);
    00138
    00141   void Push(float distance);
    00142
    00143 protected:
    00144   vtkPlaneSource();
    00145   ~vtkPlaneSource() {};
    00146
    00147   void Execute();
    00148
    00149   int XResolution;
    00150   int YResolution;
    00151   float Origin[3];
    00152   float Point1[3];
    00153   float Point2[3];
    00154   float Normal[3];
    00155   float Center[3];
    00156
    00157   int UpdatePlane(float v1[3], float v2[3]);
    00158 private:
    00159   vtkPlaneSource(const vtkPlaneSource&);  // Not implemented.
    00160   void operator=(const vtkPlaneSource&);  // Not implemented.
    00161 };
    00162
    00163 #endif
    00164
    00165