00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00030 #ifndef __vtkPolyDataMapper_h
00031 #define __vtkPolyDataMapper_h
00032
00033 #include "vtkMapper.h"
00034 #include "vtkTexture.h"
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&);
00132 void operator=(const vtkPolyDataMapper&);
00133 };
00134
00135 #endif