SCNBox
A six-sided polyhedron geometry whose faces are all rectangles, optionally with rounded edges and corners.
Declaration
class SCNBoxOverview
[Image]
Define the shape of the box in the x-, y-, and z-axis dimensions of its local coordinate space by setting its width, height, and length properties. Add rounded edges and corners to a box with its chamferRadius property. To position and orient a box in a scene, attach it to the geometry property of an SCNNode object.
Control the level of detail with the widthSegmentCount, heightSegmentCount, lengthSegmentCount, and chamferSegmentCount properties. A higher segment count produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance.
You can assign up to six SCNMaterial instances to a box—one for each side—with its materials property. The SCNBox class automatically creates SCNGeometryElement objects as needed to handle the number of materials.