/*========================================================================= Program: Visualization Toolkit Module: $RCSfile: vtk3DGridSource.h,v $ Language: C++ Date: $Date: 2002/04/18 10:14:46 $ Version: $Revision: 1.2 $ Made by Rasmus Paulsen email: rrp@imm.dtu.dk web: www.imm.dtu.dk/~rrp/VTK This class is not mature enough to enter the official VTK release. =========================================================================*/ // .NAME vtk3DGridSource - Create a 3D polygonal grid // .SECTION Description // // vtk3DGridSource creates a 3D grid centered at origin. The grid is represented // with lines. It is possible to specify the length, width, // and height of the grid independently. Also the number of cubes in the grid // can be specified. #ifndef __vtk3DGridSource_h #define __vtk3DGridSource_h #include "vtkPolyDataSource.h" class vtk3DGridSource : public vtkPolyDataSource { public: static vtk3DGridSource *New(); vtkTypeRevisionMacro(vtk3DGridSource,vtkPolyDataSource); void PrintSelf(ostream& os, vtkIndent indent); // Description: // Set the length of the grid in the x-direction. vtkSetClampMacro(XLength,float,0.0,VTK_LARGE_FLOAT); vtkGetMacro(XLength,float); // Description: // Set the length of the grid in the y-direction. vtkSetClampMacro(YLength,float,0.0,VTK_LARGE_FLOAT); vtkGetMacro(YLength,float); // Description: // Set the length of the grid in the z-direction. vtkSetClampMacro(ZLength,float,0.0,VTK_LARGE_FLOAT); vtkGetMacro(ZLength,float); // Description: // Set the center of the grid. vtkSetVector3Macro(Center,float); vtkGetVectorMacro(Center,float,3); // Description: // Set the number of cubes in the x-direction. vtkSetMacro(XCubes, int); vtkGetMacro(XCubes, int); // Description: // Set the number of cubes in the y-direction. vtkSetMacro(YCubes, int); vtkGetMacro(YCubes, int); // Description: // Set the number of cubes in the z-direction. vtkSetMacro(ZCubes, int); vtkGetMacro(ZCubes, int); protected: vtk3DGridSource(float xL=1.0, float yL=1.0, float zL=1.0); ~vtk3DGridSource() {}; void Execute(); float XLength; float YLength; float ZLength; float Center[3]; int XCubes; int YCubes; int ZCubes; private: vtk3DGridSource(const vtk3DGridSource&); // Not implemented. void operator=(const vtk3DGridSource&); // Not implemented. }; #endif