载入中...
搜索中...
未找到
VegetationAsset.h
浏览该文件的文档.
1#pragma once
2#include <cstdint>
3#include <memory>
4#include "common/Result.h"
5
6namespace eve {
7class AssetRef;
8}
9namespace eve::asset {
10struct CanonicalMeshData;
11struct CanonicalMeshLimits;
12struct EvpackCapabilities;
13class EvpackResourceReader;
14} // namespace eve::asset
15namespace eve::graphics {
16class Graphics;
17class Mesh;
18class VegetationField;
19struct VegetationMotion;
20struct VegetationGeometry;
21} // namespace eve::graphics
22namespace eve::asset_graphics {
28public:
36 [[nodiscard]] static Result<std::unique_ptr<VegetationAsset>> fromCanonical(const asset::CanonicalMeshData& mesh);
41 [[nodiscard]] static Result<std::unique_ptr<VegetationAsset>> load(const asset::EvpackResourceReader& reader,
42 const AssetRef& ref,
43 const asset::EvpackCapabilities& capabilities,
46 std::uint32_t vertexCount() const noexcept;
50 [[nodiscard]] Result<graphics::VegetationGeometry> evaluate(const graphics::VegetationField& field,
51 const graphics::VegetationMotion& motion) const;
56 [[nodiscard]] Result<graphics::Mesh*> createMesh(graphics::Graphics& graphics,
57 const graphics::VegetationField& field,
58 const graphics::VegetationMotion& motion) const;
65 [[nodiscard]] Result<graphics::Mesh*> createGpuFieldMesh(graphics::Graphics& graphics) const;
71 [[nodiscard]] Result<void> updateMesh(graphics::Graphics& graphics, graphics::Mesh& mesh,
72 const graphics::VegetationField& field,
73 const graphics::VegetationMotion& motion) const;
74
75private:
76 struct Impl;
77 explicit VegetationAsset(std::unique_ptr<Impl> impl);
78 std::unique_ptr<Impl> impl_;
79};
80} // namespace eve::asset_graphics
void * impl
#define EVENGINE_API_WORLD
Definition Export.h:109
std::uint32_t vertexCount
Mesh * mesh
Move-only, checked operation results for the common layer.
const AssetImportLimits & limits
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 decoded TVE rest geometry, independent of archive and GPU resource lifetimes....
VegetationAsset(const VegetationAsset &)=delete
VegetationAsset & operator=(const VegetationAsset &)=delete
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
Owning CPU mesh snapshot; UV arrays are packed ST pairs indexed by source set number....
Allocation limits checked before decoding any vertex arrays. UV count is byte-budget bounded.
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92