Struct Clip

Struct Documentation

struct Clip

Timeline replacing one original tileset target; frame cells are not recursively animated.

Public Functions

CE::Assets::Grids::CellIndex cell_at(std::chrono::milliseconds elapsed) const

Declaration: [[nodiscard]]

Resolve caller-owned simulation time into a replacement cell without mutating metadata.

See also

Detailed guide

Parameters:

elapsed – Nonnegative time since the clip’s application-defined origin, in milliseconds.

Throws:

CE::Exceptions::invalid_args – For negative time, empty/nonpositive frames or overflowing summed durations. Cell/grid bounds remain the caller’s contract; this operation creates no clock, resources or recursive animation lookup.

Returns:

Frame cell; exact boundaries select the next frame, looping wraps, nonlooping holds the last.

Public Members

std::string name

Owned descriptive clip name; the target cell selects the replacement timeline.

std::string description

Owned human-readable metadata, not an executable behavior or lookup key.

CE::Assets::Grids::CellIndex target = {}

Original static grid cell whose selection this timeline replaces.

std::vector<CE::Assets::Animation::TimedFrame> frames

Frames in playback order; valid clips are nonempty with positive durations.

bool loop = {}

True repeats the timeline; false holds the last frame/cell after completion.