卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局参数。 数据模型与渲染/交互逻辑见 CardTypes.h。 更多...
命名空间 | |
| namespace | grass |
| t3ssel8r-style stylized grass. | |
| namespace | hair |
| Built-in Kajiya-Kay hair/fur card shader helpers. | |
| namespace | vulkan |
| namespace | webgpu |
类 | |
| class | AmbientOcclusion |
| Screen-space ambient occlusion. 更多... | |
| class | AntiAliasing |
| Classic image-space anti-aliasing. 更多... | |
| class | Batcher |
| Accumulates solid / textured quads in logical (Y-down) coordinates. Used by RenderSystem; not a public script API. 更多... | |
| struct | BatchVertex |
| CPU-side vertex for 2D batching (logical or NDC depending on stage). 更多... | |
| class | Camera |
| 2D/3D 摄像机基类:持有变换栈并暴露投影矩阵。 更多... | |
| class | Camera2D |
| Declarative 2D camera (viewport center + zoom). 更多... | |
| class | Camera3D |
| class | Canvas |
| struct | ClusteredLightConfig |
| Clustered forward grid (CPU assign, GPU consume). 更多... | |
| struct | ClusteredLightingUpload |
| CPU-built clustered lighting upload for one frame/camera. Point lights are clustered; directional lights become the primary dir (first by intensity). 更多... | |
| struct | ClusterTableEntry |
| class | Drawable |
| Drawable base (textures, meshes, canvases). 更多... | |
| struct | DrawItem2D |
| Shared 2D draw queue item (sprites + tiles). 更多... | |
| class | Font |
GPU-side font: wraps a decoded font::FontData and rasterizes a fixed set of codepoints into a single RGBA8 glyph atlas texture up front, so Graphics::print() can draw text with plain textured-quad draws. 更多... | |
| struct | FrameDrawList3D |
| Double-buffered per-frame draw list written by the prep jobs and only read by the render thread. Vectors keep their capacity across frames, so the steady state does not allocate per frame. 更多... | |
| class | GBuffer |
| Screen-space buffers for mid/post effects (AO, fog, stylize outline, …). 更多... | |
| class | GlobalIllumination |
| Screen-space single-bounce GI (SSGI). 更多... | |
| class | Graphics |
| class | GrassField |
| Dense grass + sparse dark tufts on a mesh. Caller owns GrassField*; GPU Mesh / Shader / Texture are owned by Graphics. 更多... | |
| class | IGraphics2D |
| 2D immediate-mode drawing surface (screen or offscreen Canvas). 更多... | |
| class | IGraphics3D |
| 3D frame / mesh / light / shadow rendering surface. 更多... | |
| class | IPostFX |
| Post-process / special-effect object factory. 更多... | |
| class | IResourceFactory |
| Texture / mesh / shader / canvas creation and release. 更多... | |
| class | Light2D |
| Declarative 2D light. Collected by RenderSystem (max 8 per canvas/frame). type: "point" | "dir" (≤15 chars). 更多... | |
| struct | Light2DGpu |
| GPU light packing for lit2d (std140-friendly). 更多... | |
| class | Light3D |
| Declarative 3D light. Collected by RenderSystem3D (max 8 per frame). type: "point" | "dir" (≤15 chars). 更多... | |
| struct | Light3DGpu |
| GPU light packing for mesh3d / PBR (std140-friendly). 更多... | |
| struct | Lighting2DUBO |
| struct | Lighting3DPack |
| class | Material |
| Packages shading method + surface parameters into one attachable asset. 更多... | |
| class | Mesh |
| GPU mesh handle (+ optional CPU morph targets). 更多... | |
| struct | ModelPart |
| One mesh + material slot on a multi-part model (Assimp mesh / body region). When Material* is null, the owning Renderable3D MeshRenderer fields are used. 更多... | |
| class | Outline |
| Screen-space model outline (t3ssel8r-style), computed from the GBuffer hardware depth + world-normal buffers. 更多... | |
| struct | ParallaxParams |
| CPU reference for simple offset parallax (matches the scale / height convention of parallax_map.glsl POM; used by unit tests, not the GPU path). 更多... | |
| class | Quad |
| Pixel-space sub-rectangle of a Texture (atlas cell / sprite frame). UV conversion uses the texture's logical width/height. 更多... | |
| class | Renderable2D |
| Default renderable entity for declarative 2D sprites / solid quads. 更多... | |
| class | Renderable3D |
| class | RenderControl |
| Declarative, compilable 3D render control. 更多... | |
| struct | RenderItem3D |
| One resolved 3D draw, produced by the frame data prep jobs. 更多... | |
| class | RenderSystem |
| Walks ECS Renderable2D views and draws via Graphics batch path. 更多... | |
| class | RenderSystem3D |
| class | ScreenSpaceReflection |
| Screen-space reflections (SSR) as a fullscreen post pass. 更多... | |
| class | Shader |
| Custom GPU program. 更多... | |
| struct | ShadowConfig |
| struct | ShadowUBO |
| Per-frame / per-draw CSM constants (std140). Binding separate from Mesh3D Frame UBO. 更多... | |
| struct | ShadowUpload |
| struct | TexCellBombParams |
| CPU reference for texture cell-bombing math (matches tex_cell_bomb.glsl). Used by unit tests; the GPU path lives in mesh3d*.frag. 更多... | |
| class | Texture |
| GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle. 更多... | |
| struct | TextureCreateInfo |
| Options for Graphics::newTexture / newCubemap. When generateMipmaps is true and sampler.mipmap is Disabled, mipmap mode becomes Linear. 更多... | |
| struct | TextureSampler |
| Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine behaviour: linear, clamp, no mips, no aniso. 更多... | |
| class | Transform |
| 矩阵变换栈(2D/3D):旋转/缩放/平移 + push/pop。 更多... | |
| class | Volumetric |
| Volumetric light + fog. 更多... | |
| class | Water |
| Dynamic water surface with sky reflection and animated ripples. 更多... | |
| class | Waterfall |
| Flowing waterfall (falling water sheet) rendered on a vertical plane. 更多... | |
类型定义 | |
| using | ClusteredLightGpu = Light3DGpu |
| using | Color = glm::vec4 |
| RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics header cannot pollute the global namespace. Kept in its own tiny header so modules that only need the color type (e.g. map, particles) do not have to include Canvas.h. | |
枚举 | |
| enum class | BlendMode { Alpha = 0 , Additive = 1 , Opaque = 2 } |
| 2D quad blend mode (drawn in draw order within a layer). 更多... | |
| enum class | FilterMode { Nearest , Linear } |
| Mag/min filter for texture sampling. 更多... | |
| enum class | MipmapMode { Disabled , Nearest , Linear } |
| Mipmap filter; Disabled turns off mip sampling (maxLod clamped to 0). 更多... | |
函数 | |
| glm::mat4 | perspectiveVulkanRH_ZO (float fovyRad, float aspect, float zNear, float zFar) |
| Right-handed, zero-to-one depth perspective for Vulkan swapchains. | |
| glm::mat4 | orthoVulkanRH_ZO (float left, float right, float bottom, float top, float zNear, float zFar) |
| ClusteredLightingUpload | buildClusteredLighting (const std::vector< ClusteredLightGpu > &points, const std::vector< ClusteredLightGpu > &dirs, const glm::mat4 &view, float nearZ, float farZ, int screenW, int screenH, float fovYRad, const glm::vec4 &ambient) |
| Build clustered tables for point lights in view space. | |
| void | sortDrawItems2D (std::vector< DrawItem2D > &items) |
| uint32_t | nextCodepointUtf8 (const std::string &text, size_t &i) |
Decodes one UTF-8 codepoint from text starting at byte offset i, advancing i past it. Returns 0 at end of string; invalid/truncated sequences decode as U+FFFD and advance by one byte. | |
| Module_IMPL (Graphics, new vulkan::Graphics()) | |
| void | registerGraphicsCapabilities () |
| void | parallaxOffsetUV (float u, float v, float height01, float viewTSx, float viewTSy, float viewTSz, float scale, float &ou, float &ov) |
| Single-sample offset mapping (cheap approximation of the first POM step). | |
| void | clampParallaxParams (ParallaxParams &p) |
| ShadowUpload | buildDirectionalCSM (const glm::vec3 &lightDirTowardSurface, const glm::vec3 &eye, const glm::vec3 &target, const glm::vec3 &up, float fovYRad, float aspect, float nearZ, float farZ, float bias, float strength) |
| Build 3 cascade light view-proj matrices for a directional light. | |
| void | texBombHash22 (float x, float y, float &ox, float &oy) |
| void | texCellBombSampleUV (float u, float v, const TexCellBombParams &p, float &ou, float &ov) |
| Map UV → bombed sample UV for the dominant (floor) cell; strength≤0 → identity. | |
| int | mipmapCountForSize (int width, int height) |
| Full mip chain count for a 2D image (including base level). | |
| Shader * | newWaterShader (Graphics *gfx) |
| Create the embedded water fragment shader (owned by Graphics). | |
| Shader * | newWaterfallShader (Graphics *gfx) |
| Create the embedded waterfall fragment shader (owned by Graphics). | |
详细描述
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局参数。 数据模型与渲染/交互逻辑见 CardTypes.h。
卡牌游戏 UI 工具模块:数据模型与渲染/交互逻辑(功能参考 ycarowr/UiCard)。 模块入口 eve.Card() 见 Card.h;本文件是 CardData/Deck/Zone/Hand 等 ECS 实体与布局渲染实现。
类型定义说明
◆ ClusteredLightGpu
| using eve::graphics::ClusteredLightGpu = typedef Light3DGpu |
在文件 ClusteredLight.h 第 21 行定义.
◆ Color
| using eve::graphics::Color = typedef glm::vec4 |
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics header cannot pollute the global namespace. Kept in its own tiny header so modules that only need the color type (e.g. map, particles) do not have to include Canvas.h.
枚举类型说明
◆ BlendMode
|
strong |
2D quad blend mode (drawn in draw order within a layer).
| 枚举值 | |
|---|---|
| Alpha | |
| Additive | |
| Opaque | |
在文件 BlendMode.h 第 6 行定义.
◆ FilterMode
|
strong |
◆ MipmapMode
|
strong |
Mipmap filter; Disabled turns off mip sampling (maxLod clamped to 0).
| 枚举值 | |
|---|---|
| Disabled | |
| Nearest | |
| Linear | |
在文件 TextureSampler.h 第 17 行定义.
函数说明
◆ buildClusteredLighting()
| ClusteredLightingUpload eve::graphics::buildClusteredLighting | ( | const std::vector< ClusteredLightGpu > & | points, |
| const std::vector< ClusteredLightGpu > & | dirs, | ||
| const glm::mat4 & | view, | ||
| float | nearZ, | ||
| float | farZ, | ||
| int | screenW, | ||
| int | screenH, | ||
| float | fovYRad, | ||
| const glm::vec4 & | ambient | ||
| ) |
Build clustered tables for point lights in view space.
- 参数
-
points world-space point lights (posRadius.w = radius > 0) dirs world-space directional lights (optional; first becomes primary)
在文件 ClusteredLight.cpp 第 9 行定义.
引用了 a, eve::graphics::ClusteredLightingUpload::ambient, b, d, depth, eve::graphics::ClusteredLightConfig::kClusterCount, eve::graphics::ClusteredLightConfig::kMaxLights, eve::graphics::ClusteredLightConfig::kMaxLightsPerCluster, eve::graphics::ClusteredLightConfig::kSlices, eve::graphics::ClusteredLightConfig::kTilesX, eve::graphics::ClusteredLightConfig::kTilesY, points, u, v, view, x , 以及 y.
◆ buildDirectionalCSM()
| ShadowUpload eve::graphics::buildDirectionalCSM | ( | const glm::vec3 & | lightDirTowardSurface, |
| const glm::vec3 & | eye, | ||
| const glm::vec3 & | target, | ||
| const glm::vec3 & | up, | ||
| float | fovYRad, | ||
| float | aspect, | ||
| float | nearZ, | ||
| float | farZ, | ||
| float | bias, | ||
| float | strength | ||
| ) |
Build 3 cascade light view-proj matrices for a directional light.
- 参数
-
lightDirTowardSurface world-space direction toward the surface (same as Light3DGpu) eye / target / up camera basis fovYRad / aspect / nearZ / farZ camera clip Splits are camera-forward (view-space +Z) distances. Shaders must select cascades with the same metric (max(-viewPos.z, 0)), not euclidean eye-to-point length. Camera far is clamped to kMaxDistance so large scenes keep usable texel density.
在文件 Shadow.cpp 第 83 行定义.
引用了 eve::graphics::ShadowUpload::active, eye, f, eve::graphics::ShadowConfig::kCascades, eve::graphics::ShadowConfig::kMaxDistance, eve::graphics::ShadowConfig::kSplitLambda, n , 以及 p.
◆ clampParallaxParams()
|
inline |
在文件 ParallaxMap.h 第 35 行定义.
引用了 p.
◆ mipmapCountForSize()
|
inline |
Full mip chain count for a 2D image (including base level).
在文件 TextureSampler.h 第 119 行定义.
被这些函数引用 eve::graphics::vulkan::Graphics::newCubemap(), eve::graphics::webgpu::Graphics::newCubemap(), eve::graphics::vulkan::Graphics::newTexture(), eve::graphics::webgpu::Graphics::newTexture() , 以及 eve::graphics::vulkan::Graphics::replaceTexturePixels().
◆ Module_IMPL()
| eve::graphics::Module_IMPL | ( | Graphics | , |
| new | vulkan::Graphics() | ||
| ) |
◆ newWaterfallShader()
Create the embedded waterfall fragment shader (owned by Graphics).
在文件 Waterfall.cpp 第 31 行定义.
引用了 eve::graphics::Shader::declareFloat(), eve::graphics::Shader::declareVec3(), frag , 以及 eve::graphics::Graphics::newMeshShaderFromSpv().
◆ newWaterShader()
Create the embedded water fragment shader (owned by Graphics).
引用了 eve::graphics::Shader::declareFloat(), eve::graphics::Shader::declareVec3(), frag , 以及 eve::graphics::Graphics::newMeshShaderFromSpv().
被这些函数引用 eve::graphics::Water::Water().
◆ nextCodepointUtf8()
| uint32_t eve::graphics::nextCodepointUtf8 | ( | const std::string & | text, |
| size_t & | i | ||
| ) |
Decodes one UTF-8 codepoint from text starting at byte offset i, advancing i past it. Returns 0 at end of string; invalid/truncated sequences decode as U+FFFD and advance by one byte.
引用了 s.
被这些函数引用 eve::graphics::Graphics::print().
◆ orthoVulkanRH_ZO()
|
inline |
Matching Y-flip for directional shadow ortho so clip space matches the camera (and mesh pipelines' Clockwise frontFace).
在文件 ClipSpace.h 第 28 行定义.
引用了 p.
◆ parallaxOffsetUV()
|
inline |
◆ perspectiveVulkanRH_ZO()
|
inline |
Right-handed, zero-to-one depth perspective for Vulkan swapchains.
GLM's perspectiveRH_ZO matches Vulkan's Z range but keeps OpenGL's Y-up clip space. Vulkan NDC has Y pointing down (same as our 2D Batcher), so without flipping Y, world +Y appears at the bottom of the framebuffer — models look upside-down. Negating proj[1][1] maps world +Y to screen up.
Side effect: the Y flip reverses screen-space winding, so 3D pipelines that use this projection must declare frontFace = Clockwise (mesh winding stays CCW in RH Y-up object space).
在文件 ClipSpace.h 第 20 行定义.
引用了 p.
被这些函数引用 eve::scene::Scene::collectFrustumIdsAt(), eve::spritestack::SpriteStackBatch::render(), eve::spritestack::SpriteStack3D::render(), eve::graphics::RenderSystem3D::renderToCanvas(), eve::graphics::Camera3D::screenToRay(), eve::graphics::AmbientOcclusion::setCamera(), eve::graphics::GlobalIllumination::setCamera(), eve::graphics::ScreenSpaceReflection::setCamera() , 以及 eve::graphics::Volumetric::setCamera().
◆ registerGraphicsCapabilities()
| void eve::graphics::registerGraphicsCapabilities | ( | ) |
在文件 GraphicsCapabilities.cpp 第 524 行定义.
引用了 impl , 以及 eve::cap::query().
被这些函数引用 eve::graphics::Graphics::Graphics().
◆ sortDrawItems2D()
|
inline |
◆ texBombHash22()
|
inline |
◆ texCellBombSampleUV()
|
inline |