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

# Common/vtkAbstractMapper.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkAbstractMapper.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 =========================================================================*/
    00044 #ifndef __vtkAbstractMapper_h
    00045 #define __vtkAbstractMapper_h
    00046
    00047 #include "vtkProcessObject.h"
    00048
    00049 #define VTK_SCALAR_MODE_DEFAULT 0
    00050 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
    00051 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
    00052 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
    00053 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
    00054
    00055 #define VTK_GET_ARRAY_BY_ID 0
    00056 #define VTK_GET_ARRAY_BY_NAME 1
    00057
    00058 class vtkDataArray;
    00059 class vtkDataSet;
    00060 class vtkPlane;
    00061 class vtkPlaneCollection;
    00062 class vtkPlanes;
    00063 class vtkTimerLog;
    00064 class vtkWindow;
    00065
    00066 class VTK_COMMON_EXPORT vtkAbstractMapper : public vtkProcessObject
    00067 {
    00068 public:
    00069   vtkTypeRevisionMacro(vtkAbstractMapper,vtkProcessObject);
    00070   void PrintSelf(ostream& os, vtkIndent indent);
    00071
    00073   virtual unsigned long GetMTime();
    00074
    00078   virtual void ReleaseGraphicsResources(vtkWindow *) {};
    00079
    00081
    00082   vtkGetMacro( TimeToDraw, float );
    00084
    00086
    00088   void AddClippingPlane(vtkPlane *plane);
    00089   void RemoveClippingPlane(vtkPlane *plane);
    00090   void RemoveAllClippingPlanes();
    00092
    00094
    00095   virtual void SetClippingPlanes(vtkPlaneCollection*);
    00096   vtkGetObjectMacro(ClippingPlanes,vtkPlaneCollection);
    00098
    00101   void SetClippingPlanes(vtkPlanes *planes);
    00102
    00104   void ShallowCopy(vtkAbstractMapper *m);
    00105
    00107
    00112   static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode,
    00113                                   int arrayAccessMode, int arrayId,
    00114                                   const char *arrayName, int& component);
    00115   // Description:
    00116   // Get the number of consumers
    00117   vtkGetMacro(NumberOfConsumers,int);
    00119
    00121
    00122   void AddConsumer(vtkObject *c);
    00123   void RemoveConsumer(vtkObject *c);
    00124   vtkObject *GetConsumer(int i);
    00125   int IsConsumer(vtkObject *c);
    00127
    00128 protected:
    00129   vtkAbstractMapper();
    00130   ~vtkAbstractMapper();
    00131
    00132   vtkTimerLog *Timer;
    00133   float TimeToDraw;
    00134   vtkWindow *LastWindow;   // Window used for the previous render
    00135   vtkPlaneCollection *ClippingPlanes;
    00136
    00137   // how many consumers does this object have
    00138   int NumberOfConsumers;
    00139   vtkObject **Consumers;
    00140
    00141 private:
    00142   vtkAbstractMapper(const vtkAbstractMapper&);  // Not implemented.
    00143   void operator=(const vtkAbstractMapper&);  // Not implemented.
    00144 };
    00145
    00146 #endif
    00147
    00148