载入中...
搜索中...
未找到
EvpackStaticPrefab.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <array>
6#include <cstdint>
7#include <memory>
8#include <vector>
10
11namespace eve::asset {
12class EvpackResourceReader;
13struct EvpackCapabilities;
14} // namespace eve::asset
15namespace eve::graphics {
16class Graphics;
17class IMeshResourceFactory;
18class IImageResourceFactory;
19} // namespace eve::graphics
20
21namespace eve::asset_graphics {
24 std::array<float, 16> localTransform{};
25 std::uint32_t meshId = 0xffffffffu, materialId = 0xffffffffu, flags = 0x7u, lodGroupId = 0xffffffffu;
26};
35public:
46 [[nodiscard]] static Result<std::unique_ptr<EvpackStaticPrefab>> load(
48 graphics::IImageResourceFactory& images, const AssetRef& asset, const asset::EvpackCapabilities& capabilities);
50 [[nodiscard]] std::size_t drawCount() const noexcept;
56 [[nodiscard]] Result<std::vector<StaticPrefabGpuPart>> prepareGpuDriven(graphics::Graphics& graphics);
66 [[nodiscard]] Result<void> draw(graphics::Graphics& graphics, const std::array<float, 16>& transform,
67 const std::array<float, 16>& cameraView) const;
76 [[nodiscard]] Result<void> drawShadow(graphics::Graphics& graphics,
77 const std::array<float, 16>& transform,
78 const std::array<float, 16>& lightViewProjection) const;
82 [[nodiscard]] Result<void> release();
83
84private:
85 struct Impl;
86 explicit EvpackStaticPrefab(std::unique_ptr<Impl> impl);
87 std::unique_ptr<Impl> impl_;
88};
89} // namespace eve::asset_graphics
void * impl
#define EVENGINE_API_WORLD
Definition Export.h:109
MeshVfxBatchedDraw draw
std::function< eve::Result< void >()> release
Definition Procgen.cpp:86
Strong asset, definition, object and generic resource references.
Stable asset identity backed by PersistentId.
Definition ResourceRef.h:53
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Immutable reader retaining an admitted pack by shared ownership.
Owning static-prefab GPU leases and immutable draw transforms; no ECS or Scene mutation....
EvpackStaticPrefab & operator=(const EvpackStaticPrefab &)=delete
EvpackStaticPrefab(const EvpackStaticPrefab &)=delete
Backend-owned RGBA8 texture upload and release operations.
Backend-owned mesh upload and release operations.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
One prefab renderer registered in backend GPU-driven tables.