Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
impeller::HalfVector4 Struct Reference

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

#include <half.h>

Public Member Functions

constexpr HalfVector4 ()
 
constexpr HalfVector4 (const Color &a)
 
constexpr HalfVector4 (const Vector4 &a)
 
constexpr HalfVector4 (InternalHalf x, InternalHalf y, InternalHalf z, InternalHalf w)
 
constexpr bool operator== (const HalfVector4 &v) const
 
constexpr bool operator!= (const HalfVector4 &v) const
 

Public Attributes

union { 
 
   struct { 
 
      InternalHalf   x = 0 
 
      InternalHalf   y = 0 
 
      InternalHalf   z = 0 
 
      InternalHalf   w = 0 
 
   }  
 
   InternalHalf   e [4] 
 
};  
 

Detailed Description

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

Definition at line 60 of file half.h.

Constructor & Destructor Documentation

◆ HalfVector4() [1/4]

constexpr impeller::HalfVector4::HalfVector4 ( )
inlineconstexpr

Definition at line 71 of file half.h.

71{}

◆ HalfVector4() [2/4]

constexpr impeller::HalfVector4::HalfVector4 ( const Color a)
inlineconstexpr

Definition at line 73 of file half.h.

74 : x(ScalarToHalf(a.red)),
75 y(ScalarToHalf(a.green)),
76 z(ScalarToHalf(a.blue)),
77 w(ScalarToHalf(a.alpha)) {}
struct MyStruct a[10]
constexpr InternalHalf ScalarToHalf(Scalar f)
Convert a scalar to a half precision float.
Definition half.h:32
InternalHalf x
Definition half.h:63
InternalHalf w
Definition half.h:66
InternalHalf y
Definition half.h:64
InternalHalf z
Definition half.h:65

◆ HalfVector4() [3/4]

constexpr impeller::HalfVector4::HalfVector4 ( const Vector4 a)
inlineconstexpr

Definition at line 79 of file half.h.

◆ HalfVector4() [4/4]

constexpr impeller::HalfVector4::HalfVector4 ( InternalHalf  x,
InternalHalf  y,
InternalHalf  z,
InternalHalf  w 
)
inlineconstexpr

Definition at line 85 of file half.h.

89 : x(x), y(y), z(z), w(w) {}

Member Function Documentation

◆ operator!=()

constexpr bool impeller::HalfVector4::operator!= ( const HalfVector4 v) const
inlineconstexpr

Definition at line 95 of file half.h.

95 {
96 return v.x != x || v.y != y || v.z != z || v.w != w;
97 }

◆ operator==()

constexpr bool impeller::HalfVector4::operator== ( const HalfVector4 v) const
inlineconstexpr

Definition at line 91 of file half.h.

91 {
92 return v.x == x && v.y == y && v.z == z && v.w == w;
93 }

Member Data Documentation

◆ [union]

union { ... } impeller::HalfVector4

◆ e

InternalHalf impeller::HalfVector4::e[4]

Definition at line 68 of file half.h.

◆ w

InternalHalf impeller::HalfVector4::w = 0

Definition at line 66 of file half.h.

◆ x

InternalHalf impeller::HalfVector4::x = 0

Definition at line 63 of file half.h.

◆ y

InternalHalf impeller::HalfVector4::y = 0

Definition at line 64 of file half.h.

◆ z

InternalHalf impeller::HalfVector4::z = 0

Definition at line 65 of file half.h.


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