载入中...
搜索中...
未找到
Decal.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Module.h"
6
7#include <cstdint>
8#include <memory>
9#include <string>
10
11namespace eve::graphics {
12class Graphics;
13class Texture;
14} // namespace eve::graphics
15
16namespace eve::decal {
17
30public:
33 Decal();
35 ~Decal() override;
36
38 int project(float x, float y, float z, float nx, float ny, float nz,
39 graphics::Texture *albedo, const std::string &kind, float size, float depth,
40 bool randomYaw, int seed, float fadeIn, float lifetime, float fadeOut);
41
43 bool setStrength(int id, float normalStrength, float roughnessStrength, float metalStrength,
44 float emissiveStrength);
46 bool setUvRect(int id, float x, float y, float w, float h);
48 bool setTextures(int id, graphics::Texture *normal, graphics::Texture *params);
50 bool setBlend(int id, const std::string &mode);
56 [[nodiscard]] DecalProjectionStatus setProjection(int id, const std::string &mode,
57 float blendSharpness);
59 [[nodiscard]] DecalParallaxStatus setParallax(int id, float scale, float minLayers,
60 float maxLayers);
62 [[nodiscard]] DecalEdgeFadeStatus setEdgeFade(int id, float width);
64 bool remove(int id);
66 void clearAll();
68 int count();
70 void setLimit(const std::string &kind, int limit);
72 void update(float dt);
74 void setEnabled(graphics::Graphics *gfx, bool enabled);
75
80 [[nodiscard]] std::string proceduralPresets() const;
81
96 [[nodiscard]] graphics::Texture *bakePresetTexture(graphics::Graphics *gfx,
97 const std::string &preset,
98 std::uint32_t seed, int resolution,
99 const std::string &channel);
100
114 [[nodiscard]] graphics::Texture *bakeSbsprsTexture(graphics::Graphics *gfx,
115 const std::string &xml, int resolution,
116 const std::string &channel);
117
118private:
119 struct ProceduralBakeCache;
120 std::unique_ptr<ProceduralBakeCache> proceduralBakeCache_;
121};
122
125
130
131} // namespace eve::decal
float w
Definition AnimClip.cpp:738
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
float normalStrength
float nx
float nz
float ny
graphics::Texture * albedo
#define EVENGINE_API_WORLD
Definition Export.h:109
int h
std::uint32_t width
TokenKind kind
std::array< float, 3 > scale
Texture * normal
std::weak_ptr< const void > lifetime
std::uint32_t seed
Definition PointSet.cpp:807
std::uint32_t count
int limit
Definition TreeMesh.cpp:164
float size
Definition TreeMesh.cpp:156
std::uint32_t depth
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
Runtime decal module — project surface effects (blood, dirt, scorch, dents via normal maps,...
Definition Decal.h:29
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:18
std::vector< ParamSpec > params
DecalParallaxStatus
Outcome of applying height-driven parallax settings to a live decal.
void unregisterDecalAttackVfxExecutor()
Unregister the AttackVfx Decal layer executor.
void registerDecalCapabilities()
Register the IDecalQuery capability (implemented in DecalCapabilities.cpp).
DecalProjectionStatus
Outcome of DecalManager::setProjection / Decal::setProjection.
void registerDecalAttackVfxExecutor()
Register the AttackVfx Decal layer executor (soft-skips when Graphics is absent).
DecalEdgeFadeStatus
Outcome of changing the projection-volume edge mask width.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
bool enabled