Body
Represents a physical body in a simulation composed of nodes, links, and triangles.
A Body serves as the central structure in simulations, encapsulating physical properties, relationships, and behaviors of its constituent parts. It supports initialization, integration of forces, resolution of constraints, and updates to its boundaries. The body can either be static or dynamic, depending on the static property.
Constructors
Properties
the list of indices referring to links considered as boundary links.
the list of indices referring to nodes considered as boundary nodes.
the list of Constraints influencing the behavior and interaction of the body.
the list of Forces acting on the body in the simulation.
the reciprocal of the total mass of the body, used in weight calculations.
Functions
Adds a body area constraint to the body, ensuring that its area remains close to a target rest area during simulation. The constraint includes compliance and uses iterative solving to maintain this condition.
Adds a BoundaryNodeRelaxForce to the Body's list of forces. This force acts on the boundary nodes of the body to relax their positions by adjusting their velocities based on neighboring node positions.
Adds a gravitational force to the body and allows configuring its properties.
Applies a gravitational force to the body by adding it to the list of forces acting on the body.
Applies a circular constraint to the nodes of this Body.
Adds a node collision constraint to the body, configuring it using the provided lambda.
Applies a node contour constraint to the body and configures it using the provided configuration block.
Adds a rectangular boundary constraint to the body, ensuring that its nodes remain confined within a specified rectangular region during the simulation.
Adds a triangle area constraint to the body, ensuring that the areas of triangles in the body remain consistent with their initial (rest) areas during simulation.