Navigation
API > API/Plugins > API/Plugins/IKRig
The runtime for an IKRig to convert an input pose into a solved output pose given a set of IK Rig Goals:
Create an FIKRigProcessor in your animation system (ie anim node)
Initialize() with an IKRigDefinition asset
each tick, call SetIKGoal() and SetInputPoseGlobal()
Call Solve()
Copy output transforms with GetOutputPoseGlobal()
| Name | FIKRigProcessor |
| Type | struct |
| Header File | /Engine/Plugins/Animation/IKRig/Source/IKRig/Public/Rig/IKRigProcessor.h |
| Include Path | #include "Rig/IKRigProcessor.h" |
Syntax
struct FIKRigProcessor
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Log | FIKRigLogger | Logging system | Rig/IKRigProcessor.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInitialized | bool | True if processor is currently initialized and ready to run | Rig/IKRigProcessor.h | |
| bTriedToInitialize | bool | True if processor attempted an initialization but failed (prevents infinite reinit) | Rig/IKRigProcessor.h | |
| GoalBones | TMap< FName, FGoalBone > | Map of goal names to bone names/indices | Rig/IKRigProcessor.h | |
| GoalContainer | FIKRigGoalContainer | The named transforms that solvers use as end effectors | Rig/IKRigProcessor.h | |
| Skeleton | FIKRigSkeleton | Storage for hierarchy and bone transforms | Rig/IKRigProcessor.h | |
| Solvers | TArray< FInstancedStruct > | The stack of solvers to run in order | Rig/IKRigProcessor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyGoalsFromOtherContainer
(
const FIKRigGoalContainer& InGoalContainer |
Assign an entire container of goals to the rig. | Rig/IKRigProcessor.h | |
void CopyAllSettingsFromAsset
(
const UIKRigDefinition* SourceAsset |
Used to propagate setting values from the source asset at runtime (settings that do not require re-initialization) This allows the user to edit their IK Rig asset and see the effects in PIE. | Rig/IKRigProcessor.h | |
| Get the bone associated with a goal | Rig/IKRigProcessor.h | ||
const FIKRigGoalContainer & GetGoalContainer() |
END UPDATE SEQUENCE FUNCTIONS Get access to the internal goal data (read only) | Rig/IKRigProcessor.h | |
void GetOutputPoseGlobal
(
TArray< FTransform >& OutputPoseGlobal |
Get the results after calling Solve() | Rig/IKRigProcessor.h | |
const FIKRigSkeleton & GetSkeleton() |
Get read-only access to the internal skeleton data | Rig/IKRigProcessor.h | |
FIKRigSkeleton & GetSkeletonWriteable() |
Get read/write access to the internal skeleton data | Rig/IKRigProcessor.h | |
const FIKRigSolverBase * GetSolver
(
const int32 InSolverIndex |
Get read-only access to a currently running solver | Rig/IKRigProcessor.h | |
void Initialize
(
const UIKRigDefinition* InRigAsset, |
Setup a new processor to run the given IKRig asset NOTE!! this function creates new UObjects and consequently MUST be called from the main thread!! | Rig/IKRigProcessor.h | |
bool IsInitialized() |
Return true if the processor is initialized with a rig and ready to run | Rig/IKRigProcessor.h | |
void Reset() |
Reset all internal data structures. Will require re-initialization before solving again. | Rig/IKRigProcessor.h | |
void SetIKGoal
(
const FIKRigGoal& Goal |
Set a named IK goal to go to a specific location, rotation and space, blended by separate position/rotation alpha (0-1) | Rig/IKRigProcessor.h | |
void SetIKGoal
(
const UIKRigEffectorGoal* Goal |
Set a named IK goal to go to a specific location, rotation and space, blended by separate position/rotation alpha (0-1) | Rig/IKRigProcessor.h | |
void SetInputPoseGlobal
(
const TArray< FTransform >& InGlobalBoneTransforms |
BEGIN UPDATE SEQUENCE FUNCTIONS | Rig/IKRigProcessor.h | |
void SetInputPoseToRefPose() |
Optionally can be called before Solve() to use the reference pose as start pose | Rig/IKRigProcessor.h | |
void SetNeedsInitialized() |
Force the processor to reinitialize | Rig/IKRigProcessor.h | |
void Solve
(
const FTransform& WorldToComponent |
Run entire stack of solvers. | Rig/IKRigProcessor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsIKRigCompatibleWithSkeleton
(
const UIKRigDefinition* InRigAsset, |
Used to determine if the IK Rig asset is compatible with a given skeleton. | Rig/IKRigProcessor.h |