载入中...
搜索中...
未找到
GraphicsVisibility.h
浏览该文件的文档.
1#pragma once
2
12#include "common/Result.h"
13
14#include <glm/mat4x4.hpp>
15#include <glm/vec4.hpp>
16
17#include <cstdint>
18#include <vector>
19
20namespace eve::image {
21class ImageData;
22}
23
24namespace eve::graphics {
25
26class Mesh;
27
30 Mesh* mesh = nullptr;
31 glm::mat4 model{1.f};
32 glm::vec4 idColor{0.f, 0.f, 0.f, 1.f};
33};
34
37 int width = 0, height = 0;
38 std::vector<std::uint32_t> ids;
39 std::vector<float> depth;
40};
41
47public:
49 virtual ~IVisibilityCapture() = default;
50
56 [[nodiscard]] virtual image::ImageData* renderEntityIdMask(const std::vector<EntityIdDraw>& draws,
57 const glm::mat4& viewProj, int w, int h) = 0;
58
65 [[nodiscard]] virtual eve::Result<VisibilityPixels> captureVisibilityPixels(const std::vector<EntityIdDraw>& draws,
66 const glm::mat4& viewProj, int w,
67 int h) = 0;
68};
69
70} // namespace eve::graphics
float w
Definition AnimClip.cpp:738
int h
glm::mat4 viewProj
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Offscreen entity-ID and isolated visibility capture surface.
virtual ~IVisibilityCapture()=default
Releases IVisibilityCapture resources.
virtual image::ImageData * renderEntityIdMask(const std::vector< EntityIdDraw > &draws, const glm::mat4 &viewProj, int w, int h)=0
Per-pixel mesh entity-ID pass into an offscreen target, then CPU readback. @ownership Result transfer...
virtual eve::Result< VisibilityPixels > captureVisibilityPixels(const std::vector< EntityIdDraw > &draws, const glm::mat4 &viewProj, int w, int h)=0
Render opaque draw IDs and float depth into private targets and wait for readback....
GPU mesh handle (+ optional CPU morph targets).
Definition Mesh.h:26
Represents raw pixel data.
Definition ImageData.h:38
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
One mesh contribution to an entity-ID or visibility capture pass.
Owning isolated raster evidence; depth is Vulkan NDC in [0,1].
std::vector< std::uint32_t > ids