---
title: SCNTorus
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scntorus
---

# SCNTorus

A torus, or ring-shaped geometry.

## Declaration

```swift
class SCNTorus
```

## Overview

Overview

A torus is mathematically defined as a surface of revolution formed by revolving a circle around a coplanar axis. It is the product of two circles: a large ring and a pipe that encircles the ring. SceneKit uses these terms to define the dimensions of a torus geometry in its local coordinate space. The torus’ ringRadius property defines a circle in the x- and z-axis dimensions, centered at the origin, and its pipeRadius property defines the width of the surface encircling the ring. To change the orientation of a torus, adjust the transform property of the node containing the torus geometry. Control the level of detail with the ringSegmentCount and pipeSegmentCount properties. Higher segment counts produce more vertices and a more smoothly curved surface, which can improve rendering quality at a cost to rendering performance.

## Topics

### Creating a Torus

- [init(ringRadius:pipeRadius:)](scenekit/scntorus/init(ringradius:piperadius:).md)

### Adjusting a Torus’ Dimensions

- [ringRadius](scenekit/scntorus/ringradius.md)
- [pipeRadius](scenekit/scntorus/piperadius.md)

### Configuring Torus Properties

- [ringSegmentCount](scenekit/scntorus/ringsegmentcount.md)
- [pipeSegmentCount](scenekit/scntorus/pipesegmentcount.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)
- [SCNCylinder](scenekit/scncylinder.md)
- [SCNPlane](scenekit/scnplane.md)
- [SCNPyramid](scenekit/scnpyramid.md)
- [SCNSphere](scenekit/scnsphere.md)
- [SCNTube](scenekit/scntube.md)
