Epok Engine

EPOK RUNTIME

epok::world_to_screen

Function · 1 overload

Function

Performs `world to screen` as part of the world2d module.

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline void world_to_screen(const Camera2D& camera, const Fixed* world_xy, Fixed* screen_xy)

Performs `world to screen` as part of the world2d module.

ParameterTypeMeaning
cameraconst Camera2D &Value supplied for camera. Keep referenced or pointed-to data valid for the complete call.
world_xyconst Fixed *Value supplied for world_xy. Keep referenced or pointed-to data valid for the complete call.
screen_xyFixed *Value supplied for screen_xy. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// const Camera2D & camera
// const Fixed * world_xy
// Fixed * screen_xy

epok::world_to_screen(camera, world_xy, screen_xy);

Why use it

It provides direct, allocation-conscious access to the world2d module. No exception-based error path is implied by the signature.

Trade-offs and warnings

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/world2d.hpp:228

Related members