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

Orchestrates density, MAC transport, optics, froxel mapping, and art. 更多...

#include <FogSystem.h>

Public 成员函数

FogQuality quality () const noexcept
 Quality.
 
FogQualityBudget budget () const noexcept
 Budget.
 
float simulationTime () const noexcept
 Simulation time.
 
std::uint64_t frameIndex () const noexcept
 Frame index.
 
FogDensityField & densityField () noexcept
 Density field.
 
const FogDensityField & densityField () const noexcept
 Density field.
 
FogProfile & profile () noexcept
 Profile.
 
const FogProfile & profile () const noexcept
 Profile.
 
SceneWind & wind () noexcept
 Wind.
 
const SceneWind & wind () const noexcept
 Wind.
 
MacFluidGrid & fluid () noexcept
 Fluid.
 
const MacFluidGrid & fluid () const noexcept
 Fluid.
 
FogInteractor & interactor () noexcept
 Interactor.
 
const FogInteractor & interactor () const noexcept
 Interactor.
 
BeerLightCache & beerCache () noexcept
 Beer cache.
 
const BeerLightCache & beerCache () const noexcept
 Beer cache.
 
ContinuousArt & art () noexcept
 Art.
 
const ContinuousArt & art () const noexcept
 Art.
 
Result< void > setQuality (FogQuality quality)
 Select Fast / Enhanced / PhysicalReference and invalidate caches.
 
Result< void > configureDomain (int simWidth, int simHeight, int simDepth, const FogWorldBounds &bounds, float fixedDt=1.f/60.f)
 Allocate density + MAC over world bounds at the quality froxel-ish resolution. Simulation resolution is independent of froxel display resolution.
 
Result< void > seedHeightFog (float baseDensity, float baseHeight, float falloff, float curlScale, std::uint32_t seed=1u)
 Seed a height-banded fog volume.
 
Result< FogCflReport > stepSimulation (float dt)
 Advance wind + MAC fluid by wall-clock dt (fixed substeps inside).
 
Result< void > ensureBeerCache (const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity)
 Refresh BeerLightCache when quality/light/density require it.
 
Result< FogRayResult > marchRay (const glm::vec3 &origin, const glm::vec3 &direction, const FogVolumeBound &bound, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float lightIntensity, const glm::vec3 &skyAmbient, const glm::vec3 &groundAmbient, float sceneDepth) const
 World-space ray march through the live density field.
 
Result< int > renderToFroxel (AtmosphereVolume &volume, const glm::mat4 &invViewProj, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity)
 Inject + integrate the density field into a froxel AtmosphereVolume.
 
Result< int > injectToFroxel (AtmosphereVolume &volume, const glm::mat4 &invViewProj)
 Add MAC density into an existing froxel grid without clearing or integrating.
 
Result< int > injectToVolumetric (Volumetric *volumetric)
 Additive MAC inject into a Volumetric that already holds height fog / volumes. Does not resize, clear, or integrate. Caller still owns uploadFroxel / applyFroxel.
 
Result< int > syncToVolumetric (Volumetric *volumetric, const glm::vec3 &lightDir, const glm::vec3 &lightColor, float intensity)
 Map the live density field into a Volumetric froxel grid and integrate lighting. Resizes the atlas to the quality budget and replaces prior media. Prefer injectToVolumetric when the caller already injected frustum height fog. Caller still owns uploadFroxel / applyFroxel. Uses the Volumetric camera matrix.
 
Result< FogRayResult > integrateBeam (const AnalyticBeam &beam, const glm::vec3 &origin, const glm::vec3 &direction, float sceneDepth, float mediumDensity) const
 Analytic beam integration using the active quality segment count.
 
Result< std::vector< DustParticle > > generateDust (int count, float turbulenceMeters, std::uint32_t seed=7u) const
 Generate procedural dust for the simulation bounds.
 
ContinuousArtOutput stylize (const FogRayResult &physical, float viewZ, float neighborOpacity=0.f) const noexcept
 Apply ContinuousArt to a physical ray result.
 

详细描述

Orchestrates density, MAC transport, optics, froxel mapping, and art.

Data ownership:

@ownership The FogSystem uniquely owns its lattices, caches and art params. AtmosphereVolume arguments are borrowed for the call only. @lifetime Caller-owned; destroy after the last march/froxel call. @thread Simulation / render thread that created it; not internally synchronized. @reentrancy Public methods are not reentrant and invoke no script callbacks.

在文件 FogSystem.h 第 46 行定义.

成员函数说明

◆ art() [1/2]

const ContinuousArt & eve::graphics::fog::FogSystem::art ( ) const
inlinenoexcept

Art.

在文件 FogSystem.h 第 84 行定义.

◆ art() [2/2]

ContinuousArt & eve::graphics::fog::FogSystem::art ( )
inlinenoexcept

Art.

在文件 FogSystem.h 第 82 行定义.

◆ beerCache() [1/2]

const BeerLightCache & eve::graphics::fog::FogSystem::beerCache ( ) const
inlinenoexcept

Beer cache.

在文件 FogSystem.h 第 80 行定义.

◆ beerCache() [2/2]

