00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAbstractMapper.h 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 =========================================================================*/ 00027 #ifndef __vtkAbstractMapper_h 00028 #define __vtkAbstractMapper_h 00029 00030 #include "vtkAlgorithm.h" 00031 00032 #define VTK_SCALAR_MODE_DEFAULT 0 00033 #define VTK_SCALAR_MODE_USE_POINT_DATA 1 00034 #define VTK_SCALAR_MODE_USE_CELL_DATA 2 00035 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3 00036 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4 00037 #define VTK_SCALAR_MODE_USE_FIELD_DATA 5 00038 00039 #define VTK_GET_ARRAY_BY_ID 0 00040 #define VTK_GET_ARRAY_BY_NAME 1 00041 00042 class vtkDataArray; 00043 class vtkDataSet; 00044 class vtkPlane; 00045 class vtkPlaneCollection; 00046 class vtkPlanes; 00047 class vtkTimerLog; 00048 class vtkWindow; 00049 00050 class VTK_FILTERING_EXPORT vtkAbstractMapper : public vtkAlgorithm 00051 { 00052 public: 00053 vtkTypeMacro(vtkAbstractMapper,vtkAlgorithm); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00057 virtual unsigned long GetMTime(); 00058 00062 virtual void ReleaseGraphicsResources(vtkWindow *) {}; 00063 00065 00066 vtkGetMacro( TimeToDraw, double ); 00068 00070 00072 void AddClippingPlane(vtkPlane *plane); 00073 void RemoveClippingPlane(vtkPlane *plane); 00074 void RemoveAllClippingPlanes(); 00076 00078 00079 virtual void SetClippingPlanes(vtkPlaneCollection*); 00080 vtkGetObjectMacro(ClippingPlanes,vtkPlaneCollection); 00082 00085 void SetClippingPlanes(vtkPlanes *planes); 00086 00088 void ShallowCopy(vtkAbstractMapper *m); 00089 00091 00097 static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode, 00098 int arrayAccessMode, int arrayId, 00099 const char *arrayName, int& cellFlag); 00101 00102 protected: 00103 vtkAbstractMapper(); 00104 ~vtkAbstractMapper(); 00105 00106 vtkTimerLog *Timer; 00107 double TimeToDraw; 00108 vtkWindow *LastWindow; // Window used for the previous render 00109 vtkPlaneCollection *ClippingPlanes; 00110 00111 private: 00112 vtkAbstractMapper(const vtkAbstractMapper&); // Not implemented. 00113 void operator=(const vtkAbstractMapper&); // Not implemented. 00114 }; 00115 00116 #endif 00117 00118