VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkExtentTranslator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtentTranslator.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 =========================================================================*/
30 #ifndef __vtkExtentTranslator_h
31 #define __vtkExtentTranslator_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkObject.h"
35 
36 
38 {
39 public:
40  static vtkExtentTranslator *New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
48  vtkSetVector6Macro(WholeExtent, int);
49  vtkGetVector6Macro(WholeExtent, int);
50  vtkSetVector6Macro(Extent, int);
51  vtkGetVector6Macro(Extent, int);
52  vtkSetMacro(Piece,int);
53  vtkGetMacro(Piece,int);
54  vtkSetMacro(NumberOfPieces,int);
55  vtkGetMacro(NumberOfPieces,int);
56  vtkSetMacro(GhostLevel, int);
57  vtkGetMacro(GhostLevel, int);
59 
61 
66  virtual int PieceToExtent();
67  virtual int PieceToExtentByPoints();
68  virtual int PieceToExtentThreadSafe(int piece, int numPieces,
69  int ghostLevel, int *wholeExtent,
70  int *resultExtent, int splitMode,
71  int byPoints);
73 
74 
75 
77 
82  {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
84  {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
86  {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
88  {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
89  vtkGetMacro(SplitMode,int);
91 
98  void SetSplitPath(int len, int *splitpath);
99 
100 //BTX
101  // Don't change the numbers here - they are used in the code
102  // to indicate array indices.
103  enum Modes {
104  X_SLAB_MODE=0,
105  Y_SLAB_MODE=1,
106  Z_SLAB_MODE=2,
107  BLOCK_MODE= 3
108  };
109 //ETX
110 
111 protected:
114 
116 
118  int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
119  int SplitExtentByPoints(int piece, int numPieces, int *extent,
120  int splitMode);
122 
123  int Piece;
126  int Extent[6];
127  int WholeExtent[6];
129 
130  int* SplitPath;
131  int SplitLen;
132 
133 private:
134  vtkExtentTranslator(const vtkExtentTranslator&); // Not implemented.
135  void operator=(const vtkExtentTranslator&); // Not implemented.
136 };
137 
138 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
GLenum GLsizei len
Definition: vtkgl.h:13010
Generates a structured extent from unstructured.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define vtkSetVector6Macro(name, type)
Definition: vtkSetGet.h:350
static vtkObject * New()
#define vtkGetVector6Macro(name, type)
Definition: vtkSetGet.h:370
#define VTKCOMMONDATAMODEL_EXPORT
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69