BeerLightCache & eve::graphics::fog::FogSystem::beerCache ( )
inlinenoexcept

Beer cache.

在文件 FogSystem.h 第 78 行定义.

◆ budget()

FogQualityBudget eve::graphics::fog::FogSystem::budget ( ) const
inlinenoexcept

◆ configureDomain()

Result< void > eve::graphics::fog::FogSystem::configureDomain ( int  simWidth,
int  simHeight,
int  simDepth,
const FogWorldBounds &  bounds,
float  fixedDt = 1.f / 60.f 
)

Allocate density + MAC over world bounds at the quality froxel-ish resolution. Simulation resolution is independent of froxel display resolution.

在文件 FogSystem.cpp 第 21 行定义.

引用了 bounds, eve::graphics::fog::MacFluidGrid::configure(), eve::graphics::fog::BeerLightCache::invalidate(), eve::graphics::fog::FogDensityField::resize() , 以及 eve::Result< T >::success().

◆ densityField() [1/2]

const FogDensityField & eve::graphics::fog::FogSystem::densityField ( ) const
inlinenoexcept

Density field.

在文件 FogSystem.h 第 60 行定义.

◆ densityField() [2/2]

FogDensityField & eve::graphics::fog::FogSystem::densityField ( )
inlinenoexcept

Density field.

在文件 FogSystem.h 第 58 行定义.

◆ ensureBeerCache()

Result< void > eve::graphics::fog::FogSystem::ensureBeerCache ( const glm::vec3 &  lightDir,
const glm::vec3 &  lightColor,
float  intensity 
)

◆ fluid() [1/2]

const MacFluidGrid & eve::graphics::fog::FogSystem::fluid ( ) const
inlinenoexcept

Fluid.

在文件 FogSystem.h 第 72 行定义.

◆ fluid() [2/2]

MacFluidGrid & eve::graphics::fog::FogSystem::fluid ( )
inlinenoexcept

Fluid.

在文件 FogSystem.h 第 70 行定义.

◆ frameIndex()

std::uint64_t eve::graphics::fog::FogSystem::frameIndex ( ) const
inlinenoexcept

Frame index.

在文件 FogSystem.h 第 55 行定义.

◆ generateDust()

Result< std::vector< DustParticle > > eve::graphics::fog::FogSystem::generateDust ( int  count,
float  turbulenceMeters,
std::uint32_t  seed = 7u 
) const

Generate procedural dust for the simulation bounds.

在文件 FogSystem.cpp 第 192 行定义.

引用了 eve::graphics::fog::FogDensityField::bounds(), count, eve::graphics::fog::ProceduralDust::generate() , 以及 seed.

◆ injectToFroxel()

Result< int > eve::graphics::fog::FogSystem::injectToFroxel ( AtmosphereVolume &  volume,
const glm::mat4 &  invViewProj 
)

Add MAC density into an existing froxel grid without clearing or integrating.

Use after injectFroxelHeightFog / local FogVolume injection so the fluid is a perturbation on the display path, not a replacement for it.

参数
volumeBorrowed froxel grid; caller owns clear / integrate / upload.
invViewProjInverse view-projection of the active camera.

在文件 FogSystem.cpp 第 113 行定义.

