Rendering/vtkPolyDataMapper2D.h Source File

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

# 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 =========================================================================*/
    00054 #ifndef __vtkPolyDataMapper2D_h
    00055 #define __vtkPolyDataMapper2D_h
    00056
    00057
    00058 #include "vtkMapper2D.h"
    00059
    00060 class vtkCoordinate;
    00061 class vtkPolyData;
    00062 class vtkScalarsToColors;
    00063 class vtkUnsignedCharArray;
    00064
    00065 class VTK_RENDERING_EXPORT vtkPolyDataMapper2D : public vtkMapper2D
    00066 {
    00067 public:
    00068   vtkTypeRevisionMacro(vtkPolyDataMapper2D,vtkMapper2D);
    00069   static vtkPolyDataMapper2D *New();
    00070   void PrintSelf(ostream& os, vtkIndent indent);
    00071
    00073
    00074   virtual void SetInput(vtkPolyData*);
    00075   vtkGetObjectMacro(Input, vtkPolyData);
    00077
    00079
    00080   void SetLookupTable(vtkScalarsToColors *lut);
    00081   vtkScalarsToColors *GetLookupTable();
    00083
    00086   virtual void CreateDefaultLookupTable();
    00087
    00089
    00091   vtkSetMacro(ScalarVisibility,int);
    00092   vtkGetMacro(ScalarVisibility,int);
    00093   vtkBooleanMacro(ScalarVisibility,int);
    00095
    00097
    00104   vtkSetMacro(ColorMode,int);
    00105   vtkGetMacro(ColorMode,int);
    00106   void SetColorModeToDefault();
    00107   void SetColorModeToMapScalars();
    00109
    00111   const char *GetColorModeAsString();
    00112
    00114
    00120   vtkSetMacro(UseLookupTableScalarRange,int);
    00121   vtkGetMacro(UseLookupTableScalarRange,int);
    00122   vtkBooleanMacro(UseLookupTableScalarRange,int);
    00124
    00126
    00129   vtkSetVector2Macro(ScalarRange,float);
    00130   vtkGetVectorMacro(ScalarRange,float,2);
    00132
    00134
    00144   vtkSetMacro(ScalarMode,int);
    00145   vtkGetMacro(ScalarMode,int);
    00146   void SetScalarModeToDefault() {
    00147     this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
    00148   void SetScalarModeToUsePointData() {
    00149     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
    00150   void SetScalarModeToUseCellData() {
    00151     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
    00152   void SetScalarModeToUsePointFieldData() {
    00153     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
    00154   void SetScalarModeToUseCellFieldData() {
    00155     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
    00157
    00159
    00160   void ColorByArrayComponent(int arrayNum, int component);
    00161   void ColorByArrayComponent(char* arrayName, int component);
    00163
    00165
    00166   char* GetArrayName() { return this->ArrayName; }
    00167   int GetArrayId() { return this->ArrayId; }
    00168   int GetArrayAccessMode() { return this->ArrayAccessMode; }
    00169   int GetArrayComponent() { return this->ArrayComponent; }
    00171
    00174   virtual unsigned long GetMTime();
    00175
    00177
    00181   virtual void SetTransformCoordinate(vtkCoordinate*);
    00182   vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
    00184
    00190   vtkUnsignedCharArray *MapScalars(float alpha);
    00191
    00193   void ShallowCopy(vtkAbstractMapper *m);
    00194
    00195 protected:
    00196   vtkPolyDataMapper2D();
    00197   ~vtkPolyDataMapper2D();
    00198
    00199   vtkPolyData* Input;
    00200
    00201   vtkUnsignedCharArray *Colors;
    00202
    00203   vtkScalarsToColors *LookupTable;
    00204   int ScalarVisibility;
    00205   vtkTimeStamp BuildTime;
    00206   float ScalarRange[2];
    00207   int UseLookupTableScalarRange;
    00208   int ColorMode;
    00209   int ScalarMode;
    00210
    00211   vtkCoordinate *TransformCoordinate;
    00212
    00213   // for coloring by a component of a field data array
    00214   int ArrayId;
    00215   char ArrayName[256];
    00216   int ArrayComponent;
    00217   int ArrayAccessMode;
    00218 private:
    00219   vtkPolyDataMapper2D(const vtkPolyDataMapper2D&);  // Not implemented.
    00220   void operator=(const vtkPolyDataMapper2D&);  // Not implemented.
    00221 };
    00222
    00223
    00224 #endif
    00225