---
title: "elements(inBoundingRectMin:rectMax:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkrtree/elements(inboundingrectmin:rectmax:)"
---

# elements(inBoundingRectMin:rectMax:)

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

## Declaration

```swift
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

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.

## See Also

### Searching for Elements

- [queryReserve](gameplaykit/gkrtree/queryreserve.md)
