src/links/place-types.jl

MEDYAN.num_directions

num_directions(::Union{Place, Type{<:Place}})::Int

Return the number of directions associated with a place.

MEDYAN.Anchor

Anchor <: Place

A position and directions fixed in the simulation frame. Useful for creating links to a point that doesn’t move with any dynamic elements.

Constructors

  • Anchor(): Creates a null anchor with NaN position, NaN directions, and state 0
  • Anchor(pos::SVector{3, Float64}): Creates an anchor at the given position with NaN directions and state 0
  • Anchor(pos::SVector{3, Float64}, dirs::SVector{2, SVector{3, Float64}}): Creates an anchor at the given position with specified directions and state 0
  • Anchor(pos::SVector{3, Float64}, dirs::SVector{2, SVector{3, Float64}}, state::Int64): Full constructor with position, directions, and state

Fields

  • pos::SVector{3, Float64}: 3D position coordinates
  • dirs::SVector{2, SVector{3, Float64}}: Two direction vectors
  • state::Int64: State identifier for chemical reactions

MEDYAN.BallIdx

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.

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

Fields

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