generatePlane(width:depth:cornerRadius:)
Creates a new rectangle mesh with the specified dimensions in the entity’s xz-plane.
Declaration
@MainActor @preconcurrency static func generatePlane(width: Float, depth: Float, cornerRadius: Float = 0) -> MeshResourceParameters
- width:
The width, in meters, of the rectangle along the x-axis.
- depth:
The depth, in meters, of the rectangle along the z-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 y-axis. The depth along the y-axis is 0.