Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkPieceScalars.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPieceScalars.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef __vtkPieceScalars_h
00031 #define __vtkPieceScalars_h
00032 
00033 #include "vtkDataSetAlgorithm.h"
00034 
00035 class vtkFloatArray;
00036 class vtkIntArray;
00037 
00038 class VTK_PARALLEL_EXPORT vtkPieceScalars : public vtkDataSetAlgorithm
00039 {
00040 public:
00041   static vtkPieceScalars *New();
00042 
00043   vtkTypeRevisionMacro(vtkPieceScalars,vtkDataSetAlgorithm);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047 
00049   void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
00050   void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
00051   int GetScalarMode() {return this->CellScalarsFlag;}
00053   
00054   // Dscription:
00055   // This option uses a random mapping between pieces and scalar values.
00056   // The scalar values are choosen between 0 and 1.  By default, random mode is off.
00057   vtkSetMacro(RandomMode, int);
00058   vtkGetMacro(RandomMode, int);
00059   vtkBooleanMacro(RandomMode, int);
00060   
00061 protected:
00062   vtkPieceScalars();
00063   ~vtkPieceScalars();
00064   
00065   // Append the pieces.
00066   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00067   
00068   vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
00069   vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
00070   
00071   vtkSetMacro(CellScalarsFlag,int);
00072   int CellScalarsFlag;
00073   int RandomMode;
00074 private:
00075   vtkPieceScalars(const vtkPieceScalars&);  // Not implemented.
00076   void operator=(const vtkPieceScalars&);  // Not implemented.
00077 };
00078 
00079 #endif

Generated on Mon Jan 21 23:07:33 2008 for VTK by  doxygen 1.4.3-20050530