VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/OpenGL/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 =========================================================================*/
00030 #ifndef vtkPainterPolyDataMapper_h
00031 #define vtkPainterPolyDataMapper_h
00032 
00033 #include "vtkRenderingOpenGLModule.h" // For export macro
00034 #include "vtkPolyDataMapper.h"
00035 
00036 class vtkPainterPolyDataMapperObserver;
00037 class vtkPainter;
00038 
00039 class VTKRENDERINGOPENGL_EXPORT vtkPainterPolyDataMapper : public vtkPolyDataMapper
00040 {
00041 public:
00042   static vtkPainterPolyDataMapper* New();
00043   vtkTypeMacro(vtkPainterPolyDataMapper, vtkPolyDataMapper);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047   virtual void RenderPiece(vtkRenderer *ren, vtkActor *act);
00048 
00050 
00054   vtkGetObjectMacro(Painter, vtkPainter);
00055   void SetPainter(vtkPainter*);
00057 
00061   void ReleaseGraphicsResources(vtkWindow *);
00062 
00064 
00072   virtual void MapDataArrayToVertexAttribute(
00073     const char* vertexAttributeName,
00074     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00076 
00077   virtual void MapDataArrayToMultiTextureAttribute(
00078     int unit,
00079     const char* dataArrayName, int fieldAssociation, int componentno=-1);
00080 
00082   virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName);
00083 
00085   virtual void RemoveAllVertexAttributeMappings();
00086 
00088 
00089   vtkGetObjectMacro(SelectionPainter, vtkPainter);
00090   void SetSelectionPainter(vtkPainter*);
00092 
00094 
00098   virtual bool GetSupportsSelection()
00099     { return (this->SelectionPainter != 0); }
00101 
00110   virtual bool GetIsOpaque();
00111 
00112 protected:
00113   vtkPainterPolyDataMapper();
00114   ~vtkPainterPolyDataMapper();
00115 
00120   virtual void ComputeBounds();
00121 
00124   virtual void UpdatePainterInformation();
00125 
00127   virtual void ReportReferences(vtkGarbageCollector *collector);
00128 
00129   vtkInformation* PainterInformation;
00130   vtkTimeStamp PainterUpdateTime;
00131   vtkPainter* Painter;
00132   // Painter used when rendering for hardware selection
00133   // (look at vtkHardwareSelector).
00134   vtkPainter* SelectionPainter;
00135   vtkPainterPolyDataMapperObserver* Observer;
00136 private:
00137   vtkPainterPolyDataMapper(const vtkPainterPolyDataMapper&); // Not implemented.
00138   void operator=(const vtkPainterPolyDataMapper&); // Not implemented.
00139 };
00140 
00141 #endif