载入中...
搜索中...
未找到
EvpackMeshVfx.h
浏览该文件的文档.
1#pragma once
2#include <array>
3#include <memory>
4#include <string>
5#include <vector>
8
9namespace eve::asset {
10class EvpackResourceReader;
11struct EvpackCapabilities;
12} // namespace eve::asset
13namespace eve::graphics {
14class Graphics;
15class Mesh;
16class Texture;
17} // namespace eve::graphics
18namespace eve::asset_stylize {
26class EvpackMeshVfx final {
27public:
30 EvpackMeshVfx(const EvpackMeshVfx&) = delete;
34 const AssetRef& asset,
35 const asset::EvpackCapabilities& capabilities,
36 graphics::Graphics& graphics);
38 void play() noexcept;
40 [[nodiscard]] Result<void> advance(float dt);
42 [[nodiscard]] Result<void> stop(float fadeOutSeconds = 0.f);
44 [[nodiscard]] Result<void> setFloat(std::size_t layer, std::string_view name, float value);
47 [[nodiscard]] Result<void> draw(graphics::Mesh& mesh, const std::array<float, 16>& transform,
48 OptionalRef<graphics::Texture> texture,
49 const std::array<float, 4>& tint = {1, 1, 1, 1});
52 [[nodiscard]] Result<void> reload(const asset::EvpackResourceReader& reader, const AssetRef& asset,
53 const asset::EvpackCapabilities& capabilities);
55 [[nodiscard]] std::vector<std::string> drainEvents();
56
57private:
58 struct Impl;
59 explicit EvpackMeshVfx(std::unique_ptr<Impl> impl);
60 std::unique_ptr<Impl> impl_;
61};
62} // namespace eve::asset_stylize
double value
Vocabulary aliases for nullable and checked borrowed references.
void * impl
glm::vec4 tint
std::string name
MeshVfxBatchedDraw draw
TileLayer * layer
float f
Mesh * mesh
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 package-backed mesh effect, using the canonical MeshVfxAsset playback and curves....
Result< void > setFloat(std::size_t layer, std::string_view name, float value)
Set one scalar override for one layer; authored curves still own animated parameters on advance.
Result< void > reload(const asset::EvpackResourceReader &reader, const AssetRef &asset, const asset::EvpackCapabilities &capabilities)
Atomically replace only after successful full load. Reapply defaults and restart; failure preserves o...
~EvpackMeshVfx()
Releases EvpackMeshVfx resources.
EvpackMeshVfx & operator=(const EvpackMeshVfx &)=delete
std::vector< std::string > drainEvents()
Drain canonical timeline events; no caller callback is invoked while advancing.
static Result< std::unique_ptr< EvpackMeshVfx > > load(const asset::EvpackResourceReader &reader, const AssetRef &asset, const asset::EvpackCapabilities &capabilities, graphics::Graphics &graphics)
Resolve every layer and validate all candidates before GPU upload; no partial instance is published.
void play() noexcept
Restart the authored playback and reset its curves on the next advance.
Result< void > stop(float fadeOutSeconds=0.f)
Stop with an optional finite nonnegative fade.
Result< void > advance(float dt)
Advance using finite nonnegative seconds; invalid input leaves playback unchanged.
EvpackMeshVfx(const EvpackMeshVfx &)=delete
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92