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

vtkAbstractMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAbstractMapper.h,v $
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 =========================================================================*/
00037 #ifndef __vtkAbstractMapper_h
00038 #define __vtkAbstractMapper_h
00039 
00040 #include "vtkProcessObject.h"
00041 
00042 #define VTK_SCALAR_MODE_DEFAULT 0
00043 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
00044 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
00045 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
00046 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
00047 
00048 #define VTK_GET_ARRAY_BY_ID 0
00049 #define VTK_GET_ARRAY_BY_NAME 1
00050 
00051 class vtkDataArray;
00052 class vtkDataSet;
00053 class vtkPlane;
00054 class vtkPlaneCollection;
00055 class vtkPlanes;
00056 class vtkTimerLog;
00057 class vtkWindow;
00058 
00059 class VTK_FILTERING_EXPORT vtkAbstractMapper : public vtkProcessObject
00060 {
00061 public:
00062   vtkTypeRevisionMacro(vtkAbstractMapper,vtkProcessObject);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00066   virtual unsigned long GetMTime();
00067 
00071   virtual void ReleaseGraphicsResources(vtkWindow *) {};
00072 
00074 
00075   vtkGetMacro( TimeToDraw, double );
00077 
00079 
00081   void AddClippingPlane(vtkPlane *plane);
00082   void RemoveClippingPlane(vtkPlane *plane);
00083   void RemoveAllClippingPlanes();
00085 
00087 
00088   virtual void SetClippingPlanes(vtkPlaneCollection*);
00089   vtkGetObjectMacro(ClippingPlanes,vtkPlaneCollection);
00091 
00094   void SetClippingPlanes(vtkPlanes *planes);
00095 
00097   void ShallowCopy(vtkAbstractMapper *m);
00098 
00100 
00106   static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode,
00107                                   int arrayAccessMode, int arrayId, 
00108                                   const char *arrayName, int& cellFlag);
00109   // Description:
00110   // Get the number of consumers
00111   vtkGetMacro(NumberOfConsumers,int);
00113   
00115 
00116   void AddConsumer(vtkObject *c);
00117   void RemoveConsumer(vtkObject *c);
00118   vtkObject *GetConsumer(int i);
00119   int IsConsumer(vtkObject *c);
00121 
00122 protected:
00123   vtkAbstractMapper();
00124   ~vtkAbstractMapper();
00125 
00126   vtkTimerLog *Timer;
00127   double TimeToDraw;
00128   vtkWindow *LastWindow;   // Window used for the previous render
00129   vtkPlaneCollection *ClippingPlanes;
00130 
00131   // how many consumers does this object have
00132   int NumberOfConsumers;
00133   vtkObject **Consumers;
00134 
00135 private:
00136   vtkAbstractMapper(const vtkAbstractMapper&);  // Not implemented.
00137   void operator=(const vtkAbstractMapper&);  // Not implemented.
00138 };
00139 
00140 #endif
00141 
00142