Header menu logo Mibo

DrawState Module

Internal helpers for managing DrawState.

Functions and values

Function or value Description

computeTransform state

Full Usage: computeTransform state

Parameters:
    state : DrawState - The draw state to compute the transform for.

Returns: Matrix A Matrix representing the full transformation.

Calculates the final world matrix by combining local Scale, Rotation, Position, and the Parent matrix.

state : DrawState

The draw state to compute the transform for.

Returns: Matrix

A Matrix representing the full transformation.

empty

Full Usage: empty

Returns: DrawState

The default starting state for a drawable: identity transform, default opaque material, and no mesh.

Returns: DrawState

toDrawable state

Full Usage: toDrawable state

Parameters:
    state : DrawState - The draw state to convert.

Returns: Drawable voption A configured Drawable instance or ValueNone.

Converts the accumulation state into a final Drawable. Returns ValueOption if no mesh has been assigned.

state : DrawState

The draw state to convert.

Returns: Drawable voption

A configured Drawable instance or ValueNone.

Type something to start searching.