Ark Server API (ASA) - Wiki
|
#include <Color.h>
Static Public Member Functions | |
static FORCEINLINE FLinearColor | FromSRGBColor (const FColor &Color) |
static FLinearColor | FromPow22Color (const FColor &Color) |
static FLinearColor | FGetHSV (uint8 H, uint8 S, uint8 V) |
static FLinearColor | MakeFromHSV8 (uint8 H, uint8 S, uint8 V) |
static FLinearColor | MakeRandomColor () |
static FLinearColor | MakeFromColorTemperature (float Temp) |
static FLinearColor | MakeRandomSeededColor (int32 Seed) |
static float | Dist (const FLinearColor &V1, const FLinearColor &V2) |
static float | EvaluateBezier (const FLinearColor *ControlPoints, int32 NumPoints, TArray< FLinearColor > &OutPoints) |
static FLinearColor | LerpUsingHSV (const FLinearColor &From, const FLinearColor &To, const float Progress) |
static FORCEINLINE float | Clamp01NansTo0 (float InValue) |
Public Attributes | ||
union { | ||
struct { | ||
float R | ||
float G | ||
float B | ||
float A | ||
} | ||
float RGBA [4] | ||
}; | ||
Static Public Attributes | |
static float | Pow22OneOver255Table [256] |
static CONSTEXPR double | sRGBToLinearTable [256] |
static const FLinearColor | White |
static const FLinearColor | Gray |
static const FLinearColor | Black |
static const FLinearColor | Transparent |
static const FLinearColor | Red |
static const FLinearColor | Green |
static const FLinearColor | Blue |
static const FLinearColor | Yellow |
Friends | |
void | operator<< (FStructuredArchive::FSlot Slot, FLinearColor &Color) |
FORCEINLINE uint32 | GetTypeHash (const FLinearColor &LinearColor) |
|
inline |
|
inlineexplicit |
FORCEINLINE FLinearColor::FLinearColor | ( | const FColor & | Color | ) |
|
explicit |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
FLinearColor FLinearColor::Desaturate | ( | float | Desaturation | ) | const |
Returns a desaturated color, with 0 meaning no desaturation and 1 == full desaturation
Desaturation | Desaturation factor in range [0..1] |
|
inlinestatic |
|
inline |
|
static |
Generates a list of sample points on a Bezier curve defined by 2 points.
ControlPoints | Array of 4 Linear Colors (vert1, controlpoint1, controlpoint2, vert2). |
NumPoints | Number of samples. |
OutPoints | Receives the output samples. |
|
static |
|
static |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
FLinearColor FLinearColor::HSVToLinearRGB | ( | ) | const |
Converts an HSV color to a linear space RGB color
Initialize this Color based on an FString. The String is expected to contain R=, G=, B=, A=. The FLinearColor will be bogus when InitFromString returns false.
InSourceString | FString containing the color values. |
Definition at line 487 of file Color.h.
|
inline |
|
static |
Linearly interpolates between two colors by the specified progress amount. The interpolation is performed in HSV color space taking the shortest path to the new color's hue. This can give better results than FMath::Lerp(), but is much more expensive. The incoming colors are in RGB space, and the output color will be RGB. The alpha value will also be interpolated.
From | The color and alpha to interpolate from as linear RGBA |
To | The color and alpha to interpolate to as linear RGBA |
Progress | Scalar interpolation amount (usually between 0.0 and 1.0 inclusive) |
FLinearColor FLinearColor::LinearRGBToHSV | ( | ) | const |
Converts a linear space RGB color to an HSV color
|
static |
Converts temperature in Kelvins of a black body radiator to RGB chromaticity.
|
static |
Converts byte hue-saturation-brightness to floating point red-green-blue.
|
static |
Makes a random but quite nice color.
|
static |
Makes a random color based on a seed.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
FORCEINLINE FColor FLinearColor::Quantize | ( | ) | const |
FORCEINLINE FColor FLinearColor::QuantizeFloor | ( | ) | const |
Quantizes the linear color and returns the result as a FColor. This bypasses the SRGB conversion. Uses floor quantization, which does not match the GPU standard conversion. Restoration to float should be done with a +0.5 bias to restore to centered buckets. Do NOT use this for graphics or textures or images, use QuantizeRound instead.
Definition at line 881 of file Color.h.
FORCEINLINE FColor FLinearColor::QuantizeRound | ( | ) | const |
Quantizes the linear color with rounding and returns the result as a FColor. This bypasses the SRGB conversion. QuantizeRound can be dequantized back to linear with FColor::ReinterpretAsLinear (just /255.f) this matches the GPU UNORM<->float conversion spec and should be preferred
Definition at line 870 of file Color.h.
|
inline |
FORCEINLINE FColor FLinearColor::ToFColor | ( | const bool | bSRGB | ) | const |
FColor FLinearColor::ToFColorSRGB | ( | ) | const |
Quantizes the linear color and returns the result as a FColor with optional sRGB conversion. Clamps in [0,1] range before conversion. ToFColor(false) is QuantizeRound
FColor FLinearColor::ToRGBE | ( | ) | const |
|
friend |
|
friend |
union { ... } FLinearColor |
|
static |
|
static |
|
static |
|
static |
|
static |
Static lookup table used for FColor -> FLinearColor conversion. Pow(2.2)
|
static |
Static lookup table used for FColor -> FLinearColor conversion. sRGB
|
static |
|
static |
|
static |