00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkPolyDataMapper_h
00028 #define __vtkPolyDataMapper_h
00029
00030 #include "vtkMapper.h"
00031 #include "vtkTexture.h"
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&);
00123 void operator=(const vtkPolyDataMapper&);
00124 };
00125
00126 #endif