本文整理汇总了C++中FCSPose::ConvertToLocalPoses方法的典型用法代码示例。如果您正苦于以下问题:C++ FCSPose::ConvertToLocalPoses方法的具体用法?C++ FCSPose::ConvertToLocalPoses怎么用?C++ FCSPose::ConvertToLocalPoses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FCSPose
的用法示例。
在下文中一共展示了FCSPose::ConvertToLocalPoses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NativeEvaluateAnimation
bool UAnimPreviewInstance::NativeEvaluateAnimation(FPoseContext& Output)
{
#if WITH_EDITORONLY_DATA
if(bForceRetargetBasePose)
{
USkeletalMeshComponent* MeshComponent = GetSkelMeshComponent();
if(MeshComponent && MeshComponent->SkeletalMesh)
{
FAnimationRuntime::FillWithRetargetBaseRefPose(Output.Pose, GetSkelMeshComponent()->SkeletalMesh);
}
else
{
// ideally we'll return just ref pose, but not sure if this will work with LODs
Output.Pose.ResetToRefPose();
}
}
else
#endif // #if WITH_EDITORONLY_DATA
{
Super::NativeEvaluateAnimation(Output);
}
if (bEnableControllers)
{
UDebugSkelMeshComponent* Component = Cast<UDebugSkelMeshComponent>(GetSkelMeshComponent());
if(Component && CurrentSkeleton)
{
// update curve controllers
UpdateCurveController();
// create bone controllers from
if(BoneControllers.Num() > 0 || CurveBoneControllers.Num() > 0)
{
FCompactPose PreController, PostController;
// if set key is true, we should save pre controller local space transform
// so that we can calculate the delta correctly
if(bSetKey)
{
PreController = Output.Pose;
}
FCSPose<FCompactPose> OutMeshPose;
OutMeshPose.InitPose(&RequiredBones);
// apply curve data first
ApplyBoneControllers(Component, CurveBoneControllers, OutMeshPose);
// and now apply bone controllers data
// it is possible they can be overlapping, but then bone controllers will overwrite
ApplyBoneControllers(Component, BoneControllers, OutMeshPose);
// convert back to local @todo check this
OutMeshPose.ConvertToLocalPoses(Output.Pose);
if(bSetKey)
{
// now we have post controller, and calculate delta now
PostController = Output.Pose;
SetKeyImplementation(PreController, PostController);
}
}
// if any other bone is selected, still go for set key even if nothing changed
else if(Component->BonesOfInterest.Num() > 0)
{
if(bSetKey)
{
// in this case, pose is same
SetKeyImplementation(Output.Pose, Output.Pose);
}
}
}
// we should unset here, just in case somebody clicks the key when it's not valid
if(bSetKey)
{
bSetKey = false;
}
}
return true;
}