init(shape:density:)
Creates the mass properties for a solid shape with the specified density.
Declaration
@MainActor @preconcurrency init(shape: ShapeResource, density: Float)Parameters
- shape:
The shape for which to calculate the mass frame.
- density:
The density of the object in kilograms per cubic meter.