VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/OpenGL/vtkChooserPainter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkChooserPainter.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 vtkChooserPainter_h
00028 #define vtkChooserPainter_h
00029 
00030 #include "vtkRenderingOpenGLModule.h" // For export macro
00031 #include "vtkPolyDataPainter.h"
00032 
00033 class VTKRENDERINGOPENGL_EXPORT vtkChooserPainter : public vtkPolyDataPainter
00034 {
00035 public:
00036   static vtkChooserPainter *New();
00037   vtkTypeMacro(vtkChooserPainter, vtkPolyDataPainter);
00038   void PrintSelf(ostream &os, vtkIndent indent);
00039 
00040   void SetVertPainter(vtkPolyDataPainter*);
00041   void SetLinePainter(vtkPolyDataPainter*);
00042   void SetPolyPainter(vtkPolyDataPainter*);
00043   void SetStripPainter(vtkPolyDataPainter*);
00044 
00046 
00048   vtkSetMacro(UseLinesPainterForWireframes, int);
00049   vtkGetMacro(UseLinesPainterForWireframes, int);
00050   vtkBooleanMacro(UseLinesPainterForWireframes, int);
00052 
00054 
00058 protected:
00059   vtkChooserPainter();
00060   ~vtkChooserPainter();
00062 
00063   vtkPolyDataPainter *VertPainter;
00064   vtkPolyDataPainter *LinePainter;
00065   vtkPolyDataPainter *PolyPainter;
00066   vtkPolyDataPainter *StripPainter;
00067 
00068 
00069 
00075   virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00076 
00079   virtual void ChoosePainters(vtkRenderer *renderer, vtkActor*);
00080 
00082 
00084   virtual void SelectPainters(vtkRenderer *renderer, vtkActor* actor,
00085                               const char *&vertpaintertype,
00086                               const char *&linepaintertype,
00087                               const char *&polypaintertype,
00088                               const char *&strippaintertype);
00090 
00092   virtual void UpdateChoosenPainters();
00093 
00095   virtual vtkPolyDataPainter *CreatePainter(const char *paintertype);
00096 
00098 
00103   virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00104                               unsigned long typeflags, bool forceCompileOnly);
00106 
00108   virtual void ReportReferences(vtkGarbageCollector *collector);
00109 
00110   vtkRenderer *LastRenderer;
00111   vtkTimeStamp PaintersChoiceTime;
00112 
00113   int UseLinesPainterForWireframes;
00114 private:
00115   vtkChooserPainter(const vtkChooserPainter &); // Not implemented
00116   void operator=(const vtkChooserPainter &);    // Not implemented
00117 };
00118 
00119 #endif //_vtkChooserPainter_h