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

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

#include <ColorRamp.h>

struct  Stop
 

Public 成员函数

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

Public 属性

std::vector< Stopstops
 

详细描述

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

在文件 ColorRamp.h13 行定义.

成员函数说明

◆ add()

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

在文件 ColorRamp.cpp8 行定义.

引用了 a, b , 以及 stops.

◆ sample()

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

在文件 ColorRamp.cpp14 行定义.

引用了 a, b, stops, 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.cpp34 行定义.

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

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

类成员变量说明

◆ stops

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

在文件 ColorRamp.h19 行定义.

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


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