UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimBoneDecompressionData.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "AnimEncoding.h"
6
7namespace UE::Anim
8{
9
10/*
11 * Struct containing the generated pairs to decompress a Pose, with the output atoms arranged in separate arrays
12 */
64
65} // end namespace UE::Anim
66
67/*
68* Helper macro to iterate two NON OVERLAPPING arrays/array views using restricted raw pointers
69* - ItFirstType and ItFirstMember refer to the first array type and variable. It will be accessed through It pointer (all pointers are incremented automatically)
70* - ItSecondType and ItSecondMember refer to the second array type variable. It can be accessed through ItRet pointer (all pointers are incremented automatically)
71* - ItNumElements is the number of elements that we want to process and that have to exist on BOTH arrays
72* Inside the Loop, we can use two pointers :
73* - ItFirst : Pointer to the element currently iterated on the first array
74* - ItSecond : Pointer to the element currently iterated on the second array
75*
76* Example of iteration over a FQuat array and writing values in a FTransform array
77* ITERATE_ATOMS_START(FQuat, DecompressionData.OutAtomRotations, FTransform, OutAtoms, NumTransforms)
78* ItSecond->SetRotation(*ItFirst);
79* ITERATE_ATOMS_END()
80*/
81#define ITERATE_NON_OVERLAPPING_ARRAYS_START(ItFirstType, ItFirstMember, ItSecondType, ItSecondMember, ItNumElements) \
82if (ItNumElements > 0) \
83{ \
84 check(ItFirstMember.Num() >= ItNumElements && ItSecondMember.Num() >= ItNumElements); \
85 const ItFirstType* RESTRICT ItFirst = ItFirstMember.GetData(); \
86 const ItFirstType* RESTRICT ItFirstEnd = ItFirst + ItNumElements; \
87 ItSecondType* RESTRICT ItSecond = ItSecondMember.GetData(); \
88 for (; ItFirst != ItFirstEnd; ++ItFirst, ++ItSecond) \
89 {
90
91#define ITERATE_NON_OVERLAPPING_ARRAYS_END() }}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ArrayView.h:139
Definition AnimationAsset.h:42
Definition AnimBoneDecompressionData.h:14
const BoneTrackArray & TranslationPairs
Definition AnimBoneDecompressionData.h:58
TArrayView< FVector > & GetOutAtomScales3D() const
Definition AnimBoneDecompressionData.h:50
const BoneTrackArray & GetScalePairs() const
Definition AnimBoneDecompressionData.h:37
const BoneTrackArray & GetRotationPairs() const
Definition AnimBoneDecompressionData.h:29
TArrayView< FVector > & OutAtomTranslations
Definition AnimBoneDecompressionData.h:61
const BoneTrackArray & GetTranslationPairs() const
Definition AnimBoneDecompressionData.h:33
TArrayView< FVector > & GetOutAtomTranslations() const
Definition AnimBoneDecompressionData.h:46
const BoneTrackArray & RotationPairs
Definition AnimBoneDecompressionData.h:57
const BoneTrackArray & ScalePairs
Definition AnimBoneDecompressionData.h:59
TArrayView< FQuat > & GetOutAtomRotations() const
Definition AnimBoneDecompressionData.h:42
FAnimPoseDecompressionData(const BoneTrackArray &InRotationPairs, const BoneTrackArray &InTranslationPairs, const BoneTrackArray &InScalePairs, TArrayView< FQuat > &InOutAtomRotations, TArrayView< FVector > &InOutAtomTranslations, TArrayView< FVector > &InOutAtomScales3D)
Definition AnimBoneDecompressionData.h:15
TArrayView< FVector > & OutAtomScales3D
Definition AnimBoneDecompressionData.h:62
TArrayView< FQuat > & OutAtomRotations
Definition AnimBoneDecompressionData.h:60