Draws surface-droplet cap instances through the engine 3D backend. 更多...
#include <SurfaceFluidSceneRenderer.h>
Public 成员函数 | |
| SurfaceFluidSceneRenderer (graphics::Graphics *graphics) | |
| Surface fluid scene renderer. | |
| void | draw (const SurfaceFluidRenderData &renderData, const glm::vec4 &tint=glm::vec4(0.72f, 0.88f, 0.96f, 0.78f)) |
| Draw all attached droplet caps into an already-open 3D frame. | |
| int | getDrawCount () const |
| Returns the draw count. | |
静态 Public 成员函数 | |
| static glm::mat4 | modelMatrix (const SurfaceDropletRenderInstance &instance) |
| Build a unit-sphere model matrix whose lower pole touches the surface. | |
详细描述
Draws surface-droplet cap instances through the engine 3D backend.
The renderer is backend-neutral at its public boundary and uses Graphics' sphere mesh + PBR path. On Vulkan this writes regular scene depth and receives environment lighting; WebGPU consumes the same transforms through its standard path.
在文件 SurfaceFluidSceneRenderer.h 第 23 行定义.
构造及析构函数说明
◆ SurfaceFluidSceneRenderer()
|
explicit |
Surface fluid scene renderer.
- 参数
-
graphics initialized graphics backend; it must outlive this object.
在文件 SurfaceFluidSceneRenderer.cpp 第 10 行定义.
成员函数说明
◆ draw()
| void eve::fluids::SurfaceFluidSceneRenderer::draw | ( | const SurfaceFluidRenderData & | renderData, |
| const glm::vec4 & | tint = glm::vec4(0.72f, 0.88f, 0.96f, 0.78f) |
||
| ) |
Draw all attached droplet caps into an already-open 3D frame.
- 参数
-
renderData oriented cap instances generated for the current pose. tint linear water tint; alpha is forwarded to the mesh material.
在文件 SurfaceFluidSceneRenderer.cpp 第 23 行定义.
引用了 eve::graphics::Graphics::drawMesh(), eve::fluids::SurfaceFluidRenderData::droplets(), eve::fluids::SurfaceFluidRenderData::evaluateMaterial(), material, modelMatrix(), eve::graphics::Graphics::newMeshSphere(), eve::graphics::Graphics::setMesh3DMaterial() , 以及 tint.
◆ getDrawCount()
|
inline |
Returns the draw count.
- 返回
- number of caps submitted by the most recent draw call.
在文件 SurfaceFluidSceneRenderer.h 第 39 行定义.
◆ modelMatrix()
|
static |
Build a unit-sphere model matrix whose lower pole touches the surface.
在文件 SurfaceFluidSceneRenderer.cpp 第 13 行定义.
引用了 eve::fluids::SurfaceDropletRenderInstance::capHeight, eve::fluids::SurfaceDropletRenderInstance::majorAxis, eve::fluids::SurfaceDropletRenderInstance::minorAxis, model, eve::fluids::SurfaceDropletRenderInstance::normal , 以及 eve::fluids::SurfaceDropletRenderInstance::position.
被这些函数引用 draw().
该类的文档由以下文件生成:
- src/modules/fluids/SurfaceFluidSceneRenderer.h
- src/modules/fluids/SurfaceFluidSceneRenderer.cpp