---
title: "hasParent"
description: "Verifies the direct parent of a 3D semantic node."
type: "function"
lastmod: "2026-06-18T10:32:52.441340Z"
---
## API Reference

### hasParent

> Source set: Android

```kotlin
public fun hasParent(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies the direct parent of a 3D semantic node.

This is indispensable for nested spatial compositions, such as a `PlanarEmbeddedSubspace`
composed inside a `SpatialPanel`, to confirm exact container anchoring.

#### Parameters

| | |
| --- | --- |
| matcher | The semantic check to evaluate against the parent node. |

#### Returns

| | |
| --- | --- |
|  | a matcher validating the parent's properties. |
