Epok Engine

PSYQO SDK

psyqo::SoftMath::project

Function · 1 overload

Function

Projects a 3D point onto a 2D plane.

Belongs to
psyqo::SoftMath
Header
soft-math.hh
Overloads
1

Declaration

Declaration
void project(const Vec3 *v, FixedPoint<> h, Vec2 *out)

Projects a 3D point onto a 2D plane.

ParameterTypeMeaning
vconst Vec3 *The vector to project.
hFixedPoint<>The height of the plane.
outVec2 *The vector to store the result in.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/soft-math.hh"

// Assume these named values have been initialized with valid data:
// const Vec3 * v
// FixedPoint<> h
// Vec2 * out

psyqo::SoftMath::project(v, h, out);

Why use it

Fixed-point inputs keep console behavior deterministic and avoid software floating-point work.

Trade-offs and warnings

Stay within the documented range and account for quantization before chaining several operations. 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 https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:244

Related members