3#include <Foundation/Basics.h>
4#include <Foundation/Containers/HybridArray.h>
5#include <Foundation/Math/Declarations.h>
20 PL_DECLARE_POD_TYPE();
26 float m_fInvDistToNextCp;
28 PL_ALWAYS_INLINE
bool operator<(
const ColorCP& rhs)
const {
return m_PosX < rhs.m_PosX; }
34 PL_DECLARE_POD_TYPE();
38 float m_fInvDistToNextCp;
40 PL_ALWAYS_INLINE
bool operator<(
const AlphaCP& rhs)
const {
return m_PosX < rhs.m_PosX; }
46 PL_DECLARE_POD_TYPE();
50 float m_fInvDistToNextCp;
68 void AddAlphaControlPoint(
double x, plUInt8 uiAlpha);
71 void AddIntensityControlPoint(
double x,
float fIntensity);
74 bool GetExtents(
double& ref_fMinx,
double& ref_fMaxx)
const;
77 void GetNumControlPoints(plUInt32& ref_uiRgb, plUInt32& ref_uiAlpha, plUInt32& ref_uiIntensity)
const;
98 void SortControlPoints();
103 void Evaluate(
double x,
plColorGammaUB& ref_rgba,
float& ref_fIntensity)
const;
106 void Evaluate(
double x,
plColor& ref_hdr)
const;
111 void EvaluateColor(
double x,
plColor& ref_rgb)
const;
113 void EvaluateAlpha(
double x, plUInt8& ref_uiAlpha)
const;
115 void EvaluateIntensity(
double x,
float& ref_fIntensity)
const;
118 plUInt64 GetHeapMemoryUsage()
const;
127 void PrecomputeLerpNormalizer();
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
A color curve for animating colors.
Definition ColorGradient.h:15
const AlphaCP & GetAlphaControlPoint(plUInt32 uiIdx) const
Const access to a control point.
Definition ColorGradient.h:82
ColorCP & ModifyColorControlPoint(plUInt32 uiIdx)
Non-const access to a control point. If you modify the x coordinate, SortControlPoints() has to be ca...
Definition ColorGradient.h:88
AlphaCP & ModifyAlphaControlPoint(plUInt32 uiIdx)
Non-const access to a control point. If you modify the x coordinate, SortControlPoints() has to be ca...
Definition ColorGradient.h:91
const ColorCP & GetColorControlPoint(plUInt32 uiIdx) const
Const access to a control point.
Definition ColorGradient.h:80
const IntensityCP & GetIntensityControlPoint(plUInt32 uiIdx) const
Const access to a control point.
Definition ColorGradient.h:84
IntensityCP & ModifyIntensityControlPoint(plUInt32 uiIdx)
Non-const access to a control point. If you modify the x coordinate, SortControlPoints() has to be ca...
Definition ColorGradient.h:94
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
Alpha control point.
Definition ColorGradient.h:33
PL_ALWAYS_INLINE bool operator<(const AlphaCP &rhs) const
Internal: Optimization for Evaluate to not recalculate 1/distance to the next control point.
Definition ColorGradient.h:40
Color control point. Stores red, green and blue in gamma space.
Definition ColorGradient.h:19
PL_ALWAYS_INLINE bool operator<(const ColorCP &rhs) const
Internal: Optimization for Evaluate to not recalculate 1/distance to the next control point.
Definition ColorGradient.h:28
Intensity control point. Used to scale rgb for high-dynamic range values.
Definition ColorGradient.h:45
PL_ALWAYS_INLINE bool operator<(const IntensityCP &rhs) const
Internal: Optimization for Evaluate to not recalculate 1/distance to the next control point.
Definition ColorGradient.h:52