VTK  9.4.20241121
Functions
vtkReflectionUtilities Namespace Reference

Reflection methods for Unstructured Grid. More...

Functions

void FindReflectableArrays (vtkFieldData *fd, std::vector< std::pair< vtkIdType, int > > &reflectableArrays)
 method to determine which arrays from a field data can be reflected and store them in the provided reflectableArrays.
 
void FindAllReflectableArrays (std::vector< std::pair< vtkIdType, int > > &reflectableArrays, vtkDataSetAttributes *inData, bool reflectAllInputArrays)
 If reflectAllInputArrays is true, calls FindReflectableArrays.
 
void ReflectTuple (double *tuple, int *mirrorDir, int nComp)
 Reflect each component of the provided tuple according to the provided mirrorDir using the provided nComp component.
 
void ReflectReflectableArrays (std::vector< std::pair< vtkIdType, int > > &reflectableArrays, vtkDataSetAttributes *inData, vtkDataSetAttributes *outData, vtkIdType i, int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9], vtkIdType id)
 Reflect the i-th tuple of each array in reflectableArrays.
 
vtkIdType ReflectNon3DCellInternal (vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numInputPoints, bool copyInput)
 Generate new, non-3D cell and return the generated cell id.
 
void ProcessUnstructuredGrid (vtkDataSet *input, vtkUnstructuredGrid *output, double constant[3], int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9], bool copyInput, bool reflectAllInputArrays, vtkAlgorithm *algorithm)
 Generate the reflection of the input dataset as an unstructured grid.
 

Detailed Description

Reflection methods for Unstructured Grid.

This file defines a namespace providing functions used by vtkReflectionFilter and vtkAxisAlignedReflectionFilter to process Unstructured Grids.

Function Documentation

◆ FindReflectableArrays()

void vtkReflectionUtilities::FindReflectableArrays ( vtkFieldData fd,
std::vector< std::pair< vtkIdType, int > > &  reflectableArrays 
)

method to determine which arrays from a field data can be reflected and store them in the provided reflectableArrays.

Only 3/6/9 component signed data array are considered reflectable.

◆ FindAllReflectableArrays()

void vtkReflectionUtilities::FindAllReflectableArrays ( std::vector< std::pair< vtkIdType, int > > &  reflectableArrays,
vtkDataSetAttributes inData,
bool  reflectAllInputArrays 
)

If reflectAllInputArrays is true, calls FindReflectableArrays.

Otherwise, this function fills reflectableArrays with vectors, normals, and tensors.

◆ ReflectTuple()

void vtkReflectionUtilities::ReflectTuple ( double *  tuple,
int *  mirrorDir,
int  nComp 
)

Reflect each component of the provided tuple according to the provided mirrorDir using the provided nComp component.

◆ ReflectReflectableArrays()

void vtkReflectionUtilities::ReflectReflectableArrays ( std::vector< std::pair< vtkIdType, int > > &  reflectableArrays,
vtkDataSetAttributes inData,
vtkDataSetAttributes outData,
vtkIdType  i,
int  mirrorDir[3],
int  mirrorSymmetricTensorDir[6],
int  mirrorTensorDir[9],
vtkIdType  id 
)

Reflect the i-th tuple of each array in reflectableArrays.

Parameters
reflectableArraysVector of all the arrays that need to be reflected and their corresponding number of components.
inDataDataSetAttribute in which to get the actual arrays from their ids.
outDataDataSetAttribute in which to set the reflected arrays.
iIndex of the tuple that needs to be reflected in the input array.
mirrorDirMirror direction for 3-components arrays.
mirrorSymmetricTensorDirMirror direction for 6-components arrays.
mirrorTensorDirMirror direction for 9-components arrays.
idIndex of the reflected tuple in the output array.

◆ ReflectNon3DCellInternal()

vtkIdType vtkReflectionUtilities::ReflectNon3DCellInternal ( vtkDataSet input,
vtkUnstructuredGrid output,
vtkIdType  cellId,
vtkIdType  numInputPoints,
bool  copyInput 
)

Generate new, non-3D cell and return the generated cell id.

Parameters
inputInput dataset to be reflected.
outputOutput unstructured grid that is the reflection of the input and the input itself if copyInput is on.
cellIdId of the cell to be reflected.
numInputPointsNumber of points in the input dataset.
copyInput
See also
vtkAxisAlignedReflectionFilter::CopyInput.

◆ ProcessUnstructuredGrid()

void vtkReflectionUtilities::ProcessUnstructuredGrid ( vtkDataSet input,
vtkUnstructuredGrid output,
double  constant[3],
int  mirrorDir[3],
int  mirrorSymmetricTensorDir[6],
int  mirrorTensorDir[9],
bool  copyInput,
bool  reflectAllInputArrays,
vtkAlgorithm algorithm 
)

Generate the reflection of the input dataset as an unstructured grid.

Parameters
inputInput dataset to be reflected.
outputOutput unstructured grid that is the reflection of the input and the input itself if copyInput is on.
constantOffset depending on the chosen reflection plane.
mirrorDirMirror direction for 3-components arrays.
mirrorSymmetricTensorDirMirror direction for 6-components arrays.
mirrorTensorDirMirror direction for 9-components arrays.
copyInput
See also
vtkAxisAlignedReflectionFilter::CopyInput.
Parameters
reflectAllInputArrays
See also
vtkAxisAlignedReflectionFilter::ReflectAllInputArrays.
Parameters
algorithmAlgorithm object to CheckAbort during points and cells iterations.