<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKRTree/elements(inBoundingRectMin:rectMax:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRTree(im)elementsInBoundingRectMin:rectMax:"
  },
  "title" : "elements(inBoundingRectMin:rectMax:)"
}
-->

# elements(inBoundingRectMin:rectMax:)

Searches the tree and returns all elements found within the specified bounding region.

```
func elements(inBoundingRectMin rectMin: vector_float2, rectMax: vector_float2) -> [ElementType]
```

## Parameters

`rectMin`

The corner (with the lowest x- and y-coordinate values) of the bounding region to search.

`rectMax`

The corner (with the highest x- and y-coordinate values) of the bounding region to search.

## Return Value

An array of objects stored in the tree whose bounding regions overlap the specified region. The array is empty if no such objects are found.

## Discussion

---

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)