---
title: lengthSegmentCount
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnpyramid/lengthsegmentcount
---

# lengthSegmentCount

The number of subdivisions in each face of the pyramid along its z-axis. Animatable.

## Declaration

```swift
var lengthSegmentCount: Int { get set }
```

## Discussion

Discussion A larger number of segments adds more vertex data to the geometry. Though each face of the pyramid is a flat plane, extra vertices can be useful for lighting or custom shader programs. Adding vertices increases rendering cost, so you should use the minimal segment count that produces your desired visual effect. The default segment count is 1. Setting this property’s value to a number less than 1 results in undefined behavior. You can animate changes to this property’s value. See Animating SceneKit Content.

## See Also

### Adjusting Geometric Detail

- [widthSegmentCount](scenekit/scnpyramid/widthsegmentcount.md)
- [heightSegmentCount](scenekit/scnpyramid/heightsegmentcount.md)
