| 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 101 of file half.h.

## Constructor & Destructor Documentation

## ◆ HalfVector3() [1/3]

constexpr impeller::HalfVector3::HalfVector3 | ( |  | ) |
| inlineconstexpr

Definition at line 111 of file half.h.

111 {}

## ◆ HalfVector3() [2/3]

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

Definition at line 113 of file half.h.

114 : x(ScalarToHalf(a.x)), y(ScalarToHalf(a.y)), z(ScalarToHalf(a.z)) {}
impeller::ScalarToHalf
constexpr InternalHalf ScalarToHalf(Scalar f)
Convert a scalar to a half precision float.
Definition: half.h:32
impeller::HalfVector3::x
InternalHalf x
Definition: half.h:104
impeller::HalfVector3::z
InternalHalf z
Definition: half.h:106
impeller::HalfVector3::y
InternalHalf y
Definition: half.h:105

## ◆ HalfVector3() [3/3]

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

Definition at line 116 of file half.h.

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

## Member Function Documentation

## ◆ operator!=()

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

Definition at line 123 of file half.h.

123 {
124 return v.x != x || v.y != y || v.z != z;
125 }

References x, y, and z.

## ◆ operator==()

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

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.

## Member Data Documentation

## ◆

union { ... }

## ◆ e

InternalHalf impeller::HalfVector3::e[3]

Definition at line 108 of file half.h.

## ◆ x

InternalHalf impeller::HalfVector3::x = 0

Definition at line 104 of file half.h.

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

## ◆ y

InternalHalf impeller::HalfVector3::y = 0

Definition at line 105 of file half.h.

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

## ◆ z

InternalHalf impeller::HalfVector3::z = 0

Definition at line 106 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