00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkChooserPainter_h
00028 #define __vtkChooserPainter_h
00029
00030 #include "vtkPolyDataPainter.h"
00031
00032 class VTK_RENDERING_EXPORT vtkChooserPainter : public vtkPolyDataPainter
00033 {
00034 public:
00035 static vtkChooserPainter *New();
00036 vtkTypeMacro(vtkChooserPainter, vtkPolyDataPainter);
00037 void PrintSelf(ostream &os, vtkIndent indent);
00038
00039 void SetVertPainter(vtkPolyDataPainter*);
00040 void SetLinePainter(vtkPolyDataPainter*);
00041 void SetPolyPainter(vtkPolyDataPainter*);
00042 void SetStripPainter(vtkPolyDataPainter*);
00043
00045
00047 vtkSetMacro(UseLinesPainterForWireframes, int);
00048 vtkGetMacro(UseLinesPainterForWireframes, int);
00049 vtkBooleanMacro(UseLinesPainterForWireframes, int);
00051
00053
00057 protected:
00058 vtkChooserPainter();
00059 ~vtkChooserPainter();
00061
00062 vtkPolyDataPainter *VertPainter;
00063 vtkPolyDataPainter *LinePainter;
00064 vtkPolyDataPainter *PolyPainter;
00065 vtkPolyDataPainter *StripPainter;
00066
00067
00068
00074 virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00075
00078 virtual void ChoosePainters(vtkRenderer *renderer, vtkActor*);
00079
00081
00083 virtual void SelectPainters(vtkRenderer *renderer, vtkActor* actor,
00084 const char *&vertpaintertype,
00085 const char *&linepaintertype,
00086 const char *&polypaintertype,
00087 const char *&strippaintertype);
00089
00091 virtual void UpdateChoosenPainters();
00092
00094 virtual vtkPolyDataPainter *CreatePainter(const char *paintertype);
00095
00097
00102 virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00103 unsigned long typeflags, bool forceCompileOnly);
00105
00107 virtual void ReportReferences(vtkGarbageCollector *collector);
00108
00109 vtkRenderer *LastRenderer;
00110 vtkTimeStamp PaintersChoiceTime;
00111
00112 int UseLinesPainterForWireframes;
00113 private:
00114 vtkChooserPainter(const vtkChooserPainter &);
00115 void operator=(const vtkChooserPainter &);
00116 };
00117
00118 #endif //_vtkChooserPainter_h
00119