00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPainterPolyDataMapper.h,v $ 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 __vtkPainterPolyDataMapper_h 00028 #define __vtkPainterPolyDataMapper_h 00029 00030 #include "vtkPolyDataMapper.h" 00031 00032 class vtkPainterPolyDataMapperObserver; 00033 class vtkPainter; 00034 00035 class VTK_RENDERING_EXPORT vtkPainterPolyDataMapper : public vtkPolyDataMapper 00036 { 00037 public: 00038 static vtkPainterPolyDataMapper* New(); 00039 vtkTypeRevisionMacro(vtkPainterPolyDataMapper, vtkPolyDataMapper); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00043 virtual void RenderPiece(vtkRenderer *ren, vtkActor *act); 00044 00046 00050 vtkGetObjectMacro(Painter, vtkPainter); 00051 void SetPainter(vtkPainter*); 00053 00057 void ReleaseGraphicsResources(vtkWindow *); 00058 00060 00061 void GetBounds(double bounds[6]); 00062 double *GetBounds(); 00064 00066 00074 virtual void MapDataArrayToVertexAttribute( 00075 const char* vertexAttributeName, 00076 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00078 00080 virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName); 00081 00083 virtual void RemoveAllVertexAttributeMappings(); 00084 00085 protected: 00086 vtkPainterPolyDataMapper(); 00087 ~vtkPainterPolyDataMapper(); 00088 00091 virtual void UpdatePainterInformation(); 00092 00094 virtual void ReportReferences(vtkGarbageCollector *collector); 00095 00096 vtkInformation* PainterInformation; 00097 vtkTimeStamp PainterUpdateTime; 00098 vtkPainter* Painter; 00099 vtkPainterPolyDataMapperObserver* Observer; 00100 private: 00101 vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented. 00102 void operator=(const vtkPainterPolyDataMapper&); // Not implemented. 00103 }; 00104 00105 #endif 00106