MEDYAN.BallIdx
Union{}
An index referring to a ball (spherical particle) in the simulation. Balls are stored in the balls vector of the Context and represent spherical objects with position, radius, and stiffness that can participate in mechanical interactions and chemical reactions.
This index may be invalidated by ball removal or reordering. Use a Tag{BallIdx} for a long-term reference that remains valid across mutations.
Constructors
BallIdx(): Creates a null ball index with idx 0BallIdx(idx::Int64): Creates a ball index pointing to the ball at positionidxin the context’s balls vectorBallIdx(c::Context, idx::Integer): Construct from context with indexBallIdx(c::Context, b::BallIdx): Re-resolve a ball indexBallIdx(c::Context, t::Tag{BallIdx}): Construct from a tag
Fields
idx::Int64: Index of the ball in the context’sballsvector
Related Functions
See make_ball!, remove_ball!, and update_ball! for creating, removing, and modifying balls.