Type Method

tubeWithInnerRadius:outerRadius:height:

Creates a tube geometry with the specified inner radius, outer radius, and height.

Declaration

+ (instancetype)tubeWithInnerRadius:(CGFloat)innerRadius outerRadius:(CGFloat)outerRadius height:(CGFloat)height;

Parameters

innerRadius

The radius of the tube’s circular central hole in the x- and z-axes of its local coordinate space.

outerRadius

The radius of the tube’s circular cross section in the x- and z-axes of its local coordinate space.

height

The height of the tube along the y-axis of its local coordinate space.

Return Value

A new tube geometry.

Discussion

The tube is centered in its local coordinate system. For example, if you create a tube whose outer radius is 5.0, inner radius is 1.0, and height is 10.0, its circular cross section extends from -5.0 to 5.0 along the x- and z-axes, the y-coordinates of its base and top are -5.0 and 5.0, and the hole through its center extends from -0.5 to 0.5 along the x- and z-axes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software