src/links/place-types.jl
MEDYAN.num_directions
MEDYAN.Anchor
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 0Anchor(pos::SVector{3, Float64}): Creates an anchor at the given position with NaN directions and state 0Anchor(pos::SVector{3, Float64}, dirs::SVector{2, SVector{3, Float64}}): Creates an anchor at the given position with specified directions and state 0Anchor(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 coordinatesdirs::SVector{2, SVector{3, Float64}}: Two direction vectorsstate::Int64: State identifier for chemical reactions
MEDYAN.BallIdx
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 0BallIdx(idx::Int64): Creates a ball index pointing to the ball at positionidxin the context’s balls vector
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.