载入中...
搜索中...
未找到
eve::fluids::SurfaceFluidSceneRenderer类 参考

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()

eve::fluids::SurfaceFluidSceneRenderer::SurfaceFluidSceneRenderer ( graphics::Graphics *  graphics)
explicit

Surface fluid scene renderer.

参数
graphicsinitialized 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.

参数
renderDataoriented cap instances generated for the current pose.
tintlinear 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()

int eve::fluids::SurfaceFluidSceneRenderer::getDrawCount ( ) const
inline

Returns the draw count.

返回
number of caps submitted by the most recent draw call.

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

◆ modelMatrix()

glm::mat4 eve::fluids::SurfaceFluidSceneRenderer::modelMatrix ( const SurfaceDropletRenderInstance &  instance)
static

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