VTK
|
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 "vtkRenderingCoreModule.h" // For export macro 00031 #include "vtkAlgorithm.h" 00032 00033 #define VTK_SCALAR_MODE_DEFAULT 0 00034 #define VTK_SCALAR_MODE_USE_POINT_DATA 1 00035 #define VTK_SCALAR_MODE_USE_CELL_DATA 2 00036 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3 00037 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4 00038 #define VTK_SCALAR_MODE_USE_FIELD_DATA 5 00039 00040 #define VTK_GET_ARRAY_BY_ID 0 00041 #define VTK_GET_ARRAY_BY_NAME 1 00042 00043 class vtkDataArray; 00044 class vtkDataSet; 00045 class vtkPlane; 00046 class vtkPlaneCollection; 00047 class vtkPlanes; 00048 class vtkTimerLog; 00049 class vtkWindow; 00050 00051 class VTKRENDERINGCORE_EXPORT vtkAbstractMapper : public vtkAlgorithm 00052 { 00053 public: 00054 vtkTypeMacro(vtkAbstractMapper, vtkAlgorithm); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 virtual unsigned long GetMTime(); 00059 00063 virtual void ReleaseGraphicsResources(vtkWindow *) {} 00064 00066 00067 vtkGetMacro( TimeToDraw, double ); 00069 00071 00073 void AddClippingPlane(vtkPlane *plane); 00074 void RemoveClippingPlane(vtkPlane *plane); 00075 void RemoveAllClippingPlanes(); 00077 00079 00080 virtual void SetClippingPlanes(vtkPlaneCollection*); 00081 vtkGetObjectMacro(ClippingPlanes, vtkPlaneCollection); 00083 00086 void SetClippingPlanes(vtkPlanes *planes); 00087 00089 void ShallowCopy(vtkAbstractMapper *m); 00090 00092 00098 static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode, 00099 int arrayAccessMode, int arrayId, 00100 const char *arrayName, int& cellFlag); 00102 00103 protected: 00104 vtkAbstractMapper(); 00105 ~vtkAbstractMapper(); 00106 00107 vtkTimerLog *Timer; 00108 double TimeToDraw; 00109 vtkWindow *LastWindow; // Window used for the previous render 00110 vtkPlaneCollection *ClippingPlanes; 00111 00112 private: 00113 vtkAbstractMapper(const vtkAbstractMapper&); // Not implemented. 00114 void operator=(const vtkAbstractMapper&); // Not implemented. 00115 }; 00116 00117 #endif