---
title: SCNCylinder
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scncylinder
---

# SCNCylinder

A right circular cylinder geometry.

## Declaration

```swift
class SCNCylinder
```

## Overview

Overview

A cylinder defines the surface of a solid whose every cross section along a linear axis is a circle of equal size. Define the size of the cylinder’s cross section in the x- and z-axis dimensions of its local coordinate space with the radius property, and its extent in the y-axis dimension with the height property. To position and orient a cylinder in a scene, attach it to the geometry property of an SCNNode object. Control the level of detail with the radialSegmentCount and heightSegmentCount properties. A higher radial segment count creates a smoother curve for the cylinder’s circular sides. A higher segment count in either direction produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance. A cylinder contains three SCNGeometryElement objects: one each for its base and top, and one that wraps around its sides. SceneKit can render each element using a different material. For details, see the materials property in SCNGeometry.

## Topics

### Creating a Cylinder

- [init(radius:height:)](scenekit/scncylinder/init(radius:height:).md)

### Adjusting a Cylinder’s Dimensions

- [radius](scenekit/scncylinder/radius.md)
- [height](scenekit/scncylinder/height.md)

### Adjusting Geometric Detail

- [radialSegmentCount](scenekit/scncylinder/radialsegmentcount.md)
- [heightSegmentCount](scenekit/scncylinder/heightsegmentcount.md)

## Relationships

### Inherits From

- [SCNGeometry](scenekit/scngeometry.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [SCNAnimatable](scenekit/scnanimatable.md)
- [SCNBoundingVolume](scenekit/scnboundingvolume.md)
- [SCNShadable](scenekit/scnshadable.md)

## See Also

### Basic Shapes

- [SCNFloor](scenekit/scnfloor.md)
- [SCNBox](scenekit/scnbox.md)
- [SCNCapsule](scenekit/scncapsule.md)
- [SCNCone](scenekit/scncone.md)
- [SCNPlane](scenekit/scnplane.md)
- [SCNPyramid](scenekit/scnpyramid.md)
- [SCNSphere](scenekit/scnsphere.md)
- [SCNTorus](scenekit/scntorus.md)
- [SCNTube](scenekit/scntube.md)
