SCNCapsule
public extension SCNCapsule
-
SwifterSwift: Creates a capsule geometry with the specified diameter and height.
Declaration
Swift
convenience init(capDiameter: CGFloat, height: CGFloat)
Parameters
capDiameter
The diameter both of the capsule’s cylindrical body and of its hemispherical ends.
height
The height of the capsule along the y-axis of its local coordinate space.
-
SwifterSwift: Creates a capsule geometry with the specified radius and height.
Declaration
Swift
convenience init(capRadius: CGFloat, height: CGFloat, material: SCNMaterial)
Parameters
capRadius
The radius both of the capsule’s cylindrical body and of its hemispherical ends.
height
The height of the capsule along the y-axis of its local coordinate space.
material
The material of the geometry.
-
SwifterSwift: Creates a capsule geometry with the specified diameter and height.
Declaration
Swift
convenience init(capDiameter: CGFloat, height: CGFloat, material: SCNMaterial)
Parameters
capDiameter
The diameter both of the capsule’s cylindrical body and of its hemispherical ends.
height
The height of the capsule along the y-axis of its local coordinate space.
material
The material of the geometry.
-
SwifterSwift: Creates a capsule geometry with the specified radius and height.
Declaration
Swift
convenience init(capRadius: CGFloat, height: CGFloat, color: Color)
Parameters
capRadius
The radius both of the capsule’s cylindrical body and of its hemispherical ends.
height
The height of the capsule along the y-axis of its local coordinate space.
material
The material of the geometry.
-
SwifterSwift: Creates a capsule geometry with the specified diameter and height.
Declaration
Swift
convenience init(capDiameter: CGFloat, height: CGFloat, color: Color)
Parameters
capDiameter
The diameter both of the capsule’s cylindrical body and of its hemispherical ends.
height
The height of the capsule along the y-axis of its local coordinate space.
material
The material of the geometry.