Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Functions

NameDescription
Abs(v128Param)

Returns a vector with the Abs function applied to all 4 elements.

EqualWithinEpsilon(v128Param, v128Param, v128Param)

Returns true if all elements of a and b are within g_VecEpsilon of each other.

GetV128FromString(const C *)

Parses a v128 from the given string.

GetV128FromStringXYZ(const C *, float)

Parses a v128 from the given string, ignoring the W-component and instead setting it to the given value.

IsFinite(v128Param)

Returns true if all of the 4 elements of v are finite.

IsNan(v128Param)

Returns true if any of the 4 elements of v are NANs.

Lerp(v128Param, v128Param, v128Param)

Linearly interpolated between the corresponding components of a and b.

Max(const v128 &, const v128 &)

Returns a vector where each element has the maximum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.

Min(const v128 &, const v128 &)

Returns a vector where each element has the minimum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.

operator-(Geo::v128Param, Geo::v128Param)

Operator - (component-wise subtraction)

operator-(Geo::v128Param)

The unary - operator. Equivalent to (VZero() - v);.

operator*(Geo::v128Param, Geo::v128Param)

Operator * (component-wise multiplication)

operator*=(Geo::v128 &, Geo::v128Param)

Inplace *.

operator/(Geo::v128Param, Geo::v128Param)

Operator / (component-wise division)

operator/=(Geo::v128 &, Geo::v128Param)

Inplace /.

operator+(Geo::v128Param, Geo::v128Param)

Operator + (component-wise addition)

operator+(Geo::v128Param)

The unary + operator (effectively a no-op)

operator+=(Geo::v128 &, Geo::v128Param)

Inplace +.

operator-=(Geo::v128 &, Geo::v128Param)

Inplace -.

V128ToUtf8String(const Geo::v128 &)

Creates a GeoString representation of the vector (space-separated).

V128ToUtf8StringXYZ(const Geo::v128 &)

Creates a GeoString representation of the vector (space-separated).

VBroadcast(float)

Construct a v128 by broadcasting a float into all elements.

VBroadcastInt(s32)

Construct a v128 by converting an integer to a float and broadcasting it into all elements.

VCeil(v128Param)

Return ceil(v).

VCompareEquals(v128Param, v128Param)

Compares all corresponding elements to see if a == b (exact equals).

VCompareGE(v128Param, v128Param)

Compares all corresponding elements to see if a >= b.

VCompareGT(v128Param, v128Param)

Compares all corresponding elements to see if a > b.

VCompareIsFinite(v128Param)

Tests all elements of v to see if they are finite or not.

VCompareIsNan(v128Param)

Tests all elements of v to see if any of them are NANs.

VCompareLE(v128Param, v128Param)

Compares all corresponding elements to see if a <= b.

VCompareLT(v128Param, v128Param)

Compares all corresponding elements to see if a < b.

VCompareWithFlagsEquals(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a == b (exact equals).

VCompareWithFlagsGE(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a >= b.

VCompareWithFlagsGT(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a > b.

VCompareWithFlagsLE(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a <= b.

VCompareWithFlagsLT(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a < b.

VConstruct(float, float, float, float)

Construct a v128 from 4 floats. Fairly slow.

VConstructBitwise(u32, u32, u32, u32)

Re-intreprets 4 ints as floats and construct a vector from them.

VCross3(v128Param, v128Param)

Cross the first 3 elements of each.

VCross3ZeroW(v128Param, v128Param)

Cross the first 3 elements of each.

VFrac(Geo::v128Param)

Returns the fractional part of each element of v.

VGetMaskNotSignBit()

Returns a mask with everything but the 4 sign bits set.

VGetMaskSignBit()

Returns a mask with just the 4 sign bits set.

VLoadAligned(const float *)

Load a 4-float array from 16-byte aligned memory.

VLoadUnaligned(const float *)

Load a 4-float array from arbitrarily aligned memory. Cannot be null.

VMadd(Geo::v128Param, Geo::v128Param, Geo::v128Param)

This is a vector multiply accumulate operation returning (a * b) + c.

VNegate(v128Param)

Return -v. You can use the operator overload instead if you prefer.

VOpAnd(Geo::v128Param, Geo::v128Param)

This is a bitwise & operation.

VOpOnesCompl(Geo::v128Param)

This is a bitwise ~ operation.

VOpOr(Geo::v128Param, Geo::v128Param)

This is a bitwise | operation.

VOpXor(Geo::v128Param, Geo::v128Param)

This is a bitwise ^ operation.

VPackX4(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Packs the X component from each of the four vectors into a single vector.

VPerpendicular(v128Param, float)

Returns a vector perpendicular to v (with one of its components being zero).

VRecip(v128Param)

Return 1.f / v. (inaccurate)

VRecipFast(v128Param)

Return 1.f / v. (fast approximate where available. If not, implemented as VRecip)

VRecipSqrt(v128Param)

Return 1.f / sqrt(v). (inaccurate)

VRecipSqrtFast(v128Param)

Return 1.f / sqrt(v). (inaccurate)

VReverse(v128Param)

Reverses the order of the components from xyzw to wzyx.

VShuffle(v128Param, int, int, int, int)

Returns the specified permutation of the parameter vector. Any permutation is valid.

VSqrt(v128Param)

Return sqrt(v). (more inaccurate than the reciprocal version on non-sse hardware)

VTestFlagsAllFalse(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsAllTrue(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsSomeFalse(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsSomeTrue(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VZero()

A fully-zeroed out vector.

Variables

NameDescription
const v128 g_VecEpsilon = VBroadcast(0.001f)

This has the value of g_VecEpsilonF broadcast into all elements.

const float g_VecEpsilonF = 0.001f

A general epsilon for use with the IsUnitLength function.

const u32 g_VecMaskFalse = 0x00000000

A mask value of 'false' = 0x00000000.

const u32 g_VecMaskTrue = 0xffffffff

A mask value of 'true' = 0xffffffff.

const v128 g_VecNormaliseEpsilon = VBroadcast(1e-35f)

An internal epsilon used inside the vector normalisation functions.

const Geo::v128 g_VFours

Some common useful constants.

const Geo::v128 g_VHalves

Some common useful constants.

const Geo::v128 g_VMinusOnes

Some common useful constants.

const Geo::v128 g_VMinusOneTwoEights

Some common useful constants.

const Geo::v128 g_VOneOverOneTwoSevens

Some common useful constants.

const Geo::v128 g_VOneOverPi

Some common useful constants.

const Geo::v128 g_VOneOverTwoFives

Some common useful constants.

const Geo::v128 g_VOneOverTwoPi

Some common useful constants.

const Geo::v128 g_VOnes

Some common useful constants.

const Geo::v128 g_VOneTwoSevens

Some common useful constants.

const Geo::v128 g_VPi

Some common useful constants.

const Geo::v128 g_VQuarters

Some common useful constants.

const Geo::v128 g_VThirds

Some common useful constants.

const Geo::v128 g_VThrees

Some common useful constants.

const Geo::v128 g_VTwoFiveFives

Some common useful constants.

const Geo::v128 g_VTwos

Some common useful constants.

const Geo::v128 g_VZero

Some common useful constants.

Enums

NameDescription
eVShufflePosition

Shuffle constants for the GEO_VSHUFFLE macro.

Defines

NameDescription
GEO_VSHUFFLE VShuffle(v, x, y, z, w)

Returns the specified permutation of the parameter vector.


Anchor
aa23b27b0037a4a802b0251ffbda52393
aa23b27b0037a4a802b0251ffbda52393

GEO_FORCE_INLINE v128 Geo::Abs

...

public: v128 Abs
(
    v128Param a
)

...

Returns a vector with the Abs function applied to all 4 elements.


Anchor
aced10c7bffaa9ef43ed312e485f326ec
aced10c7bffaa9ef43ed312e485f326ec

bool Geo::EqualWithinEpsilon

...

public: bool EqualWithinEpsilon
(
    v128Param a,
    v128Param b,
    v128Param epsilon
)

...

Returns true if all elements of a and b are within g_VecEpsilon of each other.

You may specify an epsilon vector that contains different epsilon values in each element if you wish.


Anchor
a4f01d86d4a2aea6f0c2c6a9dfca2266f
a4f01d86d4a2aea6f0c2c6a9dfca2266f

Geo::v128 GEO_CALL Geo::GetV128FromString

...

public: Geo::v128GEO_CALL GetV128FromString
(
    const C * str
)

...

Parses a v128 from the given string.


Anchor
ace24a26f8f34bee94c02ed18fb5d8db1
ace24a26f8f34bee94c02ed18fb5d8db1

Geo::v128 GEO_CALL Geo::GetV128FromStringXYZ

...

public: Geo::v128GEO_CALL GetV128FromStringXYZ
(
    const C * str,
    float w
)

...

Parses a v128 from the given string, ignoring the W-component and instead setting it to the given value.


Anchor
ac0940247bb765f15cab9e26862b743e5
ac0940247bb765f15cab9e26862b743e5

bool Geo::IsFinite

...

public: bool IsFinite
(
    v128Param v
)

...

Returns true if all of the 4 elements of v are finite.

TODO - this function doesn't detect INFs yet!


Anchor
a884ebeb0960ac93a9cf91f1b23797a59
a884ebeb0960ac93a9cf91f1b23797a59

bool Geo::IsNan

...

public: bool IsNan
(
    v128Param v
)

...

Returns true if any of the 4 elements of v are NANs.


Anchor
ad3416b43603c707e20467392ac1679c9
ad3416b43603c707e20467392ac1679c9

v128 Geo::Lerp

...

public: v128 Lerp
(
    v128Param a,
    v128Param b,
    v128Param s
)

...

Linearly interpolated between the corresponding components of a and b.

s is the interpolation factor, typically having values between 0 -> 1.


Anchor
ab93ab9636a10da186a38308ef8d90b59
ab93ab9636a10da186a38308ef8d90b59

GEO_FORCE_INLINE v128 Geo::Max

...

public: v128 Max
(
    const v128 & a,
    const v128 & b
)

...

Returns a vector where each element has the maximum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.


Anchor
a66f42ef662866752d3a45a5118b13f5a
a66f42ef662866752d3a45a5118b13f5a

GEO_FORCE_INLINE v128 Geo::Min

...

public: v128 Min
(
    const v128 & a,
    const v128 & b
)

...

Returns a vector where each element has the minimum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.


Anchor
a18b0aae01a3250dea4133325945584d3
a18b0aae01a3250dea4133325945584d3

GEO_FORCE_INLINE Geo::v128 Geo::operator-

...

public: Geo::v128 operator-
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

Operator - (component-wise subtraction)


Anchor
ae8a839c4ceda614be9ac539eec69f58d
ae8a839c4ceda614be9ac539eec69f58d

GEO_FORCE_INLINE Geo::v128 Geo::operator-

...

public: Geo::v128 operator-
(
    Geo::v128Param v
)

...

The unary - operator. Equivalent to (VZero() - v);.


Anchor
af090191645590e7a4b6386edb66dc7be
af090191645590e7a4b6386edb66dc7be

GEO_FORCE_INLINE Geo::v128 Geo::operator*

...

public: Geo::v128 operator*
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

Operator * (component-wise multiplication)


Anchor
a611f39734ff55c151fc1020b75ee8899
a611f39734ff55c151fc1020b75ee8899

GEO_FORCE_INLINE Geo::v128 & Geo::operator*=

...

public: Geo::v128 & operator*=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)

...

Inplace *.


Anchor
a93e0196befe96bb2e7a746907e62a57b
a93e0196befe96bb2e7a746907e62a57b

GEO_FORCE_INLINE Geo::v128 Geo::operator/

...

public: Geo::v128 operator/
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

Operator / (component-wise division)


Anchor
acb2d3e65be9aa7931807e52c420f98a8
acb2d3e65be9aa7931807e52c420f98a8

GEO_FORCE_INLINE Geo::v128 & Geo::operator/=

...

public: Geo::v128 & operator/=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)

...

Inplace /.


Anchor
a6a7a505d4095504e005769389d67546f
a6a7a505d4095504e005769389d67546f

GEO_FORCE_INLINE Geo::v128 Geo::operator+

...

public: Geo::v128 operator+
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

Operator + (component-wise addition)


Anchor
a401c6961a44af1679d4fc14049cf6d82
a401c6961a44af1679d4fc14049cf6d82

GEO_FORCE_INLINE Geo::v128 Geo::operator+

...

public: Geo::v128 operator+
(
    Geo::v128Param v
)

...

The unary + operator (effectively a no-op)


Anchor
a43021b045a549d3277f081cbcb231894
a43021b045a549d3277f081cbcb231894

GEO_FORCE_INLINE Geo::v128 & Geo::operator+=

...

public: Geo::v128 & operator+=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)

...

Inplace +.


Anchor
a50219a3f4cc2c88414d0777209ec6519
a50219a3f4cc2c88414d0777209ec6519

GEO_FORCE_INLINE Geo::v128 & Geo::operator-=

...

public: Geo::v128 & operator-=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)

...

Inplace -.


Anchor
a9c23928b7fdeb1b7c698b0cd476b8c39
a9c23928b7fdeb1b7c698b0cd476b8c39

Geo::GeoString<char> GEO_CALL Geo::V128ToUtf8String

...

public: Geo::GeoString< char > GEO_CALL V128ToUtf8String
(
    const Geo::v128 & v
)

...

Creates a GeoString representation of the vector (space-separated).

The ..XYZ versions return a string containing only the X, Y and Z components of the vector, the others include W.


Anchor
a9e435ad769e6928c144696a3135eddd5
a9e435ad769e6928c144696a3135eddd5

Geo::GeoString<char> GEO_CALL Geo::V128ToUtf8StringXYZ

...

public: Geo::GeoString< char > GEO_CALL V128ToUtf8StringXYZ
(
    const Geo::v128 & v
)

...

Creates a GeoString representation of the vector (space-separated).

The ..XYZ versions return a string containing only the X, Y and Z components of the vector, the others include W.


Anchor
a7160b80cb279c04e24673d2077b02dd3
a7160b80cb279c04e24673d2077b02dd3

GEO_FORCE_INLINE v128 Geo::VBroadcast

...

public: v128 VBroadcast
(
    float x
)

...

Construct a v128 by broadcasting a float into all elements.

This is particularly handy when you want to use the vpu to do regular fpu operations.


Anchor
a749f18d7e6dc2c77206fe0f6f4a8acde
a749f18d7e6dc2c77206fe0f6f4a8acde

GEO_FORCE_INLINE v128 Geo::VBroadcastInt

...

public: v128 VBroadcastInt
(
    s32 x
)

...

Construct a v128 by converting an integer to a float and broadcasting it into all elements.


Anchor
a5fa4fdcd33683cc2d8777430659c3267
a5fa4fdcd33683cc2d8777430659c3267

GEO_FORCE_INLINE v128 Geo::VCeil

...

public: v128 VCeil
(
    v128Param v
)

...

Return ceil(v).


Anchor
acc44521c042bc2df51707496f677a840
acc44521c042bc2df51707496f677a840

v128 Geo::VCompareEquals

...

public: v128 VCompareEquals
(
    v128Param a,
    v128Param b
)

...

Compares all corresponding elements to see if a == b (exact equals).

Returns a mask with the result of all comparisons as true/false mask values.


Anchor
ab0688ea329a6a10a4d293343c202da88
ab0688ea329a6a10a4d293343c202da88

v128 Geo::VCompareGE

...

public: v128 VCompareGE
(
    v128Param a,
    v128Param b
)

...

Compares all corresponding elements to see if a >= b.

Returns a mask with the result of all comparisons as true/false mask values.


Anchor
ad4fdbfa939bd292e467f66ceed3b98c8
ad4fdbfa939bd292e467f66ceed3b98c8

v128 Geo::VCompareGT

...

public: v128 VCompareGT
(
    v128Param a,
    v128Param b
)

...

Compares all corresponding elements to see if a > b.

Returns a mask with the result of all comparisons as true/false mask values.


Anchor
af1176e3cfc30fd8b43ca91dec13e3241
af1176e3cfc30fd8b43ca91dec13e3241

v128 Geo::VCompareIsFinite

...

public: v128 VCompareIsFinite
(
    v128Param v
)

...

Tests all elements of v to see if they are finite or not.

It returns a mask with true/false mask values with the result of these 4 tests. TODO - this function isn't complete yet as it doesn't detect INF values yet!


Anchor
aba43eb5c7fdf1dec434c51a8a3970170
aba43eb5c7fdf1dec434c51a8a3970170

v128 Geo::VCompareIsNan

...

public: v128 VCompareIsNan
(
    v128Param v
)

...

Tests all elements of v to see if any of them are NANs.

It returns a mask with true/false mask values with the result of these 4 tests.


Anchor
a8f966ed4f8acaeee8c3621a817993daf
a8f966ed4f8acaeee8c3621a817993daf

v128 Geo::VCompareLE

...

public: v128 VCompareLE
(
    v128Param a,
    v128Param b
)

...

Compares all corresponding elements to see if a <= b.

Returns a mask with the result of all comparisons as true/false mask values.


Anchor
a4e15537e6a8456d26ff7b9de40d7de2c
a4e15537e6a8456d26ff7b9de40d7de2c

v128 Geo::VCompareLT

...

public: v128 VCompareLT
(
    v128Param a,
    v128Param b
)

...

Compares all corresponding elements to see if a < b.

Returns a mask with the result of all comparisons as true/false mask values.


Anchor
af11694058b2f2c5ded907bcaea4913c4
af11694058b2f2c5ded907bcaea4913c4

v128 Geo::VCompareWithFlagsEquals

...

public: v128 VCompareWithFlagsEquals
(
    v128Param a,
    v128Param b,
    u32 & flags
)

...

Compares all corresponding elements to see if a == b (exact equals).

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


Anchor
a25c558a858ad8a260ef7ad17c826e29e
a25c558a858ad8a260ef7ad17c826e29e

v128 Geo::VCompareWithFlagsGE

...

public: v128 VCompareWithFlagsGE
(
    v128Param a,
    v128Param b,
    u32 & flags
)

...

Compares all corresponding elements to see if a >= b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisions. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


Anchor
a04b3d038988c623909325e0a2c8f8cc2
a04b3d038988c623909325e0a2c8f8cc2

v128 Geo::VCompareWithFlagsGT

...

public: v128 VCompareWithFlagsGT
(
    v128Param a,
    v128Param b,
    u32 & flags
)

...

Compares all corresponding elements to see if a > b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


Anchor
a6033f9080474b9794db2b47d707a1639
a6033f9080474b9794db2b47d707a1639

v128 Geo::VCompareWithFlagsLE

...

public: v128 VCompareWithFlagsLE
(
    v128Param a,
    v128Param b,
    u32 & flags
)

...

Compares all corresponding elements to see if a <= b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


Anchor
a2355df5c0d8af701549b1645065745f7
a2355df5c0d8af701549b1645065745f7

v128 Geo::VCompareWithFlagsLT

...

public: v128 VCompareWithFlagsLT
(
    v128Param a,
    v128Param b,
    u32 & flags
)

...

Compares all corresponding elements to see if a < b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


Anchor
af047818c7dfb76dc749c35424363764c
af047818c7dfb76dc749c35424363764c

GEO_FORCE_INLINE v128 Geo::VConstruct

...

public: v128 VConstruct
(
    float x,
    float y,
    float z,
    float w
)

...

Construct a v128 from 4 floats. Fairly slow.


Anchor
a54f7087a29907f42dcd4ccf9fd7edfe9
a54f7087a29907f42dcd4ccf9fd7edfe9

GEO_FORCE_INLINE v128 Geo::VConstructBitwise

...

public: v128 VConstructBitwise
(
    u32 x,
    u32 y,
    u32 z,
    u32 w
)

...

Re-intreprets 4 ints as floats and construct a vector from them.

This is for building a mask if you need one that this file doesn't provide (see below). It's also quite slow, so if you use the mask regularly you might want to declare a static aligned bit of memory and load the vector from that.


Anchor
a4277bb90835b269bde863295219795cb
a4277bb90835b269bde863295219795cb

v128 Geo::VCross3

...

public: v128 VCross3
(
    v128Param lhs,
    v128Param rhs
)

...

Cross the first 3 elements of each.

Providing the w element of both is finite the resulting w will be 0. If it is not finite the nan or inf will be passed through to the w. (NB: on PPU, w is just cleared.)


Anchor
a7dea95ee0f6cfe10565d4319f4b903ad
a7dea95ee0f6cfe10565d4319f4b903ad

GEO_FORCE_INLINE v128 Geo::VCross3ZeroW

...

public: v128 VCross3ZeroW
(
    v128Param lhs,
    v128Param rhs
)

...

Cross the first 3 elements of each.

The w element will be set to zero. The w elements of the parameters are not considered. Prefer this if you are not sure if the w elements of your parameters are finite or not.


Anchor
a377280f5267cae7f6d3bf99db944c13a
a377280f5267cae7f6d3bf99db944c13a

GEO_FORCE_INLINE Geo::v128 Geo::VFrac

...

public: Geo::v128 VFrac
(
    Geo::v128Param v
)

...

Returns the fractional part of each element of v.


Anchor
a1620358b3c36e753c8a88bb692bdf25a
a1620358b3c36e753c8a88bb692bdf25a

v128 Geo::VGetMaskNotSignBit

...

public: v128 VGetMaskNotSignBit()

...

Returns a mask with everything but the 4 sign bits set.


Anchor
aa82c7c98db3634f3eea5c5b994dfaf12
aa82c7c98db3634f3eea5c5b994dfaf12

v128 Geo::VGetMaskSignBit

...

public: v128 VGetMaskSignBit()

...

Returns a mask with just the 4 sign bits set.


Anchor
a6270dc4ae61a9e7d9f054023c1731d51
a6270dc4ae61a9e7d9f054023c1731d51

GEO_FORCE_INLINE v128 Geo::VLoadAligned

...

public: v128 VLoadAligned
(
    const float * vecToLoad
)

...

Load a 4-float array from 16-byte aligned memory.

Cannot be null. NOTE: the memory must be aligned or this will crash.


Anchor
ae0661d4840880a1eab3b847c2ef75198
ae0661d4840880a1eab3b847c2ef75198

GEO_FORCE_INLINE v128 Geo::VLoadUnaligned

...

public: v128 VLoadUnaligned
(
    const float * vecToLoad
)

...

Load a 4-float array from arbitrarily aligned memory. Cannot be null.


Anchor
ab7dcb96879061b177d887216c107e48e
ab7dcb96879061b177d887216c107e48e

GEO_FORCE_INLINE v128 Geo::VMadd

...

public: Geo::v128 VMadd
(
    Geo::v128Param a,
    Geo::v128Param b,
    Geo::v128Param c
)

...

This is a vector multiply accumulate operation returning (a * b) + c.


Anchor
a5dbafe1f13cf887c0cb18207bc396282
a5dbafe1f13cf887c0cb18207bc396282

GEO_FORCE_INLINE v128 Geo::VNegate

...

public: v128 VNegate
(
    v128Param v
)

...

Return -v. You can use the operator overload instead if you prefer.


Anchor
a8585de1d318d5fc3c20aee7fce5544b1
a8585de1d318d5fc3c20aee7fce5544b1

GEO_FORCE_INLINE v128 Geo::VOpAnd

...

public: Geo::v128 VOpAnd
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

This is a bitwise & operation.

You can use this with masks to perform a number of useful operations, including zeroing elements. For example: v128 xz = myVec & VGetMaskXZ();


Anchor
a2292b27e41759aa832cb63099aa45ed4
a2292b27e41759aa832cb63099aa45ed4

GEO_FORCE_INLINE v128 Geo::VOpOnesCompl

...

public: Geo::v128 VOpOnesCompl
(
    Geo::v128Param v
)

...

This is a bitwise ~ operation.

You can use this with masks generate the opposite mask.


Anchor
a38f72faf6d749d5f383a7e26e624c584
a38f72faf6d749d5f383a7e26e624c584

GEO_FORCE_INLINE v128 Geo::VOpOr

...

public: Geo::v128 VOpOr
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

This is a bitwise | operation.

You can use this with masks to perform a number of useful operations, including combining vectors and setting sign bits. For example: v128 xyzw = xyonly | zwonly; v128 xznegated = myVec | (VGetMaskSignBit() & VGetMaskXZ());


Anchor
a8ff21908e075d12faadf57981c810d9d
a8ff21908e075d12faadf57981c810d9d

GEO_FORCE_INLINE v128 Geo::VOpXor

...

public: Geo::v128 VOpXor
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)

...

This is a bitwise ^ operation.

You can use this with masks to perform a number of useful operations, including toggling sign bits and building masks. For example: v128 xySignsSwapped = myVec ^ (VGetMaskSignBit() & VGetMaskXY());


Anchor
ad6af3ae90c1004f68acb322ddbbcd280
ad6af3ae90c1004f68acb322ddbbcd280

GEO_FORCE_INLINE v128 Geo::VPackX4

...

public: GEO_FORCE_INLINEGeo::v128 VPackX4
(
    const Geo::v128 & x,
    const Geo::v128 & y,
    const Geo::v128 & z,
    const Geo::v128 & w
)

...

Packs the X component from each of the four vectors into a single vector.


Anchor
a2f6eb908849c38a60668e044f0a3ef63
a2f6eb908849c38a60668e044f0a3ef63

v128 Geo::VPerpendicular

...

public: v128 VPerpendicular
(
    v128Param v,
    float ep
)

...

Returns a vector perpendicular to v (with one of its components being zero).

Must pass a vector with at least one component > g_VecEpsilonF to avoid nasty interactions with VNormalise.


Anchor
aa2df86795305cd70ad27e44e6a27af6f
aa2df86795305cd70ad27e44e6a27af6f

v128 Geo::VRecip

...

public: v128 VRecip
(
    v128Param v
)

...

Return 1.f / v. (inaccurate)


Anchor
a3016ef37e94363fdf3f9c40221b435c6
a3016ef37e94363fdf3f9c40221b435c6

GEO_FORCE_INLINE v128 Geo::VRecipFast

...

public: v128 VRecipFast
(
    v128Param v
)

...

Return 1.f / v. (fast approximate where available. If not, implemented as VRecip)


Anchor
a87335cc9cca9352007324bb305c4e101
a87335cc9cca9352007324bb305c4e101

v128 Geo::VRecipSqrt

...

public: v128 VRecipSqrt
(
    v128Param v
)

...

Return 1.f / sqrt(v). (inaccurate)


Anchor
a6e23554af34cff40cc3dcd9ff809cc4f
a6e23554af34cff40cc3dcd9ff809cc4f

v128 Geo::VRecipSqrtFast

...

public: v128 VRecipSqrtFast
(
    v128Param v
)

...

Return 1.f / sqrt(v). (inaccurate)


Anchor
a058b01917e4730ecf669893edf993eaa
a058b01917e4730ecf669893edf993eaa

v128 Geo::VReverse

...

public: v128 VReverse
(
    v128Param v
)

...

Reverses the order of the components from xyzw to wzyx.


Anchor
ab2327162ae4f8956a36a3b8b976a3a00
ab2327162ae4f8956a36a3b8b976a3a00

v128 Geo::VShuffle

...

public: v128 VShuffle
(
    v128Param v,
    int x,
    int y,
    int z,
    int w
)

...

Returns the specified permutation of the parameter vector. Any permutation is valid.


Anchor
a92cfa351bc32966dd39146bbce11d7b7
a92cfa351bc32966dd39146bbce11d7b7

GEO_FORCE_INLINE v128 Geo::VSqrt

...

public: v128 VSqrt
(
    v128Param v
)

...

Return sqrt(v). (more inaccurate than the reciprocal version on non-sse hardware)


Anchor
a7594bd7069e0fb3d45085b126953d2cb
a7594bd7069e0fb3d45085b126953d2cb

bool Geo::VTestFlagsAllFalse

...

public: bool VTestFlagsAllFalse
(
    u32 flags
)

...

Tests the flags produced by the VCompareWithFlags* operations.

This returns true if all 4 comparisons were false.


Anchor
a069cbac941e03dea707ea142302e844e
a069cbac941e03dea707ea142302e844e

bool Geo::VTestFlagsAllTrue

...

public: bool VTestFlagsAllTrue
(
    u32 flags
)

...

Tests the flags produced by the VCompareWithFlags* operations.

This returns true if all 4 comparisons were true.


Anchor
a1d21627c77ebf942d18af45c4a988cde
a1d21627c77ebf942d18af45c4a988cde

bool Geo::VTestFlagsSomeFalse

...

public: bool VTestFlagsSomeFalse
(
    u32 flags
)

...

Tests the flags produced by the VCompareWithFlags* operations.

This returns true if one or more of the 4 comparisons were false.


Anchor
a861d3745f233c9b3a4b9add0e5adb219
a861d3745f233c9b3a4b9add0e5adb219

bool Geo::VTestFlagsSomeTrue

...

public: bool VTestFlagsSomeTrue
(
    u32 flags
)

...

Tests the flags produced by the VCompareWithFlags* operations.

This returns true if one or more of the 4 comparisons were true.


Anchor
a412dfc31ea5e8c1b7ff1694a199d8493
a412dfc31ea5e8c1b7ff1694a199d8493

GEO_FORCE_INLINE v128 Geo::VZero

...

public: v128 VZero()

...

A fully-zeroed out vector.


Anchor
a887e23fd28572c4b0ea82fedb108a795
a887e23fd28572c4b0ea82fedb108a795

eVShufflePosition

...

public: enum eVShufflePosition
{
    VSHUF_X = 0,
    VSHUF_Y = 1,
    VSHUF_Z = 2,
    VSHUF_W = 3
}

...

Shuffle constants for the GEO_VSHUFFLE macro.

enumerators
VSHUF_X
VSHUF_Y
VSHUF_Z
VSHUF_W