← back to roto on ba3a.dev

FrameBoxes

@Serializable
data class FrameBoxes(val canvas: Canvas, val scaleX: List<Double>, val scaleY: List<Double>, val groundY: List<Int>, val centreX: List<Int>)

Where the project's canvas sits on each frame of a clip, in working-frame pixels.

Canvas and frame are tied at two places: the canvas's horizontal centre sits on the frame's centreX — the figure's root, so a walk across stays in the middle — and the bottom edge of the canvas's ground row sits on the bottom edge of the frame's groundY, the row the feet stand on, so the soles fill the ground row however the canvas is scaled. Between them one canvas pixel covers 1 / scaleX frame pixels across and 1 / scaleY down. All four vary by frame: for a walk across the frame only centreX does, for a walk toward or away from the camera the scale and the ground line do too.

Constructors

Link copied to clipboard
constructor(canvas: Canvas, scaleX: List<Double>, scaleY: List<Double>, groundY: List<Int>, centreX: List<Int>)

Properties

Link copied to clipboard

the project canvas being laid over the frames

Link copied to clipboard

for each frame, the working-frame column the canvas is centred on

Link copied to clipboard

for each frame, the working-frame row the feet stand on

Link copied to clipboard

for each frame, canvas pixels per frame pixel across

Link copied to clipboard

for each frame, canvas pixels per frame pixel down

Functions

Link copied to clipboard
fun frameX(frame: Int, canvasX: Double): Double

The frame x shown at canvas x canvasX in frame; both continuous, pixel n spanning n..n+1.

Link copied to clipboard
fun frameY(frame: Int, canvasY: Double): Double

The frame y shown at canvas y canvasY in frame.