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

dox/Rendering/vtkPolyDataMapper2D.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyDataMapper2D.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00042 #ifndef __vtkPolyDataMapper2D_h 00043 #define __vtkPolyDataMapper2D_h 00044 00045 00046 #include "vtkMapper2D.h" 00047 00048 class vtkCoordinate; 00049 class vtkPolyData; 00050 class vtkScalarsToColors; 00051 class vtkUnsignedCharArray; 00052 00053 class VTK_RENDERING_EXPORT vtkPolyDataMapper2D : public vtkMapper2D 00054 { 00055 public: 00056 vtkTypeRevisionMacro(vtkPolyDataMapper2D,vtkMapper2D); 00057 static vtkPolyDataMapper2D *New(); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 00062 virtual void SetInput(vtkPolyData*); 00063 vtkGetObjectMacro(Input, vtkPolyData); 00065 00067 00068 void SetLookupTable(vtkScalarsToColors *lut); 00069 vtkScalarsToColors *GetLookupTable(); 00071 00074 virtual void CreateDefaultLookupTable(); 00075 00077 00079 vtkSetMacro(ScalarVisibility,int); 00080 vtkGetMacro(ScalarVisibility,int); 00081 vtkBooleanMacro(ScalarVisibility,int); 00083 00085 00092 vtkSetMacro(ColorMode,int); 00093 vtkGetMacro(ColorMode,int); 00094 void SetColorModeToDefault(); 00095 void SetColorModeToMapScalars(); 00097 00099 const char *GetColorModeAsString(); 00100 00102 00108 vtkSetMacro(UseLookupTableScalarRange,int); 00109 vtkGetMacro(UseLookupTableScalarRange,int); 00110 vtkBooleanMacro(UseLookupTableScalarRange,int); 00112 00114 00117 vtkSetVector2Macro(ScalarRange,float); 00118 vtkGetVectorMacro(ScalarRange,float,2); 00120 00122 00132 vtkSetMacro(ScalarMode,int); 00133 vtkGetMacro(ScalarMode,int); 00134 void SetScalarModeToDefault() { 00135 this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);}; 00136 void SetScalarModeToUsePointData() { 00137 this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);}; 00138 void SetScalarModeToUseCellData() { 00139 this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);}; 00140 void SetScalarModeToUsePointFieldData() { 00141 this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);}; 00142 void SetScalarModeToUseCellFieldData() { 00143 this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);}; 00145 00147 00148 void ColorByArrayComponent(int arrayNum, int component); 00149 void ColorByArrayComponent(char* arrayName, int component); 00151 00153 00154 char* GetArrayName() { return this->ArrayName; } 00155 int GetArrayId() { return this->ArrayId; } 00156 int GetArrayAccessMode() { return this->ArrayAccessMode; } 00157 int GetArrayComponent() { return this->ArrayComponent; } 00159 00162 virtual unsigned long GetMTime(); 00163 00165 00169 virtual void SetTransformCoordinate(vtkCoordinate*); 00170 vtkGetObjectMacro(TransformCoordinate, vtkCoordinate); 00172 00178 vtkUnsignedCharArray *MapScalars(float alpha); 00179 00181 void ShallowCopy(vtkAbstractMapper *m); 00182 00183 protected: 00184 vtkPolyDataMapper2D(); 00185 ~vtkPolyDataMapper2D(); 00186 00187 vtkPolyData* Input; 00188 00189 vtkUnsignedCharArray *Colors; 00190 00191 vtkScalarsToColors *LookupTable; 00192 int ScalarVisibility; 00193 vtkTimeStamp BuildTime; 00194 float ScalarRange[2]; 00195 int UseLookupTableScalarRange; 00196 int ColorMode; 00197 int ScalarMode; 00198 00199 vtkCoordinate *TransformCoordinate; 00200 00201 // for coloring by a component of a field data array 00202 int ArrayId; 00203 char ArrayName[256]; 00204 int ArrayComponent; 00205 int ArrayAccessMode; 00206 private: 00207 vtkPolyDataMapper2D(const vtkPolyDataMapper2D&); // Not implemented. 00208 void operator=(const vtkPolyDataMapper2D&); // Not implemented. 00209 }; 00210 00211 00212 #endif 00213