---
title: "setIntersectionFunctionTables(_:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlargumentencoder/setintersectionfunctiontables(_:range:)"
---

# setIntersectionFunctionTables(_:range:)

Encodes references to an array of ray-tracing intersection-function tables into the argument buffer.

## Declaration

```swift
func setIntersectionFunctionTables(_ intersectionFunctionTables: [(any MTLIntersectionFunctionTable)?], range: Range<Int>)
```

## Parameters

- `intersectionFunctionTables`: An array of intersection-function tables the method encodes.
- `range`: A range of indices within the argument buffer for each element in intersectionFunctionTables. The values correspond to either the index IDs of declarations in Metal Shading Language (MSL) or the doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor/index property of doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor instances.

## See Also

### Encoding function tables

- [setVisibleFunctionTable(_:index:)](metal/mtlargumentencoder/setvisiblefunctiontable(_:index:).md)
- [setIntersectionFunctionTable(_:index:)](metal/mtlargumentencoder/setintersectionfunctiontable(_:index:).md)
- [setVisibleFunctionTables(_:range:)](metal/mtlargumentencoder/setvisiblefunctiontables(_:range:).md)
