Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
Float16Color.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#
pragma
once
4
5
#
include
"CoreTypes.h"
6
#
include
"Math/Color.h"
7
#
include
"Math/Float16.h"
8
9
/**
10
* RGBA Color made up of FFloat16
11
*/
12
class
FFloat16Color
13
{
14
public
:
15
16
FFloat16
R
;
17
FFloat16
G
;
18
FFloat16
B
;
19
FFloat16
A
;
20
21
/* Get as a pointer to four half floats */
22
uint16 *
GetFourHalves
() {
return
(uint16 *)
this
; }
23
const
uint16 *
GetFourHalves
()
const
{
return
(
const
uint16 *)
this
; }
24
25
const
FLinearColor
GetFloats
()
const
;
26
27
/** Default constructor */
28
FFloat16Color
();
29
30
/** Copy constructor. */
31
FFloat16Color
(
const
FFloat16Color
& Src);
32
33
/** Constructor from a linear color. */
34
FFloat16Color
(
const
FLinearColor
& Src);
35
36
/** assignment operator */
37
FFloat16Color
&
operator
=(
const
FFloat16Color
& Src);
38
39
/**
40
* Checks whether two colors are identical.
41
*
42
* @param Src The other color.
43
* @return true if the two colors are identical, otherwise false.
44
*/
45
bool
operator
==(
const
FFloat16Color
& Src)
const
;
46
};
47
48
49
FORCEINLINE
FFloat16Color
::
FFloat16Color
() { }
50
51
52
FORCEINLINE
FFloat16Color
::
FFloat16Color
(
const
FFloat16Color
& Src)
53
{
54
R
=
Src
.
R
;
55
G
=
Src
.
G
;
56
B
=
Src
.
B
;
57
A
=
Src
.
A
;
58
}
59
60
61
FORCEINLINE
FFloat16Color
::
FFloat16Color
(
const
FLinearColor
& Src)
62
{
63
FPlatformMath::VectorStoreHalf( GetFourHalves(), (
const
float
*)&Src );
64
}
65
66
67
FORCEINLINE
const
FLinearColor
FFloat16Color
::
GetFloats
()
const
68
{
69
FLinearColor
Ret;
70
FPlatformMath::VectorLoadHalf( (
float
*)&Ret, GetFourHalves() );
71
return
Ret;
72
}
73
74
75
FORCEINLINE
FFloat16Color
&
FFloat16Color
::
operator
=(
const
FFloat16Color
& Src)
76
{
77
R
=
Src
.
R
;
78
G
=
Src
.
G
;
79
B
=
Src
.
B
;
80
A
=
Src
.
A
;
81
return
*
this
;
82
}
83
84
FORCEINLINE
bool
FFloat16Color
::
operator
==(
const
FFloat16Color
& Src)
const
85
{
86
return
(
87
(
R
== Src
.
R
) &&
88
(
G
== Src
.
G
) &&
89
(
B
== Src
.
B
) &&
90
(
A
== Src
.
A
)
91
);
92
}
FORCEINLINE
#define FORCEINLINE
Definition
Platform.h:644
FFloat16Color
Definition
Float16Color.h:13
FFloat16Color::FFloat16Color
FFloat16Color(const FFloat16Color &Src)
Definition
Float16Color.h:52
FFloat16Color::GetFourHalves
const uint16 * GetFourHalves() const
Definition
Float16Color.h:23
FFloat16Color::A
FFloat16 A
Definition
Float16Color.h:19
FFloat16Color::FFloat16Color
FFloat16Color()
Definition
Float16Color.h:49
FFloat16Color::R
FFloat16 R
Definition
Float16Color.h:16
FFloat16Color::operator==
bool operator==(const FFloat16Color &Src) const
Definition
Float16Color.h:84
FFloat16Color::G
FFloat16 G
Definition
Float16Color.h:17
FFloat16Color::B
FFloat16 B
Definition
Float16Color.h:18
FFloat16Color::GetFloats
const FLinearColor GetFloats() const
Definition
Float16Color.h:67
FFloat16Color::GetFourHalves
uint16 * GetFourHalves()
Definition
Float16Color.h:22
FFloat16Color::FFloat16Color
FFloat16Color(const FLinearColor &Src)
Definition
Float16Color.h:61
FFloat16Color::operator=
FFloat16Color & operator=(const FFloat16Color &Src)
Definition
Float16Color.h:75
FFloat16
Definition
Float16.h:34
FFloat16::operator=
FFloat16 & operator=(const FFloat16 &FP16Value)
Definition
Float16.h:147
FLinearColor
Definition
Color.h:48
Downloads
ArkServerAPI_NEW
ASA
AsaApi
AsaApi
Core
Public
API
UE
Math
Float16Color.h
Generated by
1.10.0