Epok Engine

EPOK RUNTIME

epok::local_matrix

Function · 1 overload

Function

Local matrix of a Transform2D: translate * rotate * scale, applied in that order to a point (scale first, then rotation, then translation).

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline Affine2D local_matrix(const Transform2D& transform)

Local matrix of a Transform2D: translate * rotate * scale, applied in that order to a point (scale first, then rotation, then translation).

ParameterTypeMeaning
transformconst Transform2D &Value supplied for transform. Keep referenced or pointed-to data valid for the complete call.

Returns: Affine2D. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// const Transform2D & transform

auto result = epok::local_matrix(transform);

Why use it

It provides direct, allocation-conscious access to the world2d module. No exception-based error path is implied by the signature.

Trade-offs and warnings

Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/world2d.hpp:167

Related members