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

vtkPolyDataMapper2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolyDataMapper2D.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 =========================================================================*/
00038 #ifndef __vtkPolyDataMapper2D_h
00039 #define __vtkPolyDataMapper2D_h
00040 
00041 
00042 #include "vtkMapper2D.h"
00043 
00044 class vtkCoordinate;
00045 class vtkPolyData;
00046 class vtkScalarsToColors;
00047 class vtkUnsignedCharArray;
00048 
00049 class VTK_RENDERING_EXPORT vtkPolyDataMapper2D : public vtkMapper2D
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkPolyDataMapper2D,vtkMapper2D);
00053   static vtkPolyDataMapper2D *New();
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055   
00057 
00058   void SetInput(vtkPolyData *in);
00059   vtkPolyData *GetInput();
00061 
00063 
00064   void SetLookupTable(vtkScalarsToColors *lut);
00065   vtkScalarsToColors *GetLookupTable();
00067 
00070   virtual void CreateDefaultLookupTable();
00071 
00073 
00075   vtkSetMacro(ScalarVisibility,int);
00076   vtkGetMacro(ScalarVisibility,int);
00077   vtkBooleanMacro(ScalarVisibility,int);
00079 
00081 
00088   vtkSetMacro(ColorMode,int);
00089   vtkGetMacro(ColorMode,int);
00090   void SetColorModeToDefault();
00091   void SetColorModeToMapScalars();
00093 
00095   const char *GetColorModeAsString();
00096 
00098 
00104   vtkSetMacro(UseLookupTableScalarRange,int);
00105   vtkGetMacro(UseLookupTableScalarRange,int);
00106   vtkBooleanMacro(UseLookupTableScalarRange,int);
00108 
00110 
00113   vtkSetVector2Macro(ScalarRange,double);
00114   vtkGetVectorMacro(ScalarRange,double,2);
00116 
00118 
00128   vtkSetMacro(ScalarMode,int);
00129   vtkGetMacro(ScalarMode,int);
00130   void SetScalarModeToDefault() {
00131     this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
00132   void SetScalarModeToUsePointData() {
00133     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
00134   void SetScalarModeToUseCellData() {
00135     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
00136   void SetScalarModeToUsePointFieldData() {
00137     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
00138   void SetScalarModeToUseCellFieldData() {
00139     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
00141   
00143 
00144   void ColorByArrayComponent(int arrayNum, int component);
00145   void ColorByArrayComponent(char* arrayName, int component);
00147   
00149 
00150   char* GetArrayName() { return this->ArrayName; }
00151   int GetArrayId() { return this->ArrayId; }
00152   int GetArrayAccessMode() { return this->ArrayAccessMode; }
00153   int GetArrayComponent() { return this->ArrayComponent; }
00155 
00158   virtual unsigned long GetMTime();
00159 
00161 
00165   virtual void SetTransformCoordinate(vtkCoordinate*);
00166   vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
00168 
00174   vtkUnsignedCharArray *MapScalars(double alpha);
00175   
00177   void ShallowCopy(vtkAbstractMapper *m);
00178 
00179 protected:
00180   vtkPolyDataMapper2D();
00181   ~vtkPolyDataMapper2D();
00182 
00183   vtkUnsignedCharArray *Colors;
00184 
00185   vtkScalarsToColors *LookupTable;
00186   int ScalarVisibility;
00187   vtkTimeStamp BuildTime;
00188   double ScalarRange[2];
00189   int UseLookupTableScalarRange;
00190   int ColorMode;
00191   int ScalarMode;
00192   
00193   vtkCoordinate *TransformCoordinate;
00194 
00195   // for coloring by a component of a field data array
00196   int ArrayId;
00197   char ArrayName[256];
00198   int ArrayComponent;
00199   int ArrayAccessMode;
00200 private:
00201   vtkPolyDataMapper2D(const vtkPolyDataMapper2D&);  // Not implemented.
00202   void operator=(const vtkPolyDataMapper2D&);  // Not implemented.
00203 };
00204 
00205 
00206 #endif
00207 

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