generatePlane(width:height:cornerRadius:)
Creates a new rectangle mesh with the specified dimensions in the entity’s xy-plane.
Declaration
@MainActor @preconcurrency static func generatePlane(width: Float, height: Float, cornerRadius: Float = 0) -> MeshResourceParameters
- width:
The width, in meters, of the rectangle along the x-axis.
- height:
The height, in meters, of the rectangle along the y-axis.
- cornerRadius:
A corner radius in the form of a circular arc, with curvature that transitions abruptly from
0to1/rat the boundary between the edge and the corner.
Return Value
The rectangle mesh.
Discussion
The rectangle is centered at the entity’s origin and aligned with its x and y axes. The surface normal points along the z-axis. The depth along the z-axis is 0.