VTK  9.3.20240419
Namespaces | Macros | Typedefs | Functions
vtkCompositeArray.h File Reference
#include "vtkCommonCoreModule.h"
#include "vtkCompositeImplicitBackend.h"
#include "vtkImplicitArray.h"
#include <vector>
Include dependency graph for vtkCompositeArray.h:

Go to the source code of this file.

Namespaces

 vtk
 Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
 

Macros

#define VTK_COMPOSITE_ARRAY_TEMPLATE_EXTERN
 

Typedefs

template<typename T >
using vtkCompositeArray = vtkImplicitArray< vtkCompositeImplicitBackend< T > >
 A utility alias for concatenating arrays into an implicit array. More...
 

Functions

vtkSmartPointer< vtkCompositeArray< T > > vtk::ConcatenateDataArrays (const std::vector< vtkDataArray * > &arrays)
 
 vtkExternSecondOrderTemplateMacro (extern template class VTKCOMMONCORE_EXPORT vtkImplicitArray, vtkCompositeImplicitBackend)
 

Macro Definition Documentation

◆ VTK_COMPOSITE_ARRAY_TEMPLATE_EXTERN

#define VTK_COMPOSITE_ARRAY_TEMPLATE_EXTERN

Definition at line 101 of file vtkCompositeArray.h.

Typedef Documentation

◆ vtkCompositeArray

template<typename T >
vtkCompositeArray

A utility alias for concatenating arrays into an implicit array.

In order to be usefully included in the dispatchers, these arrays need to be instantiated at the vtk library compile time.

An example of potential usage

leftArr->SetNumberOfTuples(1);
leftArr->SetValue(0, 0);
rightArr->SetNumberOfComponents(1);
rightArr->SetNumberOfTuples(1);
rightArr->SetValue(0, 1);
std::vector<vtkDataArray*> arrays({leftArr, rightArr});
compositeArr->SetBackend(std::make_shared<vtkCompositeImplicitBackend<int>>(arrays));
compositeArr->SetNumberOfComponents(1);
compositeArr->SetNumberOfTuples(2);
CHECK(compositArr->GetValue(1) == 1);
void SetValue(vtkIdType valueIdx, ValueType value)
Set the value at valueIdx to value.
A utility structure serving as a backend for composite arrays: an array composed of multiple arrays c...
void SetNumberOfComponents(int num) override
Set/Get the dimension (n) of the components.
void SetNumberOfTuples(vtkIdType number) override
Set the number of tuples (a component group) in the array.
See also
vtkImplicitArray vtkCompositeImplicitBackend

Definition at line 53 of file vtkCompositeArray.h.

Function Documentation

◆ vtkExternSecondOrderTemplateMacro()

vtkExternSecondOrderTemplateMacro ( extern template class VTKCOMMONCORE_EXPORT  vtkImplicitArray,
vtkCompositeImplicitBackend   
)