Drawable base (textures, meshes, canvases). 更多...
#include <Drawable.h>
Public 成员函数 | |
| virtual | ~Drawable () |
| Releases Drawable resources. | |
| virtual void | draw (Graphics *gfx, const glm::mat4 &matrix) const =0 |
| Draws the object with the specified transformation matrix. | |
| bool | getCastOcclusion () const |
| When false, skipped by Graphics::drawOcclusion / volumetric occluder passes. | |
| void | setCastOcclusion (bool cast) |
| Sets the cast occlusion. | |
| virtual void | drawOcclusion (Graphics *gfx, const glm::mat4 &matrix) const |
| Draw as an opaque black silhouette for volumetric occlusion maps (screen-space god rays / light shafts). Default is a no-op; Texture / Mesh override with 2D black rects (alpha preserved for textures). | |
详细描述
Drawable base (textures, meshes, canvases).
Occlusion follows the same idea as mesh shadow casting: a drawable may contribute a black silhouette to a volumetric light occlusion map via drawOcclusion(). Defaults to casting occlusion (opt-out with setCastOcclusion).
在文件 Drawable.h 第 18 行定义.
构造及析构函数说明
◆ ~Drawable()
|
inlinevirtual |
Releases Drawable resources.
在文件 Drawable.h 第 21 行定义.
成员函数说明
◆ draw()
|
pure virtual |
Draws the object with the specified transformation matrix.
- 参数
-
gfx Borrowed graphics backend for the draw. matrix Column-major model transform; borrowed for the call only.
在 eve::graphics::vulkan::OffscreenCanvas, eve::graphics::webgpu::OffscreenCanvas, eve::graphics::vulkan::Graphics, eve::graphics::webgpu::Graphics, eve::graphics::Mesh, eve::graphics::Texture , 以及 eve::graphics::Canvas 内被实现.
被这些函数引用 eve::graphics::Graphics::draw().
◆ drawOcclusion()
|
inlinevirtual |
Draw as an opaque black silhouette for volumetric occlusion maps (screen-space god rays / light shafts). Default is a no-op; Texture / Mesh override with 2D black rects (alpha preserved for textures).
被 eve::graphics::Mesh , 以及 eve::graphics::Texture 重载.
在文件 Drawable.h 第 40 行定义.
引用了 matrix.
◆ getCastOcclusion()
|
inline |
When false, skipped by Graphics::drawOcclusion / volumetric occluder passes.
在文件 Drawable.h 第 31 行定义.
被这些函数引用 eve::graphics::Graphics::drawOcclusion(), eve::graphics::Mesh::drawOcclusion(), eve::graphics::Texture::drawOcclusion() , 以及 eve::graphics::exposeGraphicsMeshes().
◆ setCastOcclusion()
|
inline |
该类的文档由以下文件生成:
- src/modules/graphics/Drawable.h