Epok Engine

EPOK RUNTIME

epok::CollisionWorld2D::move_and_slide_2d

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

Axis-separated resolution: X is applied first and clipped against every blocking box whose Y span overlaps, then Y is applied against the updated position.

Belongs to
epok::CollisionWorld2D
Header
world2d.hpp
Overloads
1

Declaration

Declaration
MoveResult2D move_and_slide_2d(size_t index, const Fixed* displacement, uint32_t mask = 0xffffffffu)

Axis-separated resolution: X is applied first and clipped against every blocking box whose Y span overlaps, then Y is applied against the updated position.

ParameterTypeMeaning
indexsize_tNot documented; consult the linked header.
displacementconst Fixed *Not documented; consult the linked header.
maskuint32_tNot documented; consult the linked header.

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

Example sketch

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// size_t index
// const Fixed * displacement
// uint32_t mask

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

auto result = object.move_and_slide_2d(index, displacement, mask);

Trade-offs and warnings

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

Declared in runtime/world2d.hpp:582

Related members