Epok Engine

PSYQO SDK

psyqo::SoftMath::crossProductVec3

Function · 4 overloads

Function

Compute the cross product of two 3D vectors.

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

Declaration 1 of 4

Declaration
Vec3 crossProductVec3(const Vec3 &v1, const Vec3 &v2)

Compute the cross product of two 3D vectors.

ParameterTypeMeaning
v1const Vec3 &The first vector.
v2const Vec3 &The second vector.

Returns: Vec3 — Vec3 The cross product.

Example

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

// Assume these named values have been initialized with valid data:
// const Vec3 & v1
// const Vec3 & v2

auto result = psyqo::SoftMath::crossProductVec3(v1, v2);

Why use it

It provides direct, allocation-conscious access to the soft math 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 https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:160

Declaration 2 of 4

static
Declaration
static inline Vec3 crossProductVec3(const Vec3 *v1, const Vec3 *v2)

Performs `cross product vec3` as part of the soft math module.

ParameterTypeMeaning
v1const Vec3 *Value supplied for v1. Keep referenced or pointed-to data valid for the complete call.
v2const Vec3 *Value supplied for v2. Keep referenced or pointed-to data valid for the complete call.

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

Example

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

// Assume these named values have been initialized with valid data:
// const Vec3 * v1
// const Vec3 * v2

auto result = psyqo::SoftMath::crossProductVec3(v1, v2);

Why use it

It provides direct, allocation-conscious access to the soft math 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 https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:161

Declaration 3 of 4

static
Declaration
static inline void crossProductVec3(const Vec3 *v1, const Vec3 *v2, Vec3 *out)

Performs `cross product vec3` as part of the soft math module.

ParameterTypeMeaning
v1const Vec3 *Value supplied for v1. Keep referenced or pointed-to data valid for the complete call.
v2const Vec3 *Value supplied for v2. Keep referenced or pointed-to data valid for the complete call.
outVec3 *Value supplied for out. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

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

// Assume these named values have been initialized with valid data:
// const Vec3 * v1
// const Vec3 * v2
// Vec3 * out

psyqo::SoftMath::crossProductVec3(v1, v2, out);

Why use it

It provides direct, allocation-conscious access to the soft math 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 https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:148

Declaration 4 of 4

Declaration
void crossProductVec3(const Vec3 &v1, const Vec3 &v2, Vec3 *out)

Compute the cross product of two 3D vectors.

ParameterTypeMeaning
v1const Vec3 &The first vector.
v2const Vec3 &The second vector.
outVec3 *The vector to store the result in. May be the same as v1 or v2.

Returns: Nothing (void).

Example

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

// Assume these named values have been initialized with valid data:
// const Vec3 & v1
// const Vec3 & v2
// Vec3 * out

psyqo::SoftMath::crossProductVec3(v1, v2, out);

Why use it

It provides direct, allocation-conscious access to the soft math 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 https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:147

Related members