35 #ifndef vtkMappedDataArray_h
36 #define vtkMappedDataArray_h
40 template <
class Scalar>
45 typedef typename Superclass::ValueType
ValueType;
112 vtkErrorMacro(<<
"WriteVoidPointer: Method not implemented.");
143 size_t TemporaryScalarPointerSize;
150 #include "vtkMappedDataArray.txx"
156 #define vtkMappedDataArrayNewInstanceMacro(thisClass) \
158 vtkObjectBase *NewInstanceInternal() const \
160 if (vtkDataArray *da = \
161 vtkDataArray::CreateDataArray(thisClass::VTK_DATA_TYPE)) \
165 return thisClass::New(); \
171 #define vtkMappedDataArrayTypeMacro(thisClass, superClass) \
172 vtkAbstractTypeMacroWithNewInstanceType(thisClass, superClass, vtkDataArray) \
173 vtkMappedDataArrayNewInstanceMacro(thisClass)
Abstract superclass for all arrays.
abstract superclass for arrays of numeric data
vtkTemplateTypeMacro(SelfType, vtkDataArray) enum
Compile time access to the VTK type identifier.
list of point or cell ids
a simple class to control print indentation
Map non-contiguous data structures into the vtkDataArray API.
void InterpolateTuple(vtkIdType i, vtkIdType id1, vtkAbstractArray *source1, vtkIdType id2, vtkAbstractArray *source2, double t)=0
Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices,...
void Modified()
Invalidate the internal temporary array and call superclass method.
void ExportToVoidPointer(void *ptr)
Copy the internal data to the void pointer.
virtual int GetArrayType()
Method for type-checking in FastDownCast implementations.
void SetVariantValue(vtkIdType idx, vtkVariant value)=0
Set a value in the array from a variant.
bool HasStandardMemoryLayout()
Returns true if this array uses the standard memory layout defined in the VTK user guide,...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output)=0
Given a list of tuple ids, return an array of tuples.
void SetVoidArray(void *, vtkIdType, int)
These methods don't make sense for mapped data array.
void SetVoidArray(void *, vtkIdType, int, int)
static vtkTemplateTypeMacro(vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar >) typedef typename Superclass vtkMappedDataArray< Scalar > * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkMappedDataArray.
void DeepCopy(vtkDataArray *da)=0
void * GetVoidPointer(vtkIdType id)
Print an error and create an internal, long-lived temporary array.
void DataChanged()
Read the data from the internal temporary array (created by GetVoidPointer) back into the mapped arra...
void DeepCopy(vtkAbstractArray *aa)=0
Deep copy of data.
void * WriteVoidPointer(vtkIdType, vtkIdType)
Not implemented.
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output)=0
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
vtkVariant GetVariantValue(vtkIdType idx)=0
Retrieve value from the array as a variant.
Extend vtkDataArray with abstract type-specific API.
A atomic type representing the union of many types.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkArrayDownCast_TemplateFastCastMacro(vtkTypedDataArray) template< class Scalar > inline typename vtkTypedDataArray< Scalar >