One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

IKRig

struct · iOS 18.0+ · SDK 27.1

struct IKRig

A full body inverse kinematics rig definition for a single skeleton. Describes the skeleton, its tuning, and the active constraints for the solver instance. ### Balance of demands' weights in a full body solver The full body solver calculates the final pose by balancing the various demands based on their assigned weights. This process ensures that each demand, ranging from forward kinematics (FK) demands to constraints on joint movement, affects the pose proportionally to its importance. The solver reads the FK demands from the ``SkeletalPosesComponent``. As such these demands are either a playing animation for the model, or just a static pose. All demands have an element specific weight, and some have a global rig weight. The rig weights influence the overall rig, while element weights adjust individual aspects of the model. The table below provides detailed mappings of these weights to their respective demand types. | Demand type | Rig weight | Element weight | | ---------------------------- | ----------------------------------------- | ------------------------------------------------------------- | | FK demands | ``globalFkWeight`` | ``Joint/fkWeightPerAxis`` | | Joint rotation limits | ``globalLimitsWeight`` | ``Joint/LimitsDefinition/weight`` | | Constraint position | Not applicable | ``Constraint/IKPositionDemand/weight`` | | Constraint orientation | Not applicable | ``Constraint/IKOrientationDemand/weight`` | - Note: While constraints do not have rig weight, they have blending weight between automatic and custom targets. See ``IKComponent/Constraint/animationOverrideWeight`` for more information.

Members (12)

get · iOS 18.0+

constraints

TypeScript
get constraints(): IKRig_ConstraintsCollection
Swift declaration
var constraints: IKRig.ConstraintsCollection

A collection of all of the rig's constraint settings.

set · iOS 18.0+

constraints

TypeScript
set constraints(value: IKRig_ConstraintsCollection)
Swift declaration
var constraints: IKRig.ConstraintsCollection

A collection of all of the rig's constraint settings.

get · iOS 18.0+

maxIterations

TypeScript
get maxIterations(): number
Swift declaration
var maxIterations: Int

The maximum number of iterations the solver is allowed to do per frame. If the pose satisfies all of the demands using less iterations, the solve stops early. - Note: Values of `0` or less, result in the constant output of the last solved pose.

set · iOS 18.0+

maxIterations

TypeScript
set maxIterations(value: number)
Swift declaration
var maxIterations: Int

The maximum number of iterations the solver is allowed to do per frame. If the pose satisfies all of the demands using less iterations, the solve stops early. - Note: Values of `0` or less, result in the constant output of the last solved pose.

get · iOS 18.0+

globalFkWeight

TypeScript
get globalFkWeight(): number
Swift declaration
var globalFkWeight: Float

The solver global weight for the forward kinematics demands. This weight is a multiplier for each joint's ``Joint/fkWeightPerAxis``. The recommended value range is the closed range `[0, 1]`, where `0` means no FK demands influence, and `1` is no rig level modification.

set · iOS 18.0+

globalFkWeight

TypeScript
set globalFkWeight(value: number)
Swift declaration
var globalFkWeight: Float

The solver global weight for the forward kinematics demands. This weight is a multiplier for each joint's ``Joint/fkWeightPerAxis``. The recommended value range is the closed range `[0, 1]`, where `0` means no FK demands influence, and `1` is no rig level modification.

get · iOS 18.0+

globalLimitsWeight

TypeScript
get globalLimitsWeight(): number
Swift declaration
var globalLimitsWeight: Float

The solver global weight for the joint rotation limits. This weight is a multiplier for each joint's ``Joint/LimitsDefinition/weight``. The recommended value range is the closed range `[0, 1]`, where `0` means no limits influence, and `1` is no rig level modification.

set · iOS 18.0+

globalLimitsWeight

TypeScript
set globalLimitsWeight(value: number)
Swift declaration
var globalLimitsWeight: Float

The solver global weight for the joint rotation limits. This weight is a multiplier for each joint's ``Joint/LimitsDefinition/weight``. The recommended value range is the closed range `[0, 1]`, where `0` means no limits influence, and `1` is no rig level modification.

init · iOS 18.0+

init

TypeScript
static initFor(skeleton: MeshResource_Skeleton): IKRig
Swift declaration
init(for skeleton: MeshResource.Skeleton) throws

Creates an inverse kinematics rig definition for the provided skeleton. - Parameter skeleton: The rig skeleton.

init · iOS 27.0+

init

TypeScript
static initNamedRootJoint(name: string, rootJoint: SkeletonResource_Joint): IKRig
Swift declaration
init(named name: String, rootJoint: SkeletonResource.Joint) throws

Creates an IK rig from a joint hierarchy. - Parameters: - name: The name to associate with the rig. - rootJoint: The root joint of the skeleton hierarchy to derive the rig from. - Throws: If the joint hierarchy contains invalid data.

get · iOS 18.0+

joints

TypeScript
get joints(): IKRig_JointCollection
Swift declaration
var joints: IKRig.JointCollection

A collection of all of the rig's joint settings.

set · iOS 18.0+

joints

TypeScript
set joints(value: IKRig_JointCollection)
Swift declaration
var joints: IKRig.JointCollection

A collection of all of the rig's joint settings.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →