Versions Compared

Key

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

template<Geo::u32>
class Geo::PackedInteger4

Represents four unsigned integer values packed into a single 32-bit register and named XYZW.

Vector addition and multiplication by a scalar are supported, only for values that would not cause overflow.

Parameters
N

The number of bits into which each of XYZ are packed. W is packed into the remaining bits.

Variables

NameDescription
Geo::u32 m_Value

Four unsigned integer values. XYZ are each packed into N low bits. W is packed into the remaining high bits.

Functions

NameDescription
GetValue()

Returns the raw 32-bit value.

GetW()

Returns the W component value.

GetX()

Returns the X component value.

GetY()

Returns the Y component value.

GetZ()

Returns the Z component value.

PackedInteger4(Geo::u32)

Construct from a raw 32-bit value.

PackedInteger4(Geo::u32, Geo::u32, Geo::u32, Geo::u32)

Construct from four components, each using only the appropriate number of bits.

Friends

NameDescription
friend PackedInteger4 Maximum3(PackedInteger4 left, PackedInteger4 right)

Return the element-wise maximum for XYZ.

friend PackedInteger4 Minimum3(PackedInteger4 left, PackedInteger4 right)

Return the element-wise minimum for XYZ.

friend bool operator!=(PackedInteger4 left, PackedInteger4 right)

Returns true if any corresponding components of both arguments are not equal.

friend PackedInteger4 operator*(PackedInteger4 left, Geo::u32 right)

Returns the component-wise product of both arguments.

friend PackedInteger4 operator/(PackedInteger4 left, Geo::u32 right)

Returns the component-wise quotient of both arguments.

friend PackedInteger4 operator+(PackedInteger4 left, PackedInteger4 right)

Returns the component-wise sum of both arguments.

friend bool operator<(PackedInteger4 left, PackedInteger4 right)

Returns true if the left operand is ordered before the right operand.

friend bool operator==(PackedInteger4 left, PackedInteger4 right)

Returns true if all corresponding components of both arguments are equal.


Anchor
afc2405fb9251743b965ab1a17a617720
afc2405fb9251743b965ab1a17a617720

Geo::u32 Geo::PackedInteger4< N >::GetValue

...

public: Geo::u32 GetValue() const

...

Returns the raw 32-bit value.


Anchor
a8b0ceeff37dc6957b9d00439160e26d0
a8b0ceeff37dc6957b9d00439160e26d0

Geo::u32 Geo::PackedInteger4< N >::GetW

...

public: Geo::u32 GetW() const

...

Returns the W component value.


Anchor
abe144706d59c9d92f9762ea277e76b3f
abe144706d59c9d92f9762ea277e76b3f

Geo::u32 Geo::PackedInteger4< N >::GetX

...

public: Geo::u32 GetX() const

...

Returns the X component value.


Anchor
af0edcdf3a7c8aaecce1cad60562e45ad
af0edcdf3a7c8aaecce1cad60562e45ad

Geo::u32 Geo::PackedInteger4< N >::GetY

...

public: Geo::u32 GetY() const

...

Returns the Y component value.


Anchor
a72fca093ed27b415706bdd2bc07b4fcd
a72fca093ed27b415706bdd2bc07b4fcd

Geo::u32 Geo::PackedInteger4< N >::GetZ

...

public: Geo::u32 GetZ() const

...

Returns the Z component value.


Anchor
a2f1272ad72e38b951dcd652692dfee99
a2f1272ad72e38b951dcd652692dfee99

Geo::PackedInteger4< N >::PackedInteger4

...

public: PackedInteger4
(
    Geo::u32 value
)

...

Construct from a raw 32-bit value.


Anchor
aca2ff0c359041cf7addaf87749766e21
aca2ff0c359041cf7addaf87749766e21

Geo::PackedInteger4< N >::PackedInteger4

...

public: PackedInteger4
(
    Geo::u32 x,
    Geo::u32 y,
    Geo::u32 z,
    Geo::u32 w
)

...

Construct from four components, each using only the appropriate number of bits.