VTK
dox/Rendering/vtkPainterPolyDataMapper.h
Go to the documentation of this file.
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 
00068   virtual void MapDataArrayToVertexAttribute(
00069     const char* vertexAttributeName,
00070     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00072 
00073   virtual void MapDataArrayToMultiTextureAttribute(
00074     int unit,
00075     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00076 
00078   virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
00079 
00081   virtual void RemoveAllVertexAttributeMappings();
00082   
00084 
00085   vtkGetObjectMacro(SelectionPainter, vtkPainter);
00086   void SetSelectionPainter(vtkPainter*);
00088 
00090 
00094   virtual bool GetSupportsSelection()
00095     { return (this->SelectionPainter != 0); }
00097 
00106   virtual bool GetIsOpaque();
00107 
00108 protected:
00109   vtkPainterPolyDataMapper();
00110   ~vtkPainterPolyDataMapper();
00111 
00116   virtual void ComputeBounds();
00117 
00120   virtual void UpdatePainterInformation();
00121 
00123   virtual void ReportReferences(vtkGarbageCollector *collector);
00124 
00125   vtkInformation* PainterInformation;
00126   vtkTimeStamp PainterUpdateTime;
00127   vtkPainter* Painter;
00128   // Painter used when rendering for hardware selection 
00129   // (look at vtkHardwareSelector).
00130   vtkPainter* SelectionPainter;
00131   vtkPainterPolyDataMapperObserver* Observer;
00132 private:
00133   vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented.
00134   void operator=(const vtkPainterPolyDataMapper&); // Not implemented.
00135 };
00136 
00137 #endif
00138