| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::HalfVector3 Struct Reference

A storage only class for half precision floating point vector 3. More...

`#include <half.h>`

## Public Member Functions
constexpr | HalfVector3 ()
constexpr | HalfVector3 (const Vector3 &a)
constexpr | HalfVector3 (InternalHalf x, InternalHalf y, InternalHalf z)
constexpr bool | operator== (const HalfVector3 &v) const
constexpr bool | operator!= (const HalfVector3 &v) const

## Public Attributes
union {
struct {
InternalHalf x = 0
InternalHalf y = 0
InternalHalf z = 0
} |
InternalHalf e [3]
}; |

## Detailed Description

A storage only class for half precision floating point vector 3.

Definition at line 97 of file half.h.

## Constructor & Destructor Documentation

## ◆ HalfVector3() [1/3]

constexpr impeller::HalfVector3::HalfVector3 | ( |  | ) |
| inline constexpr

Definition at line 107 of file half.h.

107 {}

## ◆ HalfVector3() [2/3]

constexpr impeller::HalfVector3::HalfVector3 | ( | const Vector3 & | a | ) |
| inline constexpr

Definition at line 109 of file half.h.

110 : x(ScalarToHalf(a.x)), y(ScalarToHalf(a.y)), z(ScalarToHalf(a.z)) {}

## ◆ HalfVector3() [3/3]

constexpr impeller::HalfVector3::HalfVector3 | ( | InternalHalf | x,
|  | InternalHalf | y,
|  | InternalHalf | z
| ) |  |
| inline constexpr

Definition at line 112 of file half.h.

113 : x(x), y(y), z(z) {}

## Member Function Documentation

## ◆ operator!=()

constexpr bool impeller::HalfVector3::operator!= | ( | const HalfVector3 & | v | ) | const
| inline constexpr

Definition at line 119 of file half.h.

119 {
120 return v.x != x || v.y != y || v.z != z;
121 }

References x, y, and z.

## ◆ operator==()

constexpr bool impeller::HalfVector3::operator== | ( | const HalfVector3 & | v | ) | const
| inline constexpr

Definition at line 115 of file half.h.

115 {
116 return v.x == x && v.y == y && v.z == z;
117 }

References x, y, and z.

## Member Data Documentation

## ◆ @5

union { ... }

## ◆ e

InternalHalf impeller::HalfVector3::e[3]

Definition at line 104 of file half.h.

## ◆ x

InternalHalf impeller::HalfVector3::x = 0

Definition at line 100 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

## ◆ y

InternalHalf impeller::HalfVector3::y = 0

Definition at line 101 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

## ◆ z

InternalHalf impeller::HalfVector3::z = 0

Definition at line 102 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

The documentation for this struct was generated from the following file:

- impeller/geometry/half.h

impeller::HalfVector3::y
InternalHalf y
Definition: half.h:101
impeller::HalfVector3::x
InternalHalf x
Definition: half.h:100
impeller::ScalarToHalf
constexpr InternalHalf ScalarToHalf(Scalar f)
Convert a scalar to a half precision float.
Definition: half.h:28
impeller::HalfVector3::z
InternalHalf z
Definition: half.h:102