Skip to content

Commit

Permalink
document getFurnitureGroundFootprintById
Browse files Browse the repository at this point in the history
  • Loading branch information
tibotiber committed Apr 18, 2024
1 parent 8c038a1 commit a1aa026
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/api-reference/queryclient/furniture.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,43 @@ smplrClient.getFurnitureByIdFromCache({

where `spaceId`, `furnitureId`, and `Furniture` are as defined in `getFurnitureById`.

## getFurnitureGroundFootprintById

To get the ground footprint (as a polygon) of a single piece of furniture, identified by its unique identifier, you can call the following query.

```ts
smplrClient.getFurnitureGroundFootprintById({
spaceId: string,
furnitureId: string
}): Promise<{
levelIndex: number
x: number
z: number
}[] | null>
```

- `spaceId` - unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".
- `furnitureId` - unique identifier of the furniture in the space, has a similar format to `spaceId`.

Returns `null` if the furniture is not found in the space.

## getFurnitureGroundFootprintByIdFromCache

This is the synchronous equivalent of the query right above.

```ts
smplrClient.getFurnitureGroundFootprintByIdFromCache({
spaceId: string,
furnitureId: string
}): {
levelIndex: number
x: number
z: number
}[] | null
```

where `spaceId` and `furnitureId` are as defined in `getFurnitureGroundFootprintById`.

## isFurnitureInPolygon

To know whether a piece of furniture is contained within an area defined by a polygon, you can call the following query.
Expand Down

0 comments on commit a1aa026

Please sign in to comment.