Epok Engine

EPOK RUNTIME

epok::FocusableComponent::neighbor

Method · 1 overload

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Method

Direction 0 left, 1 right, 2 up, 3 down; the value is an actor index into the scene's objects array, or -1 for no neighbour that way.

Belongs to
epok::FocusableComponent
Header
object_model.hpp
Overloads
1

Declaration

const
Declaration
int32_t neighbor(int dir) const

Direction 0 left, 1 right, 2 up, 3 down; the value is an actor index into the scene's objects array, or -1 for no neighbour that way.

ParameterTypeMeaning
dirintNot documented; consult the linked header.

Returns: int32_t. Consult the linked header for its meaning.

Example sketch

C++ example
#include "object_model.hpp"

// Assume these named values have been initialized with valid data:
// int dir

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

auto result = object.neighbor(dir);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in runtime/object_model.hpp:1008

Related members