载入中...
搜索中...
未找到
eve::procgen::ColorRamp结构体 参考

Piecewise-linear color ramp in t∈[0,1], with optional hard banding. 更多...

#include <ColorRamp.h>

类

struct  Stop
 Stop public API. 更多...
 

Public 成员函数

void add (float t, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 Adds .
 
Rgba8 sample (float t) const
 Sample.
 
Rgba8 sampleBanded (float t, int bands) const
 Quantize continuous t into bands steps then sample (pixel look).
 

Public 属性

std::vector< Stop > stops
 

详细描述

Piecewise-linear color ramp in t∈[0,1], with optional hard banding.

在文件 ColorRamp.h 第 16 行定义.

成员函数说明

◆ add()

void eve::procgen::ColorRamp::add ( float  t,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255 
)

Adds .

在文件 ColorRamp.cpp 第 8 行定义.

引用了 a, b, g, r, stops , 以及 t.

◆ sample()

Rgba8 eve::procgen::ColorRamp::sample ( float  t) const

Sample.

在文件 ColorRamp.cpp 第 14 行定义.

引用了 a, b, stops, t, u, x , 以及 y.

被这些函数引用 sampleBanded().

◆ sampleBanded()

Rgba8 eve::procgen::ColorRamp::sampleBanded ( float  t,
int  bands 
) const

Quantize continuous t into bands steps then sample (pixel look).

在文件 ColorRamp.cpp 第 34 行定义.

引用了 idx, sample(), step , 以及 t.

被这些函数引用 eve::procgen::paintHeightToImage().

类成员变量说明

◆ stops

std::vector<Stop> eve::procgen::ColorRamp::stops

在文件 ColorRamp.h 第 23 行定义.

被这些函数引用 add() , 以及 sample().


该结构体的文档由以下文件生成: