00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00056 #ifndef __vtkTCoords_h
00057 #define __vtkTCoords_h
00058
00059 #include "vtkAttributeData.h"
00060
00061 class vtkIdList;
00062 class vtkTCoords;
00063
00064 class VTK_EXPORT vtkTCoords : public vtkAttributeData
00065 {
00066 public:
00067 static vtkTCoords *New(int dataType, int dim=2);
00068 static vtkTCoords *New();
00069
00070
00071 vtkTypeMacro(vtkTCoords,vtkAttributeData);
00072 void PrintSelf(ostream& os, vtkIndent indent);
00073
00076 void SetData(vtkDataArray *);
00077
00079 vtkAttributeData *MakeObject();
00080
00082 int GetNumberOfTCoords() {return this->Data->GetNumberOfTuples();};
00083
00086 float *GetTCoord(int id){return this->Data->GetTuple(id);};
00087
00090 void GetTCoord(int id, float tc[3]) { this->Data->GetTuple(id,tc);};
00091
00094 void SetNumberOfTCoords(int number) {this->Data->SetNumberOfTuples(number);};
00095
00099 void SetTCoord(int id, const float tc[3]) {this->Data->SetTuple(id,tc);};
00100 void SetTCoord(int id, float r, float s, float t);
00101
00104 void InsertTCoord(int id, const float tc[3])
00105 {this->Data->InsertTuple(id,tc);};
00106
00108 void InsertTCoord(int id, float tx, float ty, float tz);
00109
00112 int InsertNextTCoord(const float tc[3])
00113 {return this->Data->InsertNextTuple(tc);}
00114 int InsertNextTCoord(float tx, float ty, float tz);
00115
00117 void SetNumberOfComponents(int num);
00118 int GetNumberOfComponents()
00119 {return this->Data->GetNumberOfComponents();}
00120
00122 void GetTCoords(vtkIdList *ptId, vtkTCoords *fv);
00123
00124 #ifndef VTK_REMOVE_LEGACY_CODE
00125
00126 void GetTCoords(vtkIdList& ptId, vtkTCoords& fv)
00127 {VTK_LEGACY_METHOD(GetTCoords,"3.2"); this->GetTCoords(&ptId, &fv);}
00128 #endif
00129
00130 protected:
00131 vtkTCoords();
00132 ~vtkTCoords() {};
00133 vtkTCoords(const vtkTCoords&) {};
00134 void operator=(const vtkTCoords&) {};
00135
00136 };
00137
00138 inline vtkAttributeData *vtkTCoords::MakeObject()
00139 {
00140 return vtkTCoords::New(this->GetDataType(), this->GetNumberOfComponents());
00141 }
00142
00143 inline void vtkTCoords::SetNumberOfComponents(int num)
00144 {
00145 num = (num < 1 ? 1 : (num > 3 ? 3 : num));
00146 this->Data->SetNumberOfComponents(num);
00147 }
00148
00149 inline void vtkTCoords::SetTCoord(int id, float tx, float ty, float tz)
00150 {
00151 float tc[3];
00152 tc[0] = tx;
00153 tc[1] = ty;
00154 tc[2] = tz;
00155 this->Data->SetTuple(id,tc);
00156 }
00157
00158 inline void vtkTCoords::InsertTCoord(int id, float tx, float ty, float tz)
00159 {
00160 float tc[3];
00161
00162 tc[0] = tx;
00163 tc[1] = ty;
00164 tc[2] = tz;
00165 this->Data->InsertTuple(id,tc);
00166 }
00167
00168 inline int vtkTCoords::InsertNextTCoord(float tx, float ty, float tz)
00169 {
00170 float tc[3];
00171
00172 tc[0] = tx;
00173 tc[1] = ty;
00174 tc[2] = tz;
00175 return this->Data->InsertNextTuple(tc);
00176 }
00177
00178
00179
00180
00181 #include "vtkIdList.h"
00182
00183 #endif