VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPainterPolyDataMapper.h 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 vtkTypeMacro(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 virtual void GetBounds(double bounds[6]) 00062 { this->Superclass::GetBounds(bounds); } 00063 virtual double *GetBounds(); 00065 00067 00075 virtual void MapDataArrayToVertexAttribute( 00076 const char* vertexAttributeName, 00077 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00079 00080 virtual void MapDataArrayToMultiTextureAttribute( 00081 int unit, 00082 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00083 00085 virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName); 00086 00088 virtual void RemoveAllVertexAttributeMappings(); 00089 00091 00092 vtkGetObjectMacro(SelectionPainter, vtkPainter); 00093 void SetSelectionPainter(vtkPainter*); 00095 00097 00101 virtual bool GetSupportsSelection() 00102 { return (this->SelectionPainter != 0); } 00104 00105 protected: 00106 vtkPainterPolyDataMapper(); 00107 ~vtkPainterPolyDataMapper(); 00108 00111 virtual void UpdatePainterInformation(); 00112 00114 virtual void ReportReferences(vtkGarbageCollector *collector); 00115 00116 vtkInformation* PainterInformation; 00117 vtkTimeStamp PainterUpdateTime; 00118 vtkPainter* Painter; 00119 // Painter used when rendering for hardware selection 00120 // (look at vtkHardwareSelector). 00121 vtkPainter* SelectionPainter; 00122 vtkPainterPolyDataMapperObserver* Observer; 00123 private: 00124 vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented. 00125 void operator=(const vtkPainterPolyDataMapper&); // Not implemented. 00126 }; 00127 00128 #endif 00129