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
00056 protected:
00057 vtkChooserPainter();
00058 ~vtkChooserPainter();
00059
00060 vtkPolyDataPainter *VertPainter;
00061 vtkPolyDataPainter *LinePainter;
00062 vtkPolyDataPainter *PolyPainter;
00063 vtkPolyDataPainter *StripPainter;
00064
00065
00066
00072 virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00073
00076 virtual void ChoosePainters(vtkRenderer *renderer, vtkActor*);
00077
00079
00081 virtual void SelectPainters(vtkRenderer *renderer, vtkActor* actor,
00082 const char *&vertpaintertype,
00083 const char *&linepaintertype,
00084 const char *&polypaintertype,
00085 const char *&strippaintertype);
00087
00089 virtual void UpdateChoosenPainters();
00090
00092 virtual vtkPolyDataPainter *CreatePainter(const char *paintertype);
00093
00095
00100 virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00101 unsigned long typeflags, bool forceCompileOnly);
00103
00105 virtual void ReportReferences(vtkGarbageCollector *collector);
00106
00107 vtkRenderer *LastRenderer;
00108 vtkTimeStamp PaintersChoiceTime;
00109
00110 int UseLinesPainterForWireframes;
00111 private:
00112 vtkChooserPainter(const vtkChooserPainter &);
00113 void operator=(const vtkChooserPainter &);
00114 };
00115
00116 #endif //_vtkChooserPainter_h
00117