VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPolyDataMapper.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 __vtkPolyDataMapper_h 00031 #define __vtkPolyDataMapper_h 00032 00033 #include "vtkMapper.h" 00034 #include "vtkTexture.h" // used to include texture unit enum. 00035 00036 class vtkPolyData; 00037 class vtkRenderer; 00038 class vtkRenderWindow; 00039 00040 class VTK_RENDERING_EXPORT vtkPolyDataMapper : public vtkMapper 00041 { 00042 public: 00043 static vtkPolyDataMapper *New(); 00044 vtkTypeMacro(vtkPolyDataMapper,vtkMapper); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 virtual void RenderPiece(vtkRenderer *ren, vtkActor *act) = 0; 00049 00051 virtual void Render(vtkRenderer *ren, vtkActor *act); 00052 00054 00055 void SetInput(vtkPolyData *in); 00056 vtkPolyData *GetInput(); 00058 00060 void Update(); 00061 00063 00064 vtkSetMacro(Piece, int); 00065 vtkGetMacro(Piece, int); 00066 vtkSetMacro(NumberOfPieces, int); 00067 vtkGetMacro(NumberOfPieces, int); 00068 vtkSetMacro(NumberOfSubPieces, int); 00069 vtkGetMacro(NumberOfSubPieces, int); 00071 00073 00074 vtkSetMacro(GhostLevel, int); 00075 vtkGetMacro(GhostLevel, int); 00077 00079 00081 virtual double *GetBounds(); 00082 virtual void GetBounds(double bounds[6]) 00083 {this->Superclass::GetBounds(bounds);}; 00085 00087 void ShallowCopy(vtkAbstractMapper *m); 00088 00090 00098 virtual void MapDataArrayToVertexAttribute( 00099 const char* vertexAttributeName, 00100 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00102 00103 virtual void MapDataArrayToMultiTextureAttribute( 00104 int unit, 00105 const char* dataArrayName, int fieldAssociation, int componentno=-1); 00106 00108 virtual void RemoveVertexAttributeMapping(const char* vertexAttributeName); 00109 00111 virtual void RemoveAllVertexAttributeMappings(); 00112 00113 protected: 00114 vtkPolyDataMapper(); 00115 ~vtkPolyDataMapper() {}; 00116 00121 virtual void ComputeBounds(); 00122 00123 int Piece; 00124 int NumberOfPieces; 00125 int NumberOfSubPieces; 00126 int GhostLevel; 00127 00128 virtual int FillInputPortInformation(int, vtkInformation*); 00129 00130 private: 00131 vtkPolyDataMapper(const vtkPolyDataMapper&); // Not implemented. 00132 void operator=(const vtkPolyDataMapper&); // Not implemented. 00133 }; 00134 00135 #endif