载入中...
搜索中...
未找到
eve::graphics::fog::MacFluidGrid类 参考

MAC (Marker-And-Cell) staggered-grid Eulerian fog fluid. 更多...

#include <MacFluidGrid.h>

Public 成员函数

Result< void > configure (const FogDensityField &field, float fixedDt=kDefaultFixedDt)
 Allocate MAC arrays matching a density field lattice.
 
int width () const noexcept
 
int height () const noexcept
 
int depth () const noexcept
 
const FogWorldBounds & bounds () const noexcept
 
glm::vec3 cellSize () const noexcept
 
float fixedDt () const noexcept
 
float accumulatedTime () const noexcept
 
std::uint64_t stepCount () const noexcept
 
Result< void > pullDensity (const FogDensityField &field)
 Copy concentration from a density field (same resolution).
 
Result< void > pushDensity (FogDensityField &field) const
 Write concentration back into a density field.
 
float densityAt (int x, int y, int z) const noexcept
 Cell-centered concentration.
 
void setDensity (int x, int y, int z, float density)
 
float uAt (int i, int y, int z) const noexcept
 Face-centered velocity samples (m/s).
 
float vAt (int x, int j, int z) const noexcept
 
float wAt (int x, int y, int k) const noexcept
 
glm::vec3 velocityAtCell (int x, int y, int z) const noexcept
 Interpolated cell-center velocity.
 
Result< FogCflReport > step (float dt, SceneWind &wind, FogInteractor *interactor, float simTime)
 Advance simulation by wall-clock dt using fixed substeps.
 
FogCflReport diagnoseCfl () const noexcept
 Diagnose CFL for the current velocity field and fixed dt.
 

静态 Public 属性

static constexpr float kDefaultFixedDt = 1.f / 60.f
 
static constexpr float kMaxAccumulated = 0.25f
 

友元

class FogInteractor
 

详细描述

MAC (Marker-And-Cell) staggered-grid Eulerian fog fluid.

Velocity lives on face centers; concentration lives at cell centers. Each fixed substep applies forces, wind, velocity advection, pressure projection, and density transport. An accumulator keeps wall-clock progress under low FPS.

在文件 MacFluidGrid.h 第 26 行定义.

成员函数说明

◆ accumulatedTime()

float eve::graphics::fog::MacFluidGrid::accumulatedTime ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 40 行定义.

◆ bounds()

const FogWorldBounds & eve::graphics::fog::MacFluidGrid::bounds ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 37 行定义.

◆ cellSize()

glm::vec3 eve::graphics::fog::MacFluidGrid::cellSize ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 38 行定义.

◆ configure()

Result< void > eve::graphics::fog::MacFluidGrid::configure ( const FogDensityField &  field,
float  fixedDt = kDefaultFixedDt 
)

Allocate MAC arrays matching a density field lattice.

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

引用了 cells, eve::Diagnostic::error(), eve::Result< T >::failure(), fixedDt(), eve::InvalidArgument , 以及 eve::Result< T >::success().

被这些函数引用 eve::graphics::fog::FogSystem::configureDomain().

◆ densityAt()

float eve::graphics::fog::MacFluidGrid::densityAt ( int  x,
int  y,
int  z 
) const
noexcept

Cell-centered concentration.

在文件 MacFluidGrid.cpp 第 86 行定义.

引用了 x, y , 以及 z.

被这些函数引用 pushDensity().

◆ depth()

int eve::graphics::fog::MacFluidGrid::depth ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 36 行定义.

◆ diagnoseCfl()

FogCflReport eve::graphics::fog::MacFluidGrid::diagnoseCfl ( ) const
noexcept

◆ fixedDt()

float eve::graphics::fog::MacFluidGrid::fixedDt ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 39 行定义.

被这些函数引用 configure().

◆ height()

int eve::graphics::fog::MacFluidGrid::height ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 35 行定义.

◆ pullDensity()

Result< void > eve::graphics::fog::MacFluidGrid::pullDensity ( const FogDensityField &  field)

Copy concentration from a density field (same resolution).

在文件 MacFluidGrid.cpp 第 63 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::Result< T >::success().

被这些函数引用 eve::graphics::fog::FogSystem::seedHeightFog().

◆ pushDensity()

Result< void > eve::graphics::fog::MacFluidGrid::pushDensity ( FogDensityField &  field) const

Write concentration back into a density field.

在文件 MacFluidGrid.cpp 第 74 行定义.

引用了 eve::Conflict, densityAt(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Result< T >::success(), x, y , 以及 z.

被这些函数引用 eve::graphics::fog::FogSystem::stepSimulation().

◆ setDensity()

void eve::graphics::fog::MacFluidGrid::setDensity ( int  x,
int  y,
int  z,
float  density 
)

在文件 MacFluidGrid.cpp 第 94 行定义.

引用了 x, y , 以及 z.

◆ step()

Result< FogCflReport > eve::graphics::fog::MacFluidGrid::step ( float  dt,
SceneWind &  wind,
FogInteractor *  interactor,
float  simTime 
)

Advance simulation by wall-clock dt using fixed substeps.

参数
windWorld wind provider sampled each substep.
interactorOptional solid proxies; may be nullptr.
simTimeAbsolute simulation time in seconds.

在文件 MacFluidGrid.cpp 第 372 行定义.

引用了 eve::graphics::fog::FogInteractor::applyToGrid(), diagnoseCfl(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, kMaxAccumulated, eve::Result< T >::success(), eve::graphics::fog::SceneWind::tick() , 以及 time.

被这些函数引用 eve::graphics::fog::FogSystem::stepSimulation().

◆ stepCount()

std::uint64_t eve::graphics::fog::MacFluidGrid::stepCount ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 41 行定义.

◆ uAt()

float eve::graphics::fog::MacFluidGrid::uAt ( int  i,
int  y,
int  z 
) const
noexcept

Face-centered velocity samples (m/s).

在文件 MacFluidGrid.cpp 第 102 行定义.

引用了 y , 以及 z.

◆ vAt()

float eve::graphics::fog::MacFluidGrid::vAt ( int  x,
int  j,
int  z 
) const
noexcept

在文件 MacFluidGrid.cpp 第 108 行定义.

引用了 x , 以及 z.

◆ velocityAtCell()

glm::vec3 eve::graphics::fog::MacFluidGrid::velocityAtCell ( int  x,
int  y,
int  z 
) const
noexcept

Interpolated cell-center velocity.

在文件 MacFluidGrid.cpp 第 121 行定义.

引用了 x, y , 以及 z.

◆ wAt()

float eve::graphics::fog::MacFluidGrid::wAt ( int  x,
int  y,
int  k 
) const
noexcept

在文件 MacFluidGrid.cpp 第 114 行定义.

引用了 x , 以及 y.

◆ width()

int eve::graphics::fog::MacFluidGrid::width ( ) const
inlinenoexcept

在文件 MacFluidGrid.h 第 34 行定义.

友元及相关函数文档

◆ FogInteractor

friend class FogInteractor
friend

在文件 MacFluidGrid.h 第 73 行定义.

类成员变量说明

◆ kDefaultFixedDt

constexpr float eve::graphics::fog::MacFluidGrid::kDefaultFixedDt = 1.f / 60.f
staticconstexpr

在文件 MacFluidGrid.h 第 28 行定义.

◆ kMaxAccumulated

constexpr float eve::graphics::fog::MacFluidGrid::kMaxAccumulated = 0.25f
staticconstexpr

在文件 MacFluidGrid.h 第 29 行定义.

被这些函数引用 step().


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