Epok Engine

EPOK RUNTIME

epok::load_geometry_matrix

Function template · 1 overload

Function template

Use MAC1..3, not the saturated 16-bit IR registers: the existing renderer's Q12 camera coordinates regularly exceed +/-8 world units.

Belongs to
epok
Header
gte_geometry.hpp
Overloads
1

Declaration

template
Declaration
template<class Number> bool load_geometry_matrix(const Affine<Number>& m)

Use MAC1..3, not the saturated 16-bit IR registers: the existing renderer's Q12 camera coordinates regularly exceed +/-8 world units.

ParameterTypeMeaning
mconst Affine<Number> &Value supplied for m. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "gte_geometry.hpp"

// Replace these template arguments with types or values accepted by the declaration:
// Number

// Assume these named values have been initialized with valid data:
// const Affine<Number> & m

auto result = epok::load_geometry_matrix<Number>(m);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection. The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Check the return value; `false` is part of normal control flow for many PSX resource operations. 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/gte_geometry.hpp:10

Related members