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 = 0x001,
00056 VTK_PDM_COLORS = 0x002,
00057 VTK_PDM_TCOORDS = 0x004,
00058 VTK_PDM_CELL_COLORS = 0x008,
00059 VTK_PDM_CELL_NORMALS = 0x010,
00060 VTK_PDM_OPAQUE_COLORS = 0x020,
00061 VTK_PDM_FIELD_COLORS = 0x040,
00062 VTK_PDM_EDGEFLAGS = 0x080,
00063 VTK_PDM_GENERIC_VERTEX_ATTRIBUTES = 0x100
00064 };
00065
00066
00072 virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
00073
00076 virtual void ProcessInformation(vtkInformation*);
00077
00080 virtual vtkDataObject* GetOutput();
00081
00083
00092 virtual int RenderPrimitive(unsigned long flags, vtkDataArray* n,
00093 vtkUnsignedCharArray* c, vtkDataArray* t, vtkRenderer* ren) =0;
00095
00097
00103 virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
00104 unsigned long typeflags,
00105 bool forceCompileOnly);
00107
00109 virtual void ReportReferences(vtkGarbageCollector *collector);
00110
00111 int SupportedPrimitive;
00112 vtkSetMacro(SupportedPrimitive, int);
00113
00114 int DisableScalarColor;
00115
00116 vtkPolyData* OutputData;
00117 vtkTimeStamp OutputUpdateTime;
00118 bool GenericVertexAttributes;
00119 bool MultiTextureAttributes;
00120
00121 private:
00122 vtkPrimitivePainter(const vtkPrimitivePainter&);
00123 void operator=(const vtkPrimitivePainter&);
00124 };
00125
00126 #endif