Epok Engine

EPOK RUNTIME

epok::nav::World::floor

Method · 1 overload

Method

Barycentric floor query in Q8; the closest reachable layer wins.

Belongs to
epok::nav::World
Header
navigation.hpp
Overloads
1

Declaration

const
Declaration
bool floor(int32_t x,int32_t z,int32_t near,int32_t reach,int32_t& y)const

Barycentric floor query in Q8; the closest reachable layer wins.

ParameterTypeMeaning
xint32_tValue supplied for x. Keep referenced or pointed-to data valid for the complete call.
zint32_tValue supplied for z. Keep referenced or pointed-to data valid for the complete call.
nearint32_tValue supplied for near. Keep referenced or pointed-to data valid for the complete call.
reachint32_tValue supplied for reach. Keep referenced or pointed-to data valid for the complete call.
yint32_t &Value supplied for y. 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 "navigation.hpp"

// Assume these named values have been initialized with valid data:
// int32_t x
// int32_t z
// int32_t near
// int32_t reach
// int32_t & y

epok::nav::World& object = /* obtain a valid instance */;

auto result = object.floor(x, z, near, reach, y);

Why use it

The method is `const`, so it does not mutate the object through this API surface. The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

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/navigation.hpp:84

Related members