Contents

SCNCapsule

A right circular cylinder geometry whose ends are capped with hemispheres.

Declaration

class SCNCapsule

Overview

[Image]

Define the size of the two hemispheres forming the ends of a capsule with the capRadius property. Because the cylindrical body of the capsule stretches between the its two hemispherical ends, its circular cross section in the x- and z-axis dimensions has the same radius. Define the capsule’s extent in the z-axis dimension of its local coordinate space with the height property. To change the orientation of a capsule, adjust the transform property of the node containing the capsule geometry.

Control the level of detail with the heightSegmentCount, capSegmentCount, and height properties. Higher radial and cap segment counts create smoother curves for the cylinder’s circular sides and hemispherical ends. A higher segment count in any direction produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance.

Topics

Creating a Capsule

Adjusting a Capsule’s Dimensions

Adjusting Geometric Detail

See Also

Basic Shapes