SCNBox
public extension SCNBox
-
SwifterSwift: Creates a box geometry with the specified width, height, and length.
Declaration
Swift
convenience init(width: CGFloat, height: CGFloat, length: CGFloat)
Parameters
width
The width of the box along the x-axis of its local coordinate space.
height
The height of the box along the y-axis of its local coordinate space.
length
The length of the box along the z-axis of its local coordinate space.
-
SwifterSwift: Creates a cube geometry with the specified side length, and chamfer radius.
Declaration
Swift
convenience init(sideLength: CGFloat, chamferRadius: CGFloat = 0)
Parameters
sideLength
The width, height, and length of the box in its local coordinate space.
chamferRadius
The radius of curvature for the edges and corners of the box.
-
SwifterSwift: Creates a box geometry with the specified width, height, length, chamfer radius, and material.
Declaration
Swift
convenience init(width: CGFloat, height: CGFloat, length: CGFloat, chamferRadius: CGFloat = 0, material: SCNMaterial)
Parameters
width
The width of the box along the x-axis of its local coordinate space.
height
The height of the box along the y-axis of its local coordinate space.
length
The length of the box along the z-axis of its local coordinate space.
chamferRadius
The radius of curvature for the edges and corners of the box.
material
The material of the geometry.
-
SwifterSwift: Creates a cube geometry with the specified side length, chamfer radius, and material.
Declaration
Swift
convenience init(sideLength: CGFloat, chamferRadius: CGFloat = 0, material: SCNMaterial)
Parameters
sideLength
The width, height, and length of the box in its local coordinate space.
chamferRadius
The radius of curvature for the edges and corners of the box.
material
The material of the geometry.
-
SwifterSwift: Creates a box geometry with the specified width, height, length, chamfer radius, and material color.
Declaration
Swift
convenience init(width: CGFloat, height: CGFloat, length: CGFloat, chamferRadius: CGFloat = 0, color: Color)
Parameters
width
The width of the box along the x-axis of its local coordinate space.
height
The height of the box along the y-axis of its local coordinate space.
length
The length of the box along the z-axis of its local coordinate space.
chamferRadius
The radius of curvature for the edges and corners of the box.
color
The color of the geometry’s material.
-
SwifterSwift: Creates a cube geometry with the specified side length, chamfer radius, and material color.
Declaration
Swift
convenience init(sideLength: CGFloat, chamferRadius: CGFloat = 0, color: Color)
Parameters
sideLength
The width, height, and length of the box in its local coordinate space.
chamferRadius
The radius of curvature for the edges and corners of the box.
color
The color of the geometry’s material.