载入中...
搜索中...
未找到
eve::procgen::CloudField类 参考

Deterministic, seamlessly-tiling, time-animated procedural cloud field. 更多...

#include <CloudField.h>

struct  Params
 

Public 成员函数

 CloudField ()=default
 
 CloudField (const Params &params)
 
const Paramsparams () const
 
void setParams (const Params &params)
 
void setSeed (uint32_t seed)
 
void setWorldScale (float worldScale)
 
void setCoverage (float coverage)
 
void setSoftness (float softness)
 
void setDetail (float detail)
 
void setWind (float speed, float angleRad)
 
void setOctaves (int octaves)
 
void setWarp (float warp)
 
void setSeamless (bool seamless)
 
float coverageAt (float x, float z, float time) const
 Cloud coverage at world (x, z) and time t, in [0,1].
 
void sample (float *out, int width, int height, float time, float x0, float z0, float extent) const
 
void windVelocity (float &vx, float &vz) const
 Drift vector (world units/sec) implied by windSpeed + windAngle.
 

静态 Public 属性

static constexpr int kLattice = 64
 Internal lattice resolution per tile (also the noise wrap period).
 

详细描述

Deterministic, seamlessly-tiling, time-animated procedural cloud field.

Samples a 2D cloud coverage over the XZ ground plane: coverageAt(x, z, t) returns [0,1] where 0 = clear sky and 1 = dense cloud. The field is built from domain-warped value-noise fBm, thresholded into billowy puffs with high-frequency wisp detail, and drifts with a constant wind vector over time. When seamless is enabled the field tiles over a worldScale-wide grid so it can be repeated across an arbitrarily large ground plane.

在文件 CloudField.h17 行定义.

构造及析构函数说明

◆ CloudField() [1/2]

eve::procgen::CloudField::CloudField ( )
default

◆ CloudField() [2/2]

eve::procgen::CloudField::CloudField ( const Params params)
inlineexplicit

在文件 CloudField.h35 行定义.

引用了 params() , 以及 setParams().

成员函数说明

◆ coverageAt()

◆ params()

const Params & eve::procgen::CloudField::params ( ) const
inline

在文件 CloudField.h37 行定义.

被这些函数引用 CloudField() , 以及 setParams().

◆ sample()

void eve::procgen::CloudField::sample ( float *  out,
int  width,
int  height,
float  time,
float  x0,
float  z0,
float  extent 
) const

Fill a width*height buffer with coverage for a world region.

在文件 CloudField.cpp125 行定义.

引用了 coverageAt(), height, px, width, x, y , 以及 z.

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

◆ setCoverage()

void eve::procgen::CloudField::setCoverage ( float  coverage)

在文件 CloudField.cpp70 行定义.

引用了 eve::procgen::CloudField::Params::coverage , 以及 v.

◆ setDetail()

void eve::procgen::CloudField::setDetail ( float  detail)

在文件 CloudField.cpp72 行定义.

引用了 eve::procgen::CloudField::Params::detail , 以及 v.

◆ setOctaves()

void eve::procgen::CloudField::setOctaves ( int  octaves)

在文件 CloudField.cpp77 行定义.

引用了 eve::procgen::CloudField::Params::octaves , 以及 v.

◆ setParams()

void eve::procgen::CloudField::setParams ( const Params params)

在文件 CloudField.cpp66 行定义.

引用了 params().

被这些函数引用 CloudField().

◆ setSeamless()

void eve::procgen::CloudField::setSeamless ( bool  seamless)

在文件 CloudField.cpp79 行定义.

引用了 eve::procgen::CloudField::Params::seamless , 以及 v.

◆ setSeed()

void eve::procgen::CloudField::setSeed ( uint32_t  seed)

在文件 CloudField.cpp68 行定义.

引用了 seed , 以及 eve::procgen::CloudField::Params::seed.

◆ setSoftness()

void eve::procgen::CloudField::setSoftness ( float  softness)

在文件 CloudField.cpp71 行定义.

引用了 eve::procgen::CloudField::Params::softness , 以及 v.

◆ setWarp()

void eve::procgen::CloudField::setWarp ( float  warp)

在文件 CloudField.cpp78 行定义.

引用了 v , 以及 eve::procgen::CloudField::Params::warp.

◆ setWind()

void eve::procgen::CloudField::setWind ( float  speed,
float  angleRad 
)

◆ setWorldScale()

void eve::procgen::CloudField::setWorldScale ( float  worldScale)

在文件 CloudField.cpp69 行定义.

引用了 v , 以及 eve::procgen::CloudField::Params::worldScale.

◆ windVelocity()

void eve::procgen::CloudField::windVelocity ( float &  vx,
float &  vz 
) const

Drift vector (world units/sec) implied by windSpeed + windAngle.

在文件 CloudField.cpp81 行定义.

引用了 eve::procgen::CloudField::Params::windAngle , 以及 eve::procgen::CloudField::Params::windSpeed.

被这些函数引用 coverageAt().

类成员变量说明

◆ kLattice

constexpr int eve::procgen::CloudField::kLattice = 64
staticconstexpr

Internal lattice resolution per tile (also the noise wrap period).

在文件 CloudField.h61 行定义.

被这些函数引用 coverageAt().


该类的文档由以下文件生成: