Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
UIBindings.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
14#pragma once
15
16#include <unordered_map>
17#include "../core/Types.hpp"
18
19namespace esengine {
20
21namespace ecs {
22 class Registry;
23}
24
29bool uiLayout_update(ecs::Registry& registry, f32 boxLeft, f32 boxBottom, f32 boxRight, f32 boxTop,
30 bool propertyDirty);
31
36void uiHitTest_update(ecs::Registry& registry,
37 f32 originX, f32 originY, f32 originZ,
38 f32 dirX, f32 dirY, f32 dirZ);
48 f32 worldOriginX, f32 worldOriginY, f32 worldOriginZ,
49 f32 worldDirX, f32 worldDirY, f32 worldDirZ,
50 f32 screenOriginX, f32 screenOriginY, f32 screenOriginZ,
51 f32 screenDirX, f32 screenDirY, f32 screenDirZ);
54u32 uiHitTest_pick(ecs::Registry& registry, f32 worldX, f32 worldY);
55u32 uiHitTest_pickAll(ecs::Registry& registry, f32 worldX, f32 worldY);
57
60f32 uiNode_computedWidth(ecs::Registry& registry, u32 entity);
62
65const std::unordered_map<u32, i32>* uiTreeLayers();
66
69i32 ui_getRenderOrder(ecs::Registry& registry, u32 entity);
71u32 ui_getCullBit(ecs::Registry& registry, u32 entity);
79bool ui_isScreenDomain(ecs::Registry& registry, u32 entity);
80
81
83bool getUINodeHiddenInTree(ecs::Registry& registry, u32 entity);
85f32 getUINodeAlphaInTree(ecs::Registry& registry, u32 entity);
88
90void transform_update(ecs::Registry& registry);
91
94bool transform_copyFlatRenderMatrix(ecs::Registry& registry, u32 entity, uintptr_t outputPtr);
95
96} // namespace esengine
Core type definitions and utilities for ESEngine.
Central container for all entities and components.
Definition Registry.hpp:73
void transform_update(ecs::Registry &registry)
f32 getUINodeAlphaInTree(ecs::Registry &registry, u32 entity)
f32 uiNode_computedWidth(ecs::Registry &r, u32 e)
void uiRenderOrder_update(ecs::Registry &registry)
u32 uiHitTest_pickAll(ecs::Registry &registry, f32 worldX, f32 worldY)
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
u32 uiHitTest_pick(ecs::Registry &registry, f32 worldX, f32 worldY)
bool ui_isScreenDomain(ecs::Registry &registry, u32 entity)
Whether entity belongs to the SCREEN rather than to the world.
f32 uiNode_computedHeight(ecs::Registry &r, u32 e)
bool transform_copyFlatRenderMatrix(ecs::Registry &registry, u32 entity, uintptr_t outputPtr)
f32 getUINodeComputedWidth(ecs::Registry &registry, u32 entity)
void uiHitTest_update(ecs::Registry &registry, f32 originX, f32 originY, f32 originZ, f32 dirX, f32 dirY, f32 dirZ)
void uiHitTest_updateDomains(ecs::Registry &registry, f32 worldOriginX, f32 worldOriginY, f32 worldOriginZ, f32 worldDirX, f32 worldDirY, f32 worldDirZ, f32 screenOriginX, f32 screenOriginY, f32 screenOriginZ, f32 screenDirX, f32 screenDirY, f32 screenDirZ)
The hit test with a ray per domain — world content and world-space UI answer the first,...
u32 uiHitTest_pickResult(u32 index)
bool uiLayout_update(ecs::Registry &registry, f32 boxLeft, f32 boxBottom, f32 boxRight, f32 boxTop, bool propertyDirty)
const std::unordered_map< u32, i32 > * uiTreeLayers()
u32 uiHitTest_getHitEntity()
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
f32 getUINodeComputedHeight(ecs::Registry &registry, u32 entity)
bool getUINodeHiddenInTree(ecs::Registry &registry, u32 entity)
bool uiHitTest_inputsChanged(ecs::Registry &registry)
i32 ui_getRenderOrder(ecs::Registry &registry, u32 entity)
u32 ui_getCullBit(ecs::Registry &registry, u32 entity)
float f32
32-bit floating point
Definition Types.hpp:59