VTK  9.1.0
Functions
vtkGenericDataArray Concept Methods

These signatures must be reimplemented in subclasses as public, non-virtual methods. More...

Functions

ValueType vtkGenericDataArray< DerivedT, ValueTypeT >::GetValue (vtkIdType valueIdx) const
 Get the value at valueIdx. More...
 
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetValue (vtkIdType valueIdx, ValueType value)
 Set the value at valueIdx to value. More...
 
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetTypedTuple (vtkIdType tupleIdx, ValueType *tuple) const
 Copy the tuple at tupleIdx into tuple. More...
 
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTypedTuple (vtkIdType tupleIdx, const ValueType *tuple)
 Set this array's tuple at tupleIdx to the values in tuple. More...
 
ValueType vtkGenericDataArray< DerivedT, ValueTypeT >::GetTypedComponent (vtkIdType tupleIdx, int compIdx) const
 Get component compIdx of the tuple at tupleIdx. More...
 
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTypedComponent (vtkIdType tupleIdx, int compIdx, ValueType value)
 Set component compIdx of the tuple at tupleIdx to value. More...
 
bool vtkGenericDataArray< DerivedT, ValueTypeT >::AllocateTuples (vtkIdType numTuples)
 Allocate space for numTuples. More...
 
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ReallocateTuples (vtkIdType numTuples)
 Allocate space for numTuples. More...
 

Detailed Description

These signatures must be reimplemented in subclasses as public, non-virtual methods.

Ideally, they should be inlined and as efficient as possible to ensure the best performance possible.

Function Documentation

◆ GetValue()

template<class DerivedT , class ValueTypeT >
ValueType vtkGenericDataArray< DerivedT, ValueTypeT >::GetValue ( vtkIdType  valueIdx) const
inline

Get the value at valueIdx.

valueIdx assumes AOS ordering.

Note
GetTypedComponent is preferred over this method. It is faster for SOA arrays, and shows equivalent performance for AOS arrays when NumberOfComponents is known to the compiler (See vtkAssume.h).

Definition at line 107 of file vtkGenericDataArray.h.

◆ SetValue()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetValue ( vtkIdType  valueIdx,
ValueType  value 
)
inline

Set the value at valueIdx to value.

valueIdx assumes AOS ordering.

Note
SetTypedComponent is preferred over this method. It is faster for SOA arrays, and shows equivalent performance for AOS arrays when NumberOfComponents is known to the compiler (See vtkAssume.h).

Definition at line 119 of file vtkGenericDataArray.h.

◆ GetTypedTuple()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetTypedTuple ( vtkIdType  tupleIdx,
ValueType tuple 
) const
inline

Copy the tuple at tupleIdx into tuple.

Note
GetTypedComponent is preferred over this method. The overhead of copying the tuple is significant compared to the more performant component-wise access methods, which typically optimize to raw memory access.

Definition at line 133 of file vtkGenericDataArray.h.

◆ SetTypedTuple()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTypedTuple ( vtkIdType  tupleIdx,
const ValueType tuple 
)
inline

Set this array's tuple at tupleIdx to the values in tuple.

Note
SetTypedComponent is preferred over this method. The overhead of copying the tuple is significant compared to the more performant component-wise access methods, which typically optimize to raw memory access.

Definition at line 147 of file vtkGenericDataArray.h.

◆ GetTypedComponent()

template<class DerivedT , class ValueTypeT >
ValueType vtkGenericDataArray< DerivedT, ValueTypeT >::GetTypedComponent ( vtkIdType  tupleIdx,
int  compIdx 
) const
inline

Get component compIdx of the tuple at tupleIdx.

This is typically the fastest way to access array data.

Definition at line 158 of file vtkGenericDataArray.h.

◆ SetTypedComponent()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTypedComponent ( vtkIdType  tupleIdx,
int  compIdx,
ValueType  value 
)
inline

Set component compIdx of the tuple at tupleIdx to value.

This is typically the fastest way to set array data.

Definition at line 169 of file vtkGenericDataArray.h.

◆ AllocateTuples()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::AllocateTuples ( vtkIdType  numTuples)
inlineprotected

Allocate space for numTuples.

Old data is not preserved. If numTuples == 0, all data is freed.

Definition at line 335 of file vtkGenericDataArray.h.

◆ ReallocateTuples()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ReallocateTuples ( vtkIdType  numTuples)
inlineprotected

Allocate space for numTuples.

Old data is preserved. If numTuples == 0, all data is freed.

Definition at line 345 of file vtkGenericDataArray.h.