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

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 208 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 220 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 234 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 248 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 259 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 271 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 450 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 460 of file vtkGenericDataArray.h.