Epok Engine

EPOK RUNTIME

epok::screen_area

Function · 1 overload

Function

Screen area sign in the GPU's coordinate system; zero for degenerate triangles.

Belongs to
epok
Header
polygon.hpp
Overloads
1

Declaration

Declaration
inline int32_t screen_area(const ProjectedVertex& a, const ProjectedVertex& b, const ProjectedVertex& c)

Screen area sign in the GPU's coordinate system; zero for degenerate triangles.

ParameterTypeMeaning
aconst ProjectedVertex &Value supplied for a. Keep referenced or pointed-to data valid for the complete call.
bconst ProjectedVertex &Value supplied for b. Keep referenced or pointed-to data valid for the complete call.
cconst ProjectedVertex &Value supplied for c. Keep referenced or pointed-to data valid for the complete call.

Returns: int32_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "polygon.hpp"

// Assume these named values have been initialized with valid data:
// const ProjectedVertex & a
// const ProjectedVertex & b
// const ProjectedVertex & c

auto result = epok::screen_area(a, b, c);

Why use it

It provides direct, allocation-conscious access to PSX polygon preparation, clipping and submission. 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/polygon.hpp:66

Related members