Files
UnrealEngineUWP/Engine/Source/Runtime/AnimationCore/Public/CCDIK.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

51 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "BoneIndices.h"
#include "CCDIK.generated.h"
/** Transient structure for CCDIK node evaluation */
USTRUCT()
struct FCCDIKChainLink
{
GENERATED_USTRUCT_BODY()
public:
/** Transform of bone in component space. */
FTransform Transform;
/** Transform of bone in local space. This is mutable as their component space changes or parents*/
FTransform LocalTransform;
/** Transform Index that this control will output */
int32 TransformIndex;
/** Child bones which are overlapping this bone.
* They have a zero length distance, so they will inherit this bone's transformation. */
TArray<int32> ChildZeroLengthTransformIndices;
float CurrentAngleDelta;
FCCDIKChainLink()
: TransformIndex(INDEX_NONE)
, CurrentAngleDelta(0.f)
{
}
FCCDIKChainLink(const FTransform& InTransform, const FTransform& InLocalTransform, const int32& InTransformIndex)
: Transform(InTransform)
, LocalTransform(InLocalTransform)
, TransformIndex(InTransformIndex)
, CurrentAngleDelta(0.f)
{
}
};
namespace AnimationCore
{
ANIMATIONCORE_API bool SolveCCDIK(TArray<FCCDIKChainLink>& InOutChain, const FVector& TargetPosition, float Precision, int32 MaxIteration, bool bStartFromTail, bool bEnableRotationLimit, const TArray<float>& RotationLimitPerJoints);
};