VTK
dox/Rendering/Core/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 "vtkRenderingCoreModule.h" // For export macro
00031 #include "vtkPolyDataMapper.h"
00032 
00033 class vtkPainterPolyDataMapperObserver;
00034 class vtkPainter;
00035 
00036 class VTKRENDERINGCORE_EXPORT vtkPainterPolyDataMapper : public vtkPolyDataMapper
00037 {
00038 public:
00039   static vtkPainterPolyDataMapper* New();
00040   vtkTypeMacro(vtkPainterPolyDataMapper, vtkPolyDataMapper);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044   virtual void RenderPiece(vtkRenderer *ren, vtkActor *act);
00045 
00047 
00051   vtkGetObjectMacro(Painter, vtkPainter);
00052   void SetPainter(vtkPainter*);
00054 
00058   void ReleaseGraphicsResources(vtkWindow *);
00059 
00061 
00069   virtual void MapDataArrayToVertexAttribute(
00070     const char* vertexAttributeName,
00071     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00073 
00074   virtual void MapDataArrayToMultiTextureAttribute(
00075     int unit,
00076     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00077 
00079   virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
00080 
00082   virtual void RemoveAllVertexAttributeMappings();
00083 
00085 
00086   vtkGetObjectMacro(SelectionPainter, vtkPainter);
00087   void SetSelectionPainter(vtkPainter*);
00089 
00091 
00095   virtual bool GetSupportsSelection()
00096     { return (this->SelectionPainter != 0); }
00098 
00107   virtual bool GetIsOpaque();
00108 
00109 protected:
00110   vtkPainterPolyDataMapper();
00111   ~vtkPainterPolyDataMapper();
00112 
00117   virtual void ComputeBounds();
00118 
00121   virtual void UpdatePainterInformation();
00122 
00124   virtual void ReportReferences(vtkGarbageCollector *collector);
00125 
00126   vtkInformation* PainterInformation;
00127   vtkTimeStamp PainterUpdateTime;
00128   vtkPainter* Painter;
00129   // Painter used when rendering for hardware selection
00130   // (look at vtkHardwareSelector).
00131   vtkPainter* SelectionPainter;
00132   vtkPainterPolyDataMapperObserver* Observer;
00133 private:
00134   vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented.
00135   void operator=(const vtkPainterPolyDataMapper&); // Not implemented.
00136 };
00137 
00138 #endif
00139