The index of the current local matrix in the matrix store.
The index of the current world matrix in the matrix store.
The underlying store for matrices.
Buffer used during hierarchy traversal updates.
Internal stack maintaining structural information.
The current step or depth in the transformation hierarchy.
Records actions (push/pop) taken during the traversal.
Records the parent world matrix for each step (used by updateMatrix).
Records the world matrices generated at each step.
Extracts the global position (translation) from the current world matrix.
An object containing x and y global coordinates.
Extracts the global rotation (in radians) from the current world matrix.
The global rotation in radians.
Extracts the global scale from the current world matrix.
An object containing x and y global scale factors.
Sets the current local and world matrices to the identity matrix.
Transforms a point from local coordinates to world coordinates. Uses the current world matrix to apply the transformation.
Local x coordinate.
Local y coordinate.
The transformed point in world coordinates.
Resets the entire stack state context, clearing matrices and step actions.
Restores the matrix state from the top of the stack. Equivalent to context.restore().
Rotates the current local and world matrices by the given radians.
The rotation angle in radians.
Rotates the current local and world matrices around a pivot point
that is offset from the matrix origin by (offsetX, offsetY).
This is a convenience wrapper around the common translate → rotate → translate-back pattern, avoiding manual coordinate juggling at the call site.
The rotation angle in radians.
The x component of the pivot point in local space.
The y component of the pivot point in local space.
Saves the current matrix state and pushes it onto the stack. Equivalent to context.save().
The current step counter before saving.
Scales the current local and world matrices by scaleX and scaleY.
Scaling factor along the x-axis.
Scaling factor along the y-axis.
Translates the current local and world matrices by x and y.
Translation along the x-axis.
Translation along the y-axis.
Evaluates and updates matrices from the given step. Used primarily for deferred transformation.
The initial step to update matrices from.
Transforms a point from world coordinates to local coordinates. Useful for hit testing against objects placed in world space.
World x coordinate.
World y coordinate.
The transformed point in local coordinates.
A highly performant MatrixStack useful for hierarchal scene graphs. Handles both local and world transformations automatically.