VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyDataMapper.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 __vtkPolyDataMapper_h 00028 #define __vtkPolyDataMapper_h 00029 00030 #include "vtkMapper.h" 00031 #include "vtkTexture.h" // used to include texture unit enum. 00032 00033 class vtkPolyData; 00034 class vtkRenderer; 00035 class vtkRenderWindow; 00036 00037 class VTK_RENDERING_EXPORT vtkPolyDataMapper : public vtkMapper 00038 { 00039 public: 00040 static vtkPolyDataMapper *New(); 00041 vtkTypeRevisionMacro(vtkPolyDataMapper,vtkMapper); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0; 00046 00048 virtual void Render(vtkRenderer *ren, vtkActor *act); 00049 00051 00052 void SetInput(vtkPolyData *in); 00053 vtkPolyData *GetInput(); 00055 00057 void Update(); 00058 00060 00061 vtkSetMacro(Piece, int); 00062 vtkGetMacro(Piece, int); 00063 vtkSetMacro(NumberOfPieces, int); 00064 vtkGetMacro(NumberOfPieces, int); 00065 vtkSetMacro(NumberOfSubPieces, int); 00066 vtkGetMacro(NumberOfSubPieces, int); 00068 00070 00071 vtkSetMacro(GhostLevel, int); 00072 vtkGetMacro(GhostLevel, int); 00074 00076 00078 virtual double *GetBounds(); 00079 virtual void GetBounds(double bounds[6]) 00080 {this->Superclass::GetBounds(bounds);}; 00082 00084 void ShallowCopy(vtkAbstractMapper *m); 00085 00087 00095 virtual void MapDataArrayToVertexAttribute( 00096 const char* vertexAttributeName, 00097 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00099 00100 virtual void MapDataArrayToMultiTextureAttribute( 00101 int unit, 00102 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00103 00105 virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName); 00106 00108 virtual void RemoveAllVertexAttributeMappings(); 00109 00110 protected: 00111 vtkPolyDataMapper(); 00112 ~vtkPolyDataMapper() {}; 00113 00114 int Piece; 00115 int NumberOfPieces; 00116 int NumberOfSubPieces; 00117 int GhostLevel; 00118 00119 virtual int FillInputPortInformation(int, vtkInformation*); 00120 00121 private: 00122 vtkPolyDataMapper(const vtkPolyDataMapper&); // Not implemented. 00123 void operator=(const vtkPolyDataMapper&); // Not implemented. 00124 }; 00125 00126 #endif