本文整理汇总了C++中FTransform::AccumulateWithShortestRotation方法的典型用法代码示例。如果您正苦于以下问题:C++ FTransform::AccumulateWithShortestRotation方法的具体用法?C++ FTransform::AccumulateWithShortestRotation怎么用?C++ FTransform::AccumulateWithShortestRotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FTransform
的用法示例。
在下文中一共展示了FTransform::AccumulateWithShortestRotation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LerpBoneTransforms
void FAnimationRuntime::LerpBoneTransforms(TArray<FTransform> & A, const TArray<FTransform> & B, float Alpha, const TArray<FBoneIndexType> & RequiredBonesArray)
{
if( Alpha >= (1.f - ZERO_ANIMWEIGHT_THRESH) )
{
A = B;
}
else if( Alpha > ZERO_ANIMWEIGHT_THRESH )
{
FTransform* ATransformData = A.GetData();
const FTransform* BTransformData = B.GetData();
const ScalarRegister VAlpha(Alpha);
const ScalarRegister VOneMinusAlpha(1.f - Alpha);
for (int32 Index=0; Index<RequiredBonesArray.Num(); Index++)
{
const int32& BoneIndex = RequiredBonesArray[Index];
FTransform* TA = ATransformData + BoneIndex;
const FTransform* TB = BTransformData + BoneIndex;
*TA *= VOneMinusAlpha;
TA->AccumulateWithShortestRotation(*TB, VAlpha);
TA->NormalizeRotation();
// TA->BlendWith(*TB, Alpha);
}
}
}
示例2: VBlendWeight
void BlendTransform<ETransformBlendMode::Accumulate>(const FTransform& Source, FTransform& Dest, const float BlendWeight)
{
const ScalarRegister VBlendWeight(BlendWeight);
Dest.AccumulateWithShortestRotation(Source, VBlendWeight);
}