This is the documentation for Enlighten.
class Geo PackedInteger4
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 |
|---|---|
Returns the raw 32-bit value. | |
Returns the W component value. | |
Returns the X component value. | |
Returns the Y component value. | |
Returns the Z component value. | |
Construct from a raw 32-bit value. | |
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 product 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. |
Geo::u32 Geo::PackedInteger4< N >::GetValue
public: Geo::u32 GetValue() const
Returns the raw 32-bit value.
Geo::u32 Geo::PackedInteger4< N >::GetW
public: Geo::u32 GetW() const