VTK
vtkProcessIdScalars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProcessIdScalars.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 =========================================================================*/
27 #ifndef __vtkProcessIdScalars_h
28 #define __vtkProcessIdScalars_h
29 
30 #include "vtkDataSetAlgorithm.h"
31 
32 class vtkFloatArray;
33 class vtkIntArray;
35 
37 {
38 public:
39  static vtkProcessIdScalars *New();
40 
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
47  void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
48  void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
49  int GetScalarMode() {return this->CellScalarsFlag;}
51 
52  // Dscription:
53  // This option uses a random mapping between pieces and scalar values.
54  // The scalar values are choosen between 0 and 1. By default, random
55  // mode is off.
56  vtkSetMacro(RandomMode, int);
57  vtkGetMacro(RandomMode, int);
58  vtkBooleanMacro(RandomMode, int);
59 
61 
63  virtual void SetController(vtkMultiProcessController*);
64  vtkGetObjectMacro(Controller, vtkMultiProcessController);
66 
67 
68 protected:
71 
72  // Append the pieces.
73  int RequestData(
75 
76  vtkIntArray *MakeProcessIdScalars(int piece, vtkIdType numScalars);
77  vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
78 
79  vtkSetMacro(CellScalarsFlag,int);
80  int CellScalarsFlag;
82 
84 
85 private:
86  vtkProcessIdScalars(const vtkProcessIdScalars&); // Not implemented.
87  void operator=(const vtkProcessIdScalars&); // Not implemented.
88 };
89 
90 #endif