• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Rendering/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 =========================================================================*/
00035 #ifndef __vtkPolyDataMapper2D_h
00036 #define __vtkPolyDataMapper2D_h
00037 
00038 
00039 #include "vtkMapper2D.h"
00040 
00041 class vtkCoordinate;
00042 class vtkPolyData;
00043 class vtkScalarsToColors;
00044 class vtkUnsignedCharArray;
00045 
00046 class VTK_RENDERING_EXPORT vtkPolyDataMapper2D : public vtkMapper2D
00047 {
00048 public:
00049   vtkTypeRevisionMacro(vtkPolyDataMapper2D,vtkMapper2D);
00050   static vtkPolyDataMapper2D *New();
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052   
00054 
00055   void SetInput(vtkPolyData *in);
00056   vtkPolyData *GetInput();
00058 
00060 
00061   void SetLookupTable(vtkScalarsToColors *lut);
00062   vtkScalarsToColors *GetLookupTable();
00064 
00067   virtual void CreateDefaultLookupTable();
00068 
00070 
00072   vtkSetMacro(ScalarVisibility,int);
00073   vtkGetMacro(ScalarVisibility,int);
00074   vtkBooleanMacro(ScalarVisibility,int);
00076 
00078 
00085   vtkSetMacro(ColorMode,int);
00086   vtkGetMacro(ColorMode,int);
00087   void SetColorModeToDefault();
00088   void SetColorModeToMapScalars();
00090 
00092   const char *GetColorModeAsString();
00093 
00095 
00101   vtkSetMacro(UseLookupTableScalarRange,int);
00102   vtkGetMacro(UseLookupTableScalarRange,int);
00103   vtkBooleanMacro(UseLookupTableScalarRange,int);
00105 
00107 
00110   vtkSetVector2Macro(ScalarRange,double);
00111   vtkGetVectorMacro(ScalarRange,double,2);
00113 
00115 
00125   vtkSetMacro(ScalarMode,int);
00126   vtkGetMacro(ScalarMode,int);
00127   void SetScalarModeToDefault() {
00128     this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
00129   void SetScalarModeToUsePointData() {
00130     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
00131   void SetScalarModeToUseCellData() {
00132     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
00133   void SetScalarModeToUsePointFieldData() {
00134     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
00135   void SetScalarModeToUseCellFieldData() {
00136     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
00138   
00140 
00141   void ColorByArrayComponent(int arrayNum, int component);
00142   void ColorByArrayComponent(char* arrayName, int component);
00144   
00146 
00147   char* GetArrayName() { return this->ArrayName; }
00148   int GetArrayId() { return this->ArrayId; }
00149   int GetArrayAccessMode() { return this->ArrayAccessMode; }
00150   int GetArrayComponent() { return this->ArrayComponent; }
00152 
00155   virtual unsigned long GetMTime();
00156 
00158 
00162   virtual void SetTransformCoordinate(vtkCoordinate*);
00163   vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
00165 
00171   vtkUnsignedCharArray *MapScalars(double alpha);
00172   
00174   void ShallowCopy(vtkAbstractMapper *m);
00175 
00176 protected:
00177   vtkPolyDataMapper2D();
00178   ~vtkPolyDataMapper2D();
00179 
00180   vtkUnsignedCharArray *Colors;
00181 
00182   vtkScalarsToColors *LookupTable;
00183   int ScalarVisibility;
00184   vtkTimeStamp BuildTime;
00185   double ScalarRange[2];
00186   int UseLookupTableScalarRange;
00187   int ColorMode;
00188   int ScalarMode;
00189   
00190   vtkCoordinate *TransformCoordinate;
00191 
00192   virtual int FillInputPortInformation(int, vtkInformation*);
00193 
00194   // for coloring by a component of a field data array
00195   int ArrayId;
00196   char ArrayName[256];
00197   int ArrayComponent;
00198   int ArrayAccessMode;
00199 private:
00200   vtkPolyDataMapper2D(const vtkPolyDataMapper2D&);  // Not implemented.
00201   void operator=(const vtkPolyDataMapper2D&);  // Not implemented.
00202 };
00203 
00204 
00205 #endif
00206 

Generated by  doxygen 1.7.1