<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/IKRig/JointCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation5IKRigV15JointCollectionV"
  },
  "title" : "IKRig.JointCollection"
}
-->

# IKRig.JointCollection

Ordered dictionary-like container with a fixed size.

```
struct JointCollection
```

## Overview

Supports subscripting by index, element’s identifier or element’s name.

## Topics

### Instance Properties

[`var count: Int`](/documentation/RealityKit/IKRig/JointCollection/count)

The number of elements in the collection.

[`var isEmpty: Bool`](/documentation/RealityKit/IKRig/JointCollection/isEmpty)

A Boolean value indicating whether the collection is empty.

### Instance Methods

[`func contains(IKRig.JointCollection.Element.ID) -> Bool`](/documentation/RealityKit/IKRig/JointCollection/contains(_:))

Returns a Boolean value that indicates whether the collection contains an element with
a specific identifier.

[`func forEach(descendantOf: String, inclusive: Bool, update: (inout IKRig.JointCollection.Element) -> Void)`](/documentation/RealityKit/IKRig/JointCollection/forEach(descendantOf:inclusive:update:))

Calls the provided closure on each element in the hierarchy rooted at the named joint.

[`func set(IKRig.JointCollection.Element) -> IKRig.JointCollection.Element?`](/documentation/RealityKit/IKRig/JointCollection/set(_:))

Updates the element with identifier matching the provided value’s identifier.

### Subscripts

[`subscript(_:)`](/documentation/RealityKit/IKRig/JointCollection/subscript(_:))

Accesses the element with the specified identifier.

## Relationships

### Conforms To

[`Collection`](/documentation/Swift/Collection)

[`Sequence`](/documentation/Swift/Sequence)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)