Go to the documentation of this file.
40 #ifndef vtkArrayListTemplate_h
41 #define vtkArrayListTemplate_h
69 const double *weights,
vtkIdType outId) = 0;
94 for (
int j=0; j < this->
NumComp; ++j)
96 this->Output[outId*this->NumComp+j] = this->Input[inId*this->NumComp+j];
101 const double *weights,
vtkIdType outId) VTK_OVERRIDE
103 for (
int j=0; j < this->
NumComp; ++j)
108 v += weights[i] *
static_cast<double>(this->Input[ids[i]*this->NumComp+j]);
110 this->Output[outId*this->NumComp+j] =
static_cast<T
>(v);
118 for (
int j=0; j < numComp; ++j)
120 v = this->Input[v0*numComp+j] +
121 t * (this->Input[v1*numComp+j] - this->Input[v0*numComp+j]);
122 this->Output[outId*numComp+j] =
static_cast<T
>(v);
128 for (
int j=0; j < this->
NumComp; ++j)
130 this->Output[outId*this->NumComp+j] = this->
NullValue;
144 template <
typename TInput,
typename TOutput>
161 for (
int j=0; j < this->
NumComp; ++j)
163 this->Output[outId*this->NumComp+j] =
static_cast<TOutput
>(this->Input[inId*this->NumComp+j]);
168 const double *weights,
vtkIdType outId) VTK_OVERRIDE
170 for (
int j=0; j < this->
NumComp; ++j)
175 v += weights[i] *
static_cast<double>(this->Input[ids[i]*this->NumComp+j]);
177 this->Output[outId*this->NumComp+j] =
static_cast<TOutput
>(v);
185 for (
int j=0; j < numComp; ++j)
187 v = this->Input[v0*numComp+j] +
188 t * (this->Input[v1*numComp+j] - this->Input[v0*numComp+j]);
189 this->Output[outId*numComp+j] =
static_cast<TOutput
>(v);
195 for (
int j=0; j < this->
NumComp; ++j)
197 this->Output[outId*this->NumComp+j] = this->
NullValue;
212 template <
typename T>
214 vtkIdType numTuples,
int numComp, T nullValue);
233 vtkStdString &outArrayName,
double nullValue,
bool promote);
243 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
246 (*it)->Copy(inId, outId);
253 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
256 (*it)->Interpolate(numWeights, ids, weights, outId);
263 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
266 (*it)->InterpolateEdge(v0, v1, t, outId);
273 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
276 (*it)->AssignNullValue(outId);
283 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
293 for (std::vector<BaseArrayPair*>::iterator it =
Arrays.begin();
309 #include "vtkArrayListTemplate.txx"
virtual void * WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues)=0
Get the address of a particular data index.
vtkDataArray * AddArrayPair(vtkIdType numTuples, vtkDataArray *inArray, vtkStdString &outArrayName, double nullValue, bool promote)
BaseArrayPair(vtkIdType num, int numComp, vtkDataArray *outArray)
virtual void Copy(vtkIdType inId, vtkIdType outId)=0
vtkIdType GetNumberOfArrays()
void AssignNullValue(vtkIdType outId) override
represent and manipulate attribute data in a dataset
virtual void AssignNullValue(vtkIdType outId)=0
void Copy(vtkIdType inId, vtkIdType outId) override
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId) override
bool IsExcluded(vtkDataArray *da)
abstract superclass for arrays of numeric data
void Copy(vtkIdType inId, vtkIdType outId)
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId) override
virtual void * GetVoidPointer(vtkIdType valueIdx)=0
Return a void pointer.
void AssignNullValue(vtkIdType outId) override
void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId)
void Realloc(vtkIdType sze) override
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId) override
virtual void Interpolate(int numWeights, const vtkIdType *ids, const double *weights, vtkIdType outId)=0
void CreateArrayPair(ArrayList *list, T *inData, T *outData, vtkIdType numTuples, int numComp, T nullValue)
vtkSmartPointer< vtkDataArray > OutputArray
void Copy(vtkIdType inId, vtkIdType outId) override
void Realloc(vtkIdType sze)
RealArrayPair(TInput *in, TOutput *out, vtkIdType num, int numComp, vtkDataArray *outArray, TOutput null)
virtual void Realloc(vtkIdType sze)=0
void AssignNullValue(vtkIdType outId)
virtual void InterpolateEdge(vtkIdType v0, vtkIdType v1, double t, vtkIdType outId)=0
void Realloc(vtkIdType sze) override
void AddArrays(vtkIdType numOutPts, vtkDataSetAttributes *inPD, vtkDataSetAttributes *outPD, double nullValue=0.0, bool promote=true)
std::vector< BaseArrayPair * > Arrays
void ExcludeArray(vtkDataArray *da)
Wrapper around std::string to keep symbols short.
std::vector< vtkDataArray * > ExcludedArrays
ArrayPair(T *in, T *out, vtkIdType num, int numComp, vtkDataArray *outArray, T null)
~RealArrayPair() override