VTK
dox/Rendering/Core/vtkDefaultPainter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDefaultPainter.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 =========================================================================*/
00032 #ifndef __vtkDefaultPainter_h
00033 #define __vtkDefaultPainter_h
00034 
00035 #include "vtkRenderingCoreModule.h" // For export macro
00036 #include "vtkPainter.h"
00037 
00038 class vtkClipPlanesPainter;
00039 class vtkCoincidentTopologyResolutionPainter;
00040 class vtkCompositePainter;
00041 class vtkDisplayListPainter;
00042 class vtkLightingPainter;
00043 class vtkRepresentationPainter;
00044 class vtkScalarsToColorsPainter;
00045 
00046 class VTKRENDERINGCORE_EXPORT vtkDefaultPainter : public vtkPainter
00047 {
00048 public:
00049   static vtkDefaultPainter *New();
00050   vtkTypeMacro(vtkDefaultPainter, vtkPainter);
00051   virtual void PrintSelf(ostream &os, vtkIndent indent);
00052 
00054 
00055   void SetScalarsToColorsPainter(vtkScalarsToColorsPainter*);
00056   vtkGetObjectMacro(ScalarsToColorsPainter, vtkScalarsToColorsPainter);
00058 
00060 
00061   void SetClipPlanesPainter(vtkClipPlanesPainter*);
00062   vtkGetObjectMacro(ClipPlanesPainter, vtkClipPlanesPainter);
00064 
00066 
00067   void SetDisplayListPainter(vtkDisplayListPainter*);
00068   vtkGetObjectMacro(DisplayListPainter, vtkDisplayListPainter);
00070 
00072 
00073   void SetCompositePainter(vtkCompositePainter*);
00074   vtkGetObjectMacro(CompositePainter, vtkCompositePainter);
00076 
00078 
00079   void SetCoincidentTopologyResolutionPainter(
00080     vtkCoincidentTopologyResolutionPainter*);
00081   vtkGetObjectMacro(CoincidentTopologyResolutionPainter,
00082     vtkCoincidentTopologyResolutionPainter);
00084 
00086 
00087   void SetLightingPainter(vtkLightingPainter*);
00088   vtkGetObjectMacro(LightingPainter, vtkLightingPainter);
00090 
00092 
00093   void SetRepresentationPainter(vtkRepresentationPainter*);
00094   vtkGetObjectMacro(RepresentationPainter, vtkRepresentationPainter);
00096 
00098 
00101   virtual void SetDelegatePainter(vtkPainter*);
00102   virtual vtkPainter* GetDelegatePainter() { return this->DefaultPainterDelegate; }
00104 
00106 
00111   virtual void Render(vtkRenderer* renderer, vtkActor* actor,
00112                       unsigned long typeflags, bool forceCompileOnly);
00114 
00119   virtual void ReleaseGraphicsResources(vtkWindow *);
00120 
00124   void UpdateBounds(double bounds[6]);
00125 
00126 protected:
00127   vtkDefaultPainter();
00128   ~vtkDefaultPainter();
00129 
00131   virtual void BuildPainterChain();
00132 
00134   virtual void ReportReferences(vtkGarbageCollector *collector);
00135 
00136   vtkScalarsToColorsPainter* ScalarsToColorsPainter;
00137   vtkClipPlanesPainter* ClipPlanesPainter;
00138   vtkDisplayListPainter* DisplayListPainter;
00139   vtkCompositePainter* CompositePainter;
00140   vtkCoincidentTopologyResolutionPainter* CoincidentTopologyResolutionPainter;
00141   vtkLightingPainter* LightingPainter;
00142   vtkRepresentationPainter* RepresentationPainter;
00143   vtkTimeStamp ChainBuildTime;
00144 
00145   vtkPainter* DefaultPainterDelegate;
00146   void  SetDefaultPainterDelegate(vtkPainter*);
00147 
00148 private:
00149   vtkDefaultPainter(const vtkDefaultPainter &); // Not implemented
00150   void operator=(const vtkDefaultPainter &);    // Not implemented
00151 };
00152 
00153 #endif //_vtkDefaultPainter_h
00154