MEDYAN.BallIdx

Union{}

BallIdx <: Place

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 0
  • BallIdx(idx::Int64): Creates a ball index pointing to the ball at position idx in the context’s balls vector
  • BallIdx(c::Context, idx::Integer): Construct from context with index
  • BallIdx(c::Context, b::BallIdx): Re-resolve a ball index
  • BallIdx(c::Context, t::Tag{BallIdx}): Construct from a tag

Fields

  • idx::Int64: Index of the ball in the context’s balls vector