00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkPrimitivePainter_h
00029 #define __vtkPrimitivePainter_h
00030
00031 #include "vtkPolyDataPainter.h"
00032
00033 class vtkDataArray;
00034 class vtkPoints;
00035 class vtkUnsignedCharArray;
00036
00037 class VTK_RENDERING_EXPORT vtkPrimitivePainter : public vtkPolyDataPainter
00038 {
00039 public:
00040 vtkTypeMacro(vtkPrimitivePainter, vtkPolyDataPainter);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00046 vtkGetMacro(SupportedPrimitive, int);
00048
00049 protected:
00050 vtkPrimitivePainter();
00051 ~vtkPrimitivePainter();
00052
00053
00054 enum {
00055 VTK_PDM_NORMALS = 0x01,
00056 VTK_PDM_COLORS = 0x02,
00057 VTK_PDM_TCOORDS = 0x04,
00058 VTK_PDM_CELL_COLORS = 0x08,
00059 VTK_PDM_CELL_NORMALS = 0x10,
00060 VTK_PDM_OPAQUE_COLORS = 0x20,
00061 VTK_PDM_FIELD_COLORS = 0x40,
00062 VTK_PDM_GENERIC_VERTEX_ATTRIBUTES =0x80
00063 };
00064
00065
00071 virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00072
00075 virtual void ProcessInformation(vtkInformation*);
00076
00079 virtual vtkDataObject* GetOutput();
00080
00082
00091 virtual int RenderPrimitive(unsigned long flags, vtkDataArray* n,
00092 vtkUnsignedCharArray* c, vtkDataArray* t, vtkRenderer* ren) =0;
00094
00096
00102 virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00103 unsigned long typeflags,
00104 bool forceCompileOnly);
00106
00108 virtual void ReportReferences(vtkGarbageCollector *collector);
00109
00110 int SupportedPrimitive;
00111 vtkSetMacro(SupportedPrimitive, int);
00112
00113 int DisableScalarColor;
00114
00115 vtkPolyData* OutputData;
00116 vtkTimeStamp OutputUpdateTime;
00117 bool GenericVertexAttributes;
00118 bool MultiTextureAttributes;
00119
00120 private:
00121 vtkPrimitivePainter(const vtkPrimitivePainter&);
00122 void operator=(const vtkPrimitivePainter&);
00123 };
00124
00125 #endif