引用了 budget(), eve::graphics::fog::budgetFor(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::fog::FogFroxelBridge::inject(), invViewProj, eve::graphics::fog::FogQualityBudget::occupancySkip, volume , 以及 eve::graphics::fog::FogDensityField::width().

被这些函数引用 injectToVolumetric().

◆ injectToVolumetric()

Result< int > eve::graphics::fog::FogSystem::injectToVolumetric ( Volumetric *  volumetric)

Additive MAC inject into a Volumetric that already holds height fog / volumes. Does not resize, clear, or integrate. Caller still owns uploadFroxel / applyFroxel.

参数
volumetricBorrowed for the call; not retained. @ownership Borrowed Volumetric; FogSystem does not take ownership. @lifetime Valid only for this call; do not retain across frames via this argument. @thread Simulation / render thread that owns both objects. @reentrancy Not reentrant; invokes no script callbacks.

在文件 FogSystem.cpp 第 123 行定义.

引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::Volumetric::getAtmosphereVolume(), eve::graphics::Volumetric::getInvViewProj(), injectToFroxel(), eve::InvalidArgument , 以及 volume.

◆ integrateBeam()

Result< FogRayResult > eve::graphics::fog::FogSystem::integrateBeam ( const AnalyticBeam &  beam,
const glm::vec3 &  origin,
const glm::vec3 &  direction,
float  sceneDepth,
float  mediumDensity 
) const

Analytic beam integration using the active quality segment count.

在文件 FogSystem.cpp 第 184 行定义.

引用了 budget(), eve::graphics::fog::budgetFor(), direction, eve::graphics::fog::AnalyticalVolLight::integrate(), origin , 以及 eve::graphics::fog::FogQualityBudget::volLightSegments.

◆ interactor() [1/2]

const FogInteractor & eve::graphics::fog::FogSystem::interactor ( ) const
inlinenoexcept

Interactor.

在文件 FogSystem.h 第 76 行定义.

◆ interactor() [2/2]

FogInteractor & eve::graphics::fog::FogSystem::interactor ( )
inlinenoexcept

Interactor.

在文件 FogSystem.h 第 74 行定义.

◆ marchRay()

Result< FogRayResult > eve::graphics::fog::FogSystem::marchRay ( const glm::vec3 &  origin,
const glm::vec3 &  direction,
const FogVolumeBound &  bound,
const glm::vec3 &  lightDir,
const glm::vec3 &  lightColor,
float  lightIntensity,
const glm::vec3 &  skyAmbient,
const glm::vec3 &  groundAmbient,
float  sceneDepth 
) const

◆ profile() [1/2]

const FogProfile & eve::graphics::fog::FogSystem::profile ( ) const
inlinenoexcept

Profile.

在文件 FogSystem.h 第 64 行定义.

◆ profile() [2/2]

FogProfile & eve::graphics::fog::FogSystem::profile ( )
inlinenoexcept

Profile.

在文件 FogSystem.h 第 62 行定义.

◆ quality()

FogQuality eve::graphics::fog::FogSystem::quality ( ) const
inlinenoexcept

Quality.

在文件 FogSystem.h 第 49 行定义.

被这些函数引用 setQuality().

◆ renderToFroxel()

◆ seedHeightFog()

Result< void > eve::graphics::fog::FogSystem::seedHeightFog ( float  baseDensity,
float  baseHeight,
float  falloff,
float  curlScale,
std::uint32_t  seed = 1u 
)

◆ setQuality()

Result< void > eve::graphics::fog::FogSystem::setQuality ( FogQuality  quality)

Select Fast / Enhanced / PhysicalReference and invalidate caches.

在文件 FogSystem.cpp 第 15 行定义.

引用了 eve::graphics::fog::BeerLightCache::invalidate(), quality() , 以及 eve::Result< T >::success().

◆ simulationTime()

float eve::graphics::fog::FogSystem::simulationTime ( ) const
inlinenoexcept

Simulation time.

在文件 FogSystem.h 第 53 行定义.

◆ stepSimulation()

Result< FogCflReport > eve::graphics::fog::FogSystem::stepSimulation ( float  dt)

Advance wind + MAC fluid by wall-clock dt (fixed substeps inside).

在文件 FogSystem.cpp 第 41 行定义.

引用了 eve::Result< T >::failure(), eve::graphics::fog::BeerLightCache::invalidate(), eve::graphics::fog::MacFluidGrid::pushDensity() , 以及 eve::graphics::fog::MacFluidGrid::step().

◆ stylize()

ContinuousArtOutput eve::graphics::fog::FogSystem::stylize ( const FogRayResult &  physical,
float  viewZ,
float  neighborOpacity = 0.f 
) const
noexcept

Apply ContinuousArt to a physical ray result.

在文件 FogSystem.cpp 第 197 行定义.

◆ syncToVolumetric()

Result< int > eve::graphics::fog::FogSystem::syncToVolumetric ( Volumetric *  volumetric,
const glm::vec3 &  lightDir,
const glm::vec3 &  lightColor,
float  intensity 
)

Map the live density field into a Volumetric froxel grid and integrate lighting. Resizes the atlas to the quality budget and replaces prior media. Prefer injectToVolumetric when the caller already injected frustum height fog. Caller still owns uploadFroxel / applyFroxel. Uses the Volumetric camera matrix.

参数
volumetricBorrowed for the call; not retained. @ownership Borrowed Volumetric; FogSystem does not take ownership. @lifetime Valid only for this call; do not retain across frames via this argument. @thread Simulation / render thread that owns both objects. @reentrancy Not reentrant; invokes no script callbacks.

在文件 FogSystem.cpp 第 137 行定义.

引用了 eve::graphics::fog::FogQualityBudget::beerLightCache, eve::graphics::fog::FogDensityField::bounds(), budget(), eve::graphics::fog::budgetFor(), eve::graphics::Volumetric::configureFroxelGrid(), ensureBeerCache(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::graphics::fog::FogQualityBudget::froxelDepth, eve::graphics::fog::FogQualityBudget::froxelHeight, eve::graphics::fog::FogQualityBudget::froxelWidth, eve::graphics::Volumetric::getAtmosphereVolume(), eve::graphics::Volumetric::getInvViewProj(), eve::graphics::fog::FogFroxelBridge::inject(), eve::graphics::fog::FogFroxelBridge::integrate(), eve::InvalidArgument, invViewProj, lightColor, lightDir, eve::graphics::fog::FogQualityBudget::occupancySkip, eve::graphics::fog::FogWorldBounds::size(), eve::graphics::fog::BeerLightCache::valid() , 以及 volume.

◆ wind() [1/2]

const SceneWind & eve::graphics::fog::FogSystem::wind ( ) const
inlinenoexcept

Wind.

在文件 FogSystem.h 第 68 行定义.

◆ wind() [2/2]

SceneWind & eve::graphics::fog::FogSystem::wind ( )
inlinenoexcept

Wind.

在文件 FogSystem.h 第 66 行定义.


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