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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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 | ||||
---|---|---|---|---|
|
Geo::u32 Geo::PackedInteger4< N >::GetValue
...
public: Geo::u32 GetValue() const
...
Returns the raw 32-bit value.
Anchor | ||||
---|---|---|---|---|
|
Geo::u32 Geo::PackedInteger4< N >::GetW
...
public: Geo::u32 GetW() const
...
Returns the W component value.
Anchor | ||||
---|---|---|---|---|
|
Geo::u32 Geo::PackedInteger4< N >::GetX
...
public: Geo::u32 GetX() const
...
Returns the X component value.
Anchor | ||||
---|---|---|---|---|
|
Geo::u32 Geo::PackedInteger4< N >::GetY
...
public: Geo::u32 GetY() const
...
Returns the Y component value.
Anchor | ||||
---|---|---|---|---|
|
Geo::u32 Geo::PackedInteger4< N >::GetZ
...
public: Geo::u32 GetZ() const
...
Returns the Z component value.
Anchor | ||||
---|---|---|---|---|
|
Geo::PackedInteger4< N >::PackedInteger4
...
public: PackedInteger4
(
Geo::u32 value
)
...
Construct from a raw 32-bit value.
Anchor | ||||
---|---|---|---|---|
|
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.