Fluids module — factory + script binding. 更多...
#include <Fluids.h>
Public 成员函数 | |
| Module_REG (Fluids) | |
| Fluids () | |
| Fluids. | |
| ~Fluids () override | |
| Fluids. | |
| Fluids (const Fluids &)=delete | |
| Fluids & | operator= (const Fluids &)=delete |
| Fluids (Fluids &&)=default | |
| Fluids. | |
| Fluids & | operator= (Fluids &&)=default |
| Operator =. | |
| FluidSimulator * | newSimulator (int maxParticles=8192) |
| Create a surface fluid simulator. | |
| FluidSurfaceRenderer * | newSurfaceRenderer (int width=160, int height=160) |
| Create a screen-space fluid renderer. | |
| ShallowWaterField * | newShallowWater (int resolutionX=64, int resolutionZ=64, float cellSize=0.25f, bool preferGpu=true) |
| Create a shallow-water free-surface field (CPU reference + optional GPU). | |
| int | getSimulatorCount () const |
| Returns the simulator count. | |
| int | getRendererCount () const |
| Returns the renderer count. | |
| int | getShallowWaterCount () const |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
构造及析构函数说明
◆ Fluids() [1/3]
|
default |
◆ ~Fluids()
|
overridedefault |
◆ Fluids() [2/3]
◆ Fluids() [3/3]
成员函数说明
◆ getRendererCount()
| int eve::fluids::Fluids::getRendererCount | ( | ) | const |
Returns the renderer count.
- 返回
- number of live renderers owned by the module.
在文件 Fluids.cpp 第 425 行定义.
◆ getShallowWaterCount()
| int eve::fluids::Fluids::getShallowWaterCount | ( | ) | const |
- 返回
- number of live shallow-water fields owned by the module.
在文件 Fluids.cpp 第 441 行定义.
◆ getSimulatorCount()
| int eve::fluids::Fluids::getSimulatorCount | ( | ) | const |
Returns the simulator count.
- 返回
- number of live simulators owned by the module.
在文件 Fluids.cpp 第 413 行定义.
◆ Module_REG()
| eve::fluids::Fluids::Module_REG | ( | Fluids | ) |
◆ newShallowWater()
| ShallowWaterField * eve::fluids::Fluids::newShallowWater | ( | int | resolutionX = 64, |
| int | resolutionZ = 64, |
||
| float | cellSize = 0.25f, |
||
| bool | preferGpu = true |
||
| ) |
Create a shallow-water free-surface field (CPU reference + optional GPU).
- 参数
-
resolutionX Grid resolution along world X in [8, 512]. resolutionZ Grid resolution along world Z in [8, 512]. cellSize Cell edge length in meters. preferGpu Prefer the gpgpu Saint-Venant kernels when available.
- 返回
- Module-owned field, or null when settings are invalid. @ownership The Fluids module owns the returned field until the module is destroyed. @lifetime Valid until Fluids destruction; callers must not delete the pointer. @thread Graphics/device owner thread for GPU path.
在文件 Fluids.cpp 第 427 行定义.
引用了 eve::fluids::ShallowWaterField::create(), created, eve::fluids::ocean_codec::field(), raw, eve::fluids::ShallowWaterSettings::resolutionX , 以及 settings.
◆ newSimulator()
| FluidSimulator * eve::fluids::Fluids::newSimulator | ( | int | maxParticles = 8192 | ) |
Create a surface fluid simulator.
- 参数
-
maxParticles particle buffer capacity.
- 返回
- simulator owned by the module.
在文件 Fluids.cpp 第 406 行定义.
引用了 raw , 以及 eve::fluids::ocean_script::vector().
◆ newSurfaceRenderer()
| FluidSurfaceRenderer * eve::fluids::Fluids::newSurfaceRenderer | ( | int | width = 160, |
| int | height = 160 |
||
| ) |
Create a screen-space fluid renderer.
- 参数
-
width target width in pixels. height target height in pixels.
- 返回
- renderer owned by the module.
Creates the shared screen-space fluid renderer.
Dimensions are clamped to [8,1024] to bound CPU scratch storage, Vulkan buffers and synchronous readback cost. Owned by this module.
在文件 Fluids.cpp 第 415 行定义.
引用了 height, params, r, raw, width , 以及 eve::fluids::FluidSurfaceParams::width.
◆ operator=() [1/2]
◆ operator=() [2/2]
该类的文档由以下文件生成:
- src/modules/fluids/Fluids.h
- src/modules/fluids/Fluids.cpp
Public 成员函数 继承自