BodyAreaConstraint
class BodyAreaConstraint(val body: Body, var compliance: Double = 0.0, var iterations: Int = 1) : Constraint(source)
Represents a constraint that maintains a specified area for a deformable body.
This class ensures that the area defined by the body's boundary remains close to a target rest area during simulation. The constraint is solved iteratively and includes compliance to allow some flexibility in maintaining the target area.
Parameters
body
The deformable body whose area is constrained.
compliance
The compliance factor that governs the flexibility of the constraint. Higher values allow more deviation from the rest area.
iterations
The number of iterations for solving the constraint in each simulation step.