vtkPolyDataMapper2D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00050 #ifndef __vtkPolyDataMapper2D_h
00051 #define __vtkPolyDataMapper2D_h
00052
00053
00054 #include "vtkMapper2D.h"
00055
00056 class vtkCoordinate;
00057 class vtkPolyData;
00058 class vtkScalarsToColors;
00059 class vtkUnsignedCharArray;
00060
00061 class VTK_RENDERING_EXPORT vtkPolyDataMapper2D : public vtkMapper2D
00062 {
00063 public:
00064 vtkTypeRevisionMacro(vtkPolyDataMapper2D,vtkMapper2D);
00065 static vtkPolyDataMapper2D *New();
00066 void PrintSelf(ostream& os, vtkIndent indent);
00067
00069
00070 virtual void SetInput(vtkPolyData*);
00071 vtkGetObjectMacro(Input, vtkPolyData);
00073
00075
00076 void SetLookupTable(vtkScalarsToColors *lut);
00077 vtkScalarsToColors *GetLookupTable();
00079
00082 virtual void CreateDefaultLookupTable();
00083
00085
00087 vtkSetMacro(ScalarVisibility,int);
00088 vtkGetMacro(ScalarVisibility,int);
00089 vtkBooleanMacro(ScalarVisibility,int);
00091
00093
00100 vtkSetMacro(ColorMode,int);
00101 vtkGetMacro(ColorMode,int);
00102 void SetColorModeToDefault();
00103 void SetColorModeToMapScalars();
00105
00107 const char *GetColorModeAsString();
00108
00110
00116 vtkSetMacro(UseLookupTableScalarRange,int);
00117 vtkGetMacro(UseLookupTableScalarRange,int);
00118 vtkBooleanMacro(UseLookupTableScalarRange,int);
00120
00122
00125 vtkSetVector2Macro(ScalarRange,double);
00126 vtkGetVectorMacro(ScalarRange,double,2);
00128
00130
00140 vtkSetMacro(ScalarMode,int);
00141 vtkGetMacro(ScalarMode,int);
00142 void SetScalarModeToDefault() {
00143 this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
00144 void SetScalarModeToUsePointData() {
00145 this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
00146 void SetScalarModeToUseCellData() {
00147 this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
00148 void SetScalarModeToUsePointFieldData() {
00149 this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
00150 void SetScalarModeToUseCellFieldData() {
00151 this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
00153
00155
00156 void ColorByArrayComponent(int arrayNum, int component);
00157 void ColorByArrayComponent(char* arrayName, int component);
00159
00161
00162 char* GetArrayName() { return this->ArrayName; }
00163 int GetArrayId() { return this->ArrayId; }
00164 int GetArrayAccessMode() { return this->ArrayAccessMode; }
00165 int GetArrayComponent() { return this->ArrayComponent; }
00167
00170 virtual unsigned long GetMTime();
00171
00173
00177 virtual void SetTransformCoordinate(vtkCoordinate*);
00178 vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
00180
00186 vtkUnsignedCharArray *MapScalars(double alpha);
00187
00189 void ShallowCopy(vtkAbstractMapper *m);
00190
00191 protected:
00192 vtkPolyDataMapper2D();
00193 ~vtkPolyDataMapper2D();
00194
00195 vtkPolyData* Input;
00196
00197 vtkUnsignedCharArray *Colors;
00198
00199 vtkScalarsToColors *LookupTable;
00200 int ScalarVisibility;
00201 vtkTimeStamp BuildTime;
00202 double ScalarRange[2];
00203 int UseLookupTableScalarRange;
00204 int ColorMode;
00205 int ScalarMode;
00206
00207 vtkCoordinate *TransformCoordinate;
00208
00209
00210 int ArrayId;
00211 char ArrayName[256];
00212 int ArrayComponent;
00213 int ArrayAccessMode;
00214 private:
00215 vtkPolyDataMapper2D(const vtkPolyDataMapper2D&);
00216 void operator=(const vtkPolyDataMapper2D&);
00217 };
00218
00219
00220 #endif
00221