Epok Engine

EPOK RUNTIME

epok::pick_2d

Function · 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.

Function

Topmost entry under a screen point (highest draw key wins; ties go to the lowest index, which keeps the result stable).

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline bool pick_2d(const Camera2D& camera, const Fixed* screen_xy, const Pick2DEntry* entries, size_t count, size_t& out_index)

Topmost entry under a screen point (highest draw key wins; ties go to the lowest index, which keeps the result stable).

ParameterTypeMeaning
cameraconst Camera2D &Not documented; consult the linked header.
screen_xyconst Fixed *Not documented; consult the linked header.
entriesconst Pick2DEntry *Not documented; consult the linked header.
countsize_tNot documented; consult the linked header.
out_indexsize_t &Not documented; consult the linked header.

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

Example sketch

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// const Camera2D & camera
// const Fixed * screen_xy
// const Pick2DEntry * entries
// size_t count
// size_t & out_index

auto result = epok::pick_2d(camera, screen_xy, entries, count, out_index);

Trade-offs and warnings

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

Declared in runtime/world2d.hpp:702

Related members