Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs Namespace Reference

Classes

class  ActiveView
class  ComponentMask
 Dynamic bitset for tracking which components an entity has. More...
struct  Billboard
 Turns the MeshRenderer beside it to face each view that draws it. More...
struct  BitmapText
struct  Camera
 Camera component for rendering viewpoints. More...
struct  Canvas
 Canvas component for 2D game resolution management. More...
struct  BoxCollider2D
struct  CircleCollider2D
struct  CapsuleCollider2D
struct  SegmentCollider2D
struct  Active
 Tag component marking an entity as active. More...
struct  Visible
 Tag component marking an entity as visible. More...
struct  Static
 Tag component marking an entity as static (non-moving). More...
struct  MainEntity
 Tag component marking an entity as the main/primary entity. More...
struct  Folder
 Tag component marking an entity as a folder for organization. More...
struct  Name
 Name component for debugging and identification. More...
struct  UUID
 Universally Unique Identifier component. More...
struct  ScriptInstance
 Instance of a script component attached to an entity. More...
struct  Scripts
 Component storing all script instances for an entity. More...
struct  ContentRect
 The rectangle of this entity's content, in its own units. More...
struct  Draggable
struct  DragonBonesAnimation
struct  FlexContainer
struct  GroupOpacity
 Fades an entity and everything under it, the way UINode.opacity fades a UI subtree. More...
struct  Parent
 Parent reference component. More...
struct  Children
 Children list component. More...
struct  Impostor
 Stands a card in for the MeshRenderer beside it once the object covers less than screenSize of the view. More...
struct  Interactable
struct  Light
 A 2D light contributing to Lit-shaded materials. More...
struct  LightProbeVolume
 A box of baked irradiance: the light for what a bake cannot hold still. More...
struct  LODGroup
 Stand-in geometry chosen by how much of the screen the object covers. More...
struct  MeshVertex2D
 One local-space mesh vertex: position, texture coordinate, RGBA8 color. More...
struct  MeshRenderer
struct  MeshSkin
 What deforms a MeshRenderer: the entities its Joints channel indexes. More...
struct  MeshMorph
 What SHAPE a MeshRenderer is in: how far it is blended towards each of the shapes its mesh carries. More...
struct  MeshInstances
 Many placements of the one mesh a MeshRenderer draws, as ONE renderable. More...
struct  MeshLightmap
 Where a MeshRenderer's BAKED light comes from: the atlas, and the rectangle of it this object occupies. More...
struct  Occluder
 Declares a solid box a camera cannot see through. More...
struct  ParticleCollider
struct  ParticleEmitter
struct  ParticleForceField
struct  PlanarReflection
struct  ReflectionProbe
 A box inside which reflections come from a bake rather than from the sky. More...
struct  RigidBody2D
struct  RigidBody3D
 A body in the 3D world. More...
struct  BoxCollider3D
 An axis-aligned box, sized in world units around the entity's origin. More...
struct  SphereCollider3D
struct  CapsuleCollider3D
 An upright capsule — the shape a character is. More...
struct  MeshCollider3D
 Imported geometry, used as it is, for a level to collide against. More...
struct  ConvexCollider3D
 The convex hull of imported geometry — a shape a solver can push. More...
struct  CharacterController3D
 A kinematic mover for a 3D player or NPC. More...
struct  ShadowCaster2D
 A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size is its own, which is how a collider is placed too. More...
struct  ShapeRenderer
struct  SortingGroup
 One sorting identity for an entity and everything under it. More...
struct  SpineAnimation
 Spine skeletal animation component. More...
struct  SpringBone
struct  SpringBoneCollider
 A sphere or capsule a spring chain is kept out of, placed by its entity's transform. More...
struct  Sprite
struct  SpriteMask
 A stencil cut from this entity's own Sprite. More...
struct  TilemapLayer
struct  TrailRenderer
struct  Transform
 Unified transform component. More...
struct  TransformDirty
struct  TransformStatic
struct  UIInteraction
struct  UIMask
struct  UINode
 UINode — the CSS box-model layout input (the CSS/Flex primary layout model). More...
struct  UIScroll
struct  UIVisual
 UIVisual — the single UI visual component, merging the former low-level UIRenderer (what the renderer drew) and high-level Image (Simple/Sliced/Tiled/Filled intent that used to be copied into a UIRenderer each frame). One component authored directly; UIElementPlugin reads it and computes the effective UV inline — the deferred copy is gone. More...
struct  Velocity
 Velocity component for simple kinematic motion. More...
struct  EntityChangeRow
class  EntityChangeJournal
struct  FlatGeometryCollapsed
class  GroupOpacityLookup
 The opacity a draw inherits from the GroupOpacity above it. More...
class  Registry
 Central container for all entities and components. More...
class  ExclusiveRelation
class  SparseSetBase
 Type-erased base class for sparse set operations. More...
class  SparseSet
 Sparse set container for efficient entity-component storage. More...
class  System
 Base class for all ECS systems. More...
class  SystemGroup
 Container for organizing and executing systems. More...
class  TransformSystem
class  ViewIterator
 Iterator for multi-component views. More...
class  View
 View for iterating entities with multiple required components. More...
class  View< T >
 Optimized view for single-component queries. More...
struct  PickRay
struct  LayoutCache
struct  LayoutRect
struct  UITreeOrder
 The draw layer of what a Canvas holds that has no uiOrder of its own: an emitter, a Spine skeleton, and a Sprite with no UINode. More...
struct  UIHitTestResult
 Result of the most recent hit-test pass. More...
class  UISystem
 UI subsystem: owns layout tree + hit-test state. More...
struct  UITree

Typedefs

using ScriptFieldValue
 Value type for script component fields.

Enumerations

enum class  BillboardMode : i32 { ViewPlane = 0 , Upright = 1 }
enum class  TextAlign : u8 { Left , Center , Right }
enum class  BodyType : u8 { Static , Kinematic , Dynamic }
enum class  ProjectionType : u8 { Perspective , Orthographic }
 Camera projection type. More...
enum class  ClearFlags : u8 { Nothing , Color , Depth , ColorAndDepth }
 Camera clear flags. More...
enum class  CanvasScaleMode : u8 {
  FixedWidth , FixedHeight , Expand , Shrink ,
  Match
}
 Canvas scaling mode for different screen resolutions. More...
enum class  FlexDirection : u8 { Row , Column , RowReverse , ColumnReverse }
enum class  FlexWrap : u8 { NoWrap , Wrap }
enum class  JustifyContent : u8 {
  Start , Center , End , SpaceBetween ,
  SpaceAround , SpaceEvenly
}
enum class  AlignItems : u8 { Start , Center , End , Stretch }
enum class  AlignContent : u8 {
  Start , Center , End , Stretch ,
  SpaceBetween , SpaceAround
}
enum class  LightType : i32 { Point = 0 , Directional = 1 , Ambient = 2 , Spot = 3 }
 2D light kind. Point uses the Transform position + radius falloff; Directional uses the Transform's forward with no attenuation; Ambient adds a flat term independent of normal/position. More...
enum class  SkinCacheMode : i32 { Auto = 0 , Disabled = 1 , Enabled = 2 }
enum class  ParticleColliderShape : i32 { Sphere = 0 , Box = 1 , Capsule = 2 }
enum class  EmitterShape : i32 {
  Point = 0 , Circle = 1 , Box = 2 , Cone = 3 ,
  Sphere = 4 , Hemisphere = 5
}
enum class  ParticleEasing : i32 { Linear = 0 , EaseIn = 1 , EaseOut = 2 , EaseInOut = 3 }
enum class  ParticleRenderMode : i32 { Billboard = 0 , Stretched = 1 }
enum class  SimulationSpace : i32 { World = 0 , Local = 1 }
enum class  SubEmitterTrigger : i32 { Death = 0 , Birth = 1 , Collision = 2 }
enum class  ParticleCollisionMode : i32 {
  Floor = 0 , Physics2D = 1 , Physics3D = 2 , Depth = 3 ,
  Sdf = 4
}
enum class  ParticleCollisionFallback : i32 { Floor = 0 , Skip = 1 }
enum class  ForceFieldType : i32 { Directional = 0 , Point = 1 , Vortex = 2 , Drag = 3 }
enum class  ReflectionAxis : u8 { X , Y , Z }
enum class  ReflectionQuality : u8 { Project , Custom }
enum class  ReflectionUpdate : u8 { EveryFrame , FixedRate , OnDemand }
enum class  ShapeType : u8 { Circle = 0 , Capsule = 1 , RoundedRect = 2 }
enum class  SpringBoneShape : i32 { Sphere = 0 , Capsule = 1 }
 What a SpringBoneCollider is shaped like. More...
enum class  SpriteDrawMode : u8 { Auto , Simple , Tiled , NineSlice }
 How a Sprite fills its box. More...
enum class  SpriteMaskInteraction : i32 { None = 0 , VisibleInside = 1 , VisibleOutside = 2 }
 2D sprite component for rendering More...
enum class  TilemapOrientation : u8 { Orthogonal = 0 , Isometric = 1 , Staggered = 2 , Hexagonal = 3 }
enum class  TilemapStaggerAxis : u8 { Y = 0 , X = 1 }
enum class  TilemapStaggerIndex : u8 { Odd = 0 , Even = 1 }
enum class  MaskMode : u8 { Scissor , Stencil }
enum class  AlignSelf : u8 {
  Auto , Start , Center , End ,
  Stretch
}
 Per-item cross-axis alignment override (CSS align-self). Lives on UINode since UINode carries the flex-item properties (the standalone FlexItem component was subsumed by UINode and removed). More...
enum class  UIPositionType : u8 { Relative , Absolute }
 Box positioning scheme. Absolute takes the node out of flex flow and places it by inset against the parent's box — this is how anchor / stretch (the old RectTransform use cases) are expressed in the CSS model: e.g. inset 0 on all edges = stretch to fill; top+right set = anchor to the top-right corner. More...
enum class  UIDisplay : u8 { Flex , None }
 CSS display. None removes the node AND its whole subtree from layout, rendering, and hit-testing — the hierarchical show/hide primitive (a closed dialog, a collapsed panel). Contrast with UIVisual.enabled, which hides only that entity's own visual. More...
enum class  UIPointerEvents : u8 { Auto , None , Receive }
 CSS pointer-events. None makes the node AND its subtree transparent to the pointer (drawn, hits pass through); Interactable.enabled silences one entity without letting hits through. Auto inherits None from an ancestor. Receive takes the pointer even there and gives it back to its subtree, as CSS pointer-events: auto on a child: a click-through overlay whose close button still answers. More...
enum class  ScrollMovement : u8 { Clamped , Elastic }
enum class  UIVisualType : u8 {
  None , SolidColor , Image , NineSlice ,
  Tiled , Filled
}
 How a UIVisual fills its UINode box. Replaces the old UIRenderer visualType + Image imageType pair: a single draw mode, so the renderer derives the sampled UV at draw time and no frame-late Image->UIRenderer copy system is needed. More...
enum class  UIFillMethod : u8 {
  Horizontal , Vertical , Radial360 , Radial90 ,
  Radial180
}
 Fill mode for a Filled UIVisual. Horizontal/Vertical are linear crops along the axis; the Radial modes are an angular clockwise sweep starting from the fillOrigin edge (12/3/6/9 o'clock), where fillAmount scales the wedge from 0 to the mode's arc (90/180/360 degrees) — cooldown rings, speedometer arcs, corner meters. More...
enum class  UIFillOrigin : u8 { Left , Right , Bottom , Top }
enum class  UIVisualFit : u8 { Fill , Contain , Cover }
 How the texture is fitted into the node's box — CSS object-fit. Fill stretches to the box (the default, and what a 9-slice or a tiled visual always wants). Contain scales the image down until it fits WHOLE inside the box, letterboxing the remainder — the "don't squash my artwork" mode. Cover scales up until the box is covered and crops the overflow, so the box is filled with no distortion. More...

Functions

bool hasFlatGeometryArea (Transform &transform, bool parented)
bool hasFlatGeometryArea (Registry &registry, Entity entity, Transform &transform)
bool copyFlatRenderMatrix (Registry &registry, Entity entity, glm::mat4 &output)
template<typename T>
std::string_view componentTypeName ()
 T's name as the compiler spells it, without a namespace: what an audit report says.
bool tickAfter (u32 a, u32 b)
 Whether stamp a is later than tick b, across a wrap of the counter (stamps are kept within half its range).
u32 * transformEpochWords ()
 How many times a transform composition INPUT has changed.
u32 & transformMutationEpoch ()
u32 & transformUnstampedEpoch ()
 How many times a producer has written a local transform WITHOUT stamping it.
void invalidateTransformComposition ()
 Say that composed world transforms are stale.
void invalidateUnstampedTransforms ()
 Say that local transforms were written with no stamp saying which: the next composition composes everything.
bool isDescendantOf (Registry &registry, Entity entity, Entity ancestor)
void syncHierarchyComponents (Registry &registry, Entity entity, Entity oldParent, Entity newParent)
 Writes the Parent and Children components from the ChildOf relation, for entity and the parents it left and joined.
bool setParent (Registry &registry, Entity child, Entity newParent)
void applySceneEntityOrder (Registry &registry, const Entity *order, usize count)
 Applies a scene's authored entity order to the whole world.
Entity getRoot (Registry &registry, Entity entity)
void destroyWithChildren (Registry &registry, Entity entity)
std::vector< Entity > canvasRoots (Registry &registry, bool layoutOnly)
f32 quaternionToAngle2D (f32 rz, f32 rw)
bool pointInOBB (f32 px, f32 py, f32 worldX, f32 worldY, f32 worldW, f32 worldH, f32 pivotX, f32 pivotY, f32 rotationZ, f32 rotationW)
bool rayHitsPlaneZ (const PickRay &ray, f32 planeZ, f32 &outX, f32 &outY, f32 &outT)
bool rayHitsOBB (const PickRay &ray, const glm::vec3 &centre, const glm::quat &rotation, const glm::vec3 &scale, const glm::vec3 &localMin, const glm::vec3 &localMax, f32 &outT)
bool pointInTransformedBox (Registry &registry, Entity entity, Transform &transform, f32 px, f32 py, f32 width, f32 height, f32 pivotX, f32 pivotY)
bool isClippedByMask (Registry &registry, Entity entity, f32 worldMouseX, f32 worldMouseY)
i32 assignRenderOrder (Registry &registry, Entity entity, i32 counter, u32 cullBit, UITreeOrder *tree=nullptr)
void uiRenderOrderUpdate (Registry &registry, UITreeOrder *tree=nullptr)

Variables

static constexpr u32 ENTITY_CHANGE_WORDS = 3
static constexpr u32 ENTITY_CHANGE_NO_COMPONENT = 4294967295
static constexpr u32 ENTITY_CHANGE_CAPACITY = 4096
static constexpr u32 ENTITY_CHANGE_SUBTREE = 1
static constexpr u32 ENTITY_CHANGE_RESET = 2
static constexpr u32 ENTITY_CHANGE_REPLACED = 4
static std::vector< f32 > inherited_alpha_stack_
static std::vector< u8 > inherited_block_stack_

Typedef Documentation

◆ ScriptFieldValue

Initial value:
std::variant<
f32,
i32,
bool,
std::string,
glm::vec2,
glm::vec3,
glm::vec4,
u32
>
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
float f32
32-bit floating point
Definition Types.hpp:59

Value type for script component fields.

Definition at line 140 of file Common.hpp.

Enumeration Type Documentation

◆ AlignContent

enum class esengine::ecs::AlignContent : u8
strong
Enumerator
Start 
Center 
End 
Stretch 
SpaceBetween 
SpaceAround 

Definition at line 45 of file FlexContainer.hpp.

◆ AlignItems

enum class esengine::ecs::AlignItems : u8
strong
Enumerator
Start 
Center 
End 
Stretch 

Definition at line 37 of file FlexContainer.hpp.

◆ AlignSelf

enum class esengine::ecs::AlignSelf : u8
strong

Per-item cross-axis alignment override (CSS align-self). Lives on UINode since UINode carries the flex-item properties (the standalone FlexItem component was subsumed by UINode and removed).

Enumerator
Auto 
Start 
Center 
End 
Stretch 

Definition at line 18 of file UINode.hpp.

◆ BillboardMode

enum class esengine::ecs::BillboardMode : i32
strong

How a billboard is turned. ViewPlane lies flat in the view, like a particle; Upright turns about world up only, so a tree, a sign or a character drawn on a card stays standing as the camera looks down on it.

Enumerator
ViewPlane 
Upright 

Definition at line 23 of file Billboard.hpp.

◆ BodyType

enum class esengine::ecs::BodyType : u8
strong
Enumerator
Static 
Kinematic 
Dynamic 

Definition at line 19 of file BodyType.hpp.

◆ CanvasScaleMode

enum class esengine::ecs::CanvasScaleMode : u8
strong

Canvas scaling mode for different screen resolutions.

Enumerator
FixedWidth 
FixedHeight 
Expand 
Shrink 
Match 

Definition at line 35 of file Canvas.hpp.

◆ ClearFlags

enum class esengine::ecs::ClearFlags : u8
strong

Camera clear flags.

Enumerator
Nothing 
Color 
Depth 
ColorAndDepth 

Definition at line 43 of file Camera.hpp.

◆ EmitterShape

enum class esengine::ecs::EmitterShape : i32
strong
Enumerator
Point 
Circle 
Box 
Cone 
Sphere 
Hemisphere 

Definition at line 15 of file ParticleEmitter.hpp.

◆ FlexDirection

enum class esengine::ecs::FlexDirection : u8
strong
Enumerator
Row 
Column 
RowReverse 
ColumnReverse 

Definition at line 13 of file FlexContainer.hpp.

◆ FlexWrap

enum class esengine::ecs::FlexWrap : u8
strong
Enumerator
NoWrap 
Wrap 

Definition at line 21 of file FlexContainer.hpp.

◆ ForceFieldType

enum class esengine::ecs::ForceFieldType : i32
strong
Enumerator
Directional 
Point 
Vortex 
Drag 

Definition at line 27 of file ParticleForceField.hpp.

◆ JustifyContent

enum class esengine::ecs::JustifyContent : u8
strong
Enumerator
Start 
Center 
End 
SpaceBetween 
SpaceAround 
SpaceEvenly 

Definition at line 27 of file FlexContainer.hpp.

◆ LightType

enum class esengine::ecs::LightType : i32
strong

2D light kind. Point uses the Transform position + radius falloff; Directional uses the Transform's forward with no attenuation; Ambient adds a flat term independent of normal/position.

Enumerator
Point 
Directional 
Ambient 
Spot 

Definition at line 36 of file Light.hpp.

◆ MaskMode

enum class esengine::ecs::MaskMode : u8
strong
Enumerator
Scissor 
Stencil 

Definition at line 11 of file UIMask.hpp.

◆ ParticleColliderShape

Enumerator
Sphere 
Box 
Capsule 

Definition at line 19 of file ParticleCollider.hpp.

◆ ParticleCollisionFallback

Enumerator
Floor 
Skip 

Definition at line 68 of file ParticleEmitter.hpp.

◆ ParticleCollisionMode

Enumerator
Floor 
Physics2D 
Physics3D 
Depth 
Sdf 

Definition at line 59 of file ParticleEmitter.hpp.

◆ ParticleEasing

enum class esengine::ecs::ParticleEasing : i32
strong
Enumerator
Linear 
EaseIn 
EaseOut 
EaseInOut 

Definition at line 28 of file ParticleEmitter.hpp.

◆ ParticleRenderMode

How a particle's quad is turned. Billboard faces the view and spins by its own rotation; Stretched lays the quad's long axis along the particle's velocity and lengthens it with speed — sparks, rain, streaks.

Enumerator
Billboard 
Stretched 

Definition at line 38 of file ParticleEmitter.hpp.

◆ ProjectionType

enum class esengine::ecs::ProjectionType : u8
strong

Camera projection type.

Enumerator
Perspective 
Orthographic 

Definition at line 34 of file Camera.hpp.

◆ ReflectionAxis

enum class esengine::ecs::ReflectionAxis : u8
strong
Enumerator
X 
Y 
Z 

Definition at line 9 of file PlanarReflection.hpp.

◆ ReflectionQuality

enum class esengine::ecs::ReflectionQuality : u8
strong
Enumerator
Project 
Custom 

Definition at line 11 of file PlanarReflection.hpp.

◆ ReflectionUpdate

enum class esengine::ecs::ReflectionUpdate : u8
strong
Enumerator
EveryFrame 
FixedRate 
OnDemand 

Definition at line 13 of file PlanarReflection.hpp.

◆ ScrollMovement

enum class esengine::ecs::ScrollMovement : u8
strong
Enumerator
Clamped 

Stop dead at the ends.

Elastic 

Overshoot and spring back — the touch-UI feel.

Definition at line 11 of file UIScroll.hpp.

◆ ShapeType

enum class esengine::ecs::ShapeType : u8
strong
Enumerator
Circle 
Capsule 
RoundedRect 

Definition at line 12 of file ShapeRenderer.hpp.

◆ SimulationSpace

enum class esengine::ecs::SimulationSpace : i32
strong
Enumerator
World 
Local 

Definition at line 44 of file ParticleEmitter.hpp.

◆ SkinCacheMode

enum class esengine::ecs::SkinCacheMode : i32
strong

Whether a skinned mesh is posed by the skin cache, a compute pass that poses it once a frame for every pass that draws it. Auto follows the project's Default Skin Cache Behavior; Disabled always poses it in the vertex stage of each draw; Enabled asks for the cache even when the project's default leaves meshes out. The project's memory budget has the last word either way.

Enumerator
Auto 
Disabled 
Enabled 

Definition at line 141 of file MeshRenderer.hpp.

◆ SpringBoneShape

enum class esengine::ecs::SpringBoneShape : i32
strong

What a SpringBoneCollider is shaped like.

Enumerator
Sphere 
Capsule 

Definition at line 31 of file SpringBone.hpp.

◆ SpriteDrawMode

enum class esengine::ecs::SpriteDrawMode : u8
strong

How a Sprite fills its box.

Auto infers it: tileSize decides tiling, the texture's slice border decides 9-slice. The other three are the author overriding that, and an override cannot invent data — Tiled with no tileSize and NineSlice with no border both draw the plain quad.

Enumerator
Auto 
Simple 
Tiled 
NineSlice 

Definition at line 43 of file Sprite.hpp.

◆ SpriteMaskInteraction

2D sprite component for rendering

Contains all data needed to render a 2D sprite including texture handle, color tint, size, UV coordinates, and sorting layer.

Entity e = registry.create();
auto& sprite = registry.emplace<Sprite>(e);
sprite.texture = resourceManager.loadTexture("player.png");
sprite.color = glm::vec4(1.0f, 0.5f, 0.5f, 1.0f); // Red tint
sprite.layer = 10; // Render on top
Entity identifier with packed index + generation.
Definition Types.hpp:135
resource::TextureHandle texture
Texture resource handle (type-safe).
Definition Sprite.hpp:81

What a SpriteMask reaching this sprite does to it.

Opt-in per sprite: a mask cuts only what asks to be cut, so adding a mask to a scene cannot make unrelated sprites vanish.

Enumerator
None 

Masks reaching this sprite are ignored.

VisibleInside 

Drawn only where the mask is — a window.

VisibleOutside 

Drawn only where the mask is NOT — a hole.

Definition at line 71 of file Sprite.hpp.

◆ SubEmitterTrigger

Enumerator
Death 
Birth 
Collision 

Definition at line 52 of file ParticleEmitter.hpp.

◆ TextAlign

enum class esengine::ecs::TextAlign : u8
strong
Enumerator
Left 
Center 
Right 

Definition at line 15 of file BitmapText.hpp.

◆ TilemapOrientation

Grid layout of a tilemap layer. Values match tilemap::GridType 1:1 so the component field maps straight to the runtime grid type. "Staggered" is the staggered-isometric grid; it and Hexagonal share the stagger axis/index.

Enumerator
Orthogonal 
Isometric 
Staggered 
Hexagonal 

Definition at line 22 of file TilemapLayer.hpp.

◆ TilemapStaggerAxis

Which axis the stagger runs along (Tiled staggeraxis). Y = rows shift, X = columns shift.

Enumerator
Y 
X 

Definition at line 31 of file TilemapLayer.hpp.

◆ TilemapStaggerIndex

Which lines carry the half-cell shift (Tiled staggerindex).

Enumerator
Odd 
Even 

Definition at line 38 of file TilemapLayer.hpp.

◆ UIDisplay

enum class esengine::ecs::UIDisplay : u8
strong

CSS display. None removes the node AND its whole subtree from layout, rendering, and hit-testing — the hierarchical show/hide primitive (a closed dialog, a collapsed panel). Contrast with UIVisual.enabled, which hides only that entity's own visual.

Enumerator
Flex 
None 

Definition at line 46 of file UINode.hpp.

◆ UIFillMethod

enum class esengine::ecs::UIFillMethod : u8
strong

Fill mode for a Filled UIVisual. Horizontal/Vertical are linear crops along the axis; the Radial modes are an angular clockwise sweep starting from the fillOrigin edge (12/3/6/9 o'clock), where fillAmount scales the wedge from 0 to the mode's arc (90/180/360 degrees) — cooldown rings, speedometer arcs, corner meters.

Enumerator
Horizontal 
Vertical 
Radial360 
Radial90 
Radial180 

Definition at line 41 of file UIVisual.hpp.

◆ UIFillOrigin

enum class esengine::ecs::UIFillOrigin : u8
strong
Enumerator
Left 
Right 
Bottom 
Top 

Definition at line 50 of file UIVisual.hpp.

◆ UIPointerEvents

enum class esengine::ecs::UIPointerEvents : u8
strong

CSS pointer-events. None makes the node AND its subtree transparent to the pointer (drawn, hits pass through); Interactable.enabled silences one entity without letting hits through. Auto inherits None from an ancestor. Receive takes the pointer even there and gives it back to its subtree, as CSS pointer-events: auto on a child: a click-through overlay whose close button still answers.

Enumerator
Auto 
None 
Receive 

Definition at line 58 of file UINode.hpp.

◆ UIPositionType

enum class esengine::ecs::UIPositionType : u8
strong

Box positioning scheme. Absolute takes the node out of flex flow and places it by inset against the parent's box — this is how anchor / stretch (the old RectTransform use cases) are expressed in the CSS model: e.g. inset 0 on all edges = stretch to fill; top+right set = anchor to the top-right corner.

Enumerator
Relative 
Absolute 

Definition at line 34 of file UINode.hpp.

◆ UIVisualFit

enum class esengine::ecs::UIVisualFit : u8
strong

How the texture is fitted into the node's box — CSS object-fit. Fill stretches to the box (the default, and what a 9-slice or a tiled visual always wants). Contain scales the image down until it fits WHOLE inside the box, letterboxing the remainder — the "don't squash my artwork" mode. Cover scales up until the box is covered and crops the overflow, so the box is filled with no distortion.

Enumerator
Fill 
Contain 
Cover 

Definition at line 66 of file UIVisual.hpp.

◆ UIVisualType

enum class esengine::ecs::UIVisualType : u8
strong

How a UIVisual fills its UINode box. Replaces the old UIRenderer visualType + Image imageType pair: a single draw mode, so the renderer derives the sampled UV at draw time and no frame-late Image->UIRenderer copy system is needed.

None = invisible; SolidColor = tinted white quad; Image = textured quad (uvOffset/uvScale select a sprite sub-region); NineSlice = 9-slice via sliceBorder; Tiled = texture repeated by box/tileSize; Filled = texture cropped to fillAmount along fillMethod/fillOrigin.

Enumerator
None 
SolidColor 
Image 
NineSlice 
Tiled 
Filled 

Definition at line 24 of file UIVisual.hpp.

Function Documentation

◆ applySceneEntityOrder()

void esengine::ecs::applySceneEntityOrder ( Registry & registry,
const Entity * order,
usize count )
inline

Applies a scene's authored entity order to the whole world.

Parameters
orderEntities in the desired order (first draws first, i.e. behind)
countHow many entries order holds

One order reaches both readers of it: component storage (the renderer's painter order) and each parent's children (UI layout and draw order), as a reload would. Entities left out keep their relative order, after the listed ones.

Definition at line 506 of file TransformSystem.hpp.

References esengine::ecs::Registry::applyEntityRank(), esengine::ecs::Registry::buildEntityRank(), esengine::ecs::Registry::childOf(), esengine::ecs::Registry::eachLive(), esengine::INVALID_ENTITY, invalidateTransformComposition(), and syncHierarchyComponents().

Referenced by esengine::renderer_setEntityDrawOrder().

◆ assignRenderOrder()

i32 esengine::ecs::assignRenderOrder ( Registry & registry,
Entity entity,
i32 counter,
u32 cullBit,
UITreeOrder * tree = nullptr )
inline

◆ canvasRoots()

std::vector< Entity > esengine::ecs::canvasRoots ( Registry & registry,
bool layoutOnly )
inline

◆ componentTypeName()

template<typename T>
std::string_view esengine::ecs::componentTypeName ( )

T's name as the compiler spells it, without a namespace: what an audit report says.

Definition at line 181 of file SparseSet.hpp.

Referenced by esengine::ecs::SparseSet< T >::typeName().

◆ copyFlatRenderMatrix()

bool esengine::ecs::copyFlatRenderMatrix ( Registry & registry,
Entity entity,
glm::mat4 & output )
inline

◆ destroyWithChildren()

◆ getRoot()

Entity esengine::ecs::getRoot ( Registry & registry,
Entity entity )
inline

◆ hasFlatGeometryArea() [1/2]

bool esengine::ecs::hasFlatGeometryArea ( Registry & registry,
Entity entity,
Transform & transform )
inline

Definition at line 30 of file FlatGeometry.hpp.

References esengine::ecs::Registry::has(), and hasFlatGeometryArea().

◆ hasFlatGeometryArea() [2/2]

◆ invalidateTransformComposition()

void esengine::ecs::invalidateTransformComposition ( )
inline

Say that composed world transforms are stale.

Never call this from a writer of worldPosition/worldRotation/ worldScale: those are the composition's OUTPUT, and invalidating on them makes every composition immediately stale again.

Definition at line 38 of file TransformEpoch.hpp.

References transformMutationEpoch().

Referenced by applySceneEntityOrder(), esengine::animation::applyTweenValue(), esengine::ecs::Registry::destroy(), esengine::ecs::UISystem::layoutUpdate(), esengine::registry_batchSyncPhysicsTransforms(), setParent(), and esengine::springbone::SpringBoneSystem::update().

◆ invalidateUnstampedTransforms()

void esengine::ecs::invalidateUnstampedTransforms ( )
inline

Say that local transforms were written with no stamp saying which: the next composition composes everything.

Definition at line 41 of file TransformEpoch.hpp.

References transformMutationEpoch(), and transformUnstampedEpoch().

◆ isClippedByMask()

◆ isDescendantOf()

bool esengine::ecs::isDescendantOf ( Registry & registry,
Entity entity,
Entity ancestor )
inline

◆ pointInOBB()

bool esengine::ecs::pointInOBB ( f32 px,
f32 py,
f32 worldX,
f32 worldY,
f32 worldW,
f32 worldH,
f32 pivotX,
f32 pivotY,
f32 rotationZ,
f32 rotationW )
inline

Definition at line 28 of file UIHitTestSystem.hpp.

References quaternionToAngle2D().

Referenced by pointInTransformedBox().

◆ pointInTransformedBox()

◆ quaternionToAngle2D()

f32 esengine::ecs::quaternionToAngle2D ( f32 rz,
f32 rw )
inline

Definition at line 24 of file UIHitTestSystem.hpp.

Referenced by pointInOBB().

◆ rayHitsOBB()

bool esengine::ecs::rayHitsOBB ( const PickRay & ray,
const glm::vec3 & centre,
const glm::quat & rotation,
const glm::vec3 & scale,
const glm::vec3 & localMin,
const glm::vec3 & localMax,
f32 & outT )
inline

ray against a box in an entity's own frame — a slab test, after folding the entity's rotation and translation out of the ray.

Scale folds into the BOX, not out of the ray: zero would divide by zero and negative flips rather than shrinks, hence min/max after it.

Definition at line 86 of file UIHitTestSystem.hpp.

References esengine::ecs::PickRay::dir, and esengine::ecs::PickRay::origin.

◆ rayHitsPlaneZ()

bool esengine::ecs::rayHitsPlaneZ ( const PickRay & ray,
f32 planeZ,
f32 & outX,
f32 & outY,
f32 & outT )
inline

Where ray crosses the plane z = planeZ, and how far along the ray that is. False when the two are parallel: a plane seen exactly edge-on is a plane the pointer never reaches, and answering with a position would invent one.

Definition at line 69 of file UIHitTestSystem.hpp.

References esengine::ecs::PickRay::dir, and esengine::ecs::PickRay::origin.

Referenced by esengine::ecs::UISystem::hitTestUpdate().

◆ setParent()

◆ syncHierarchyComponents()

void esengine::ecs::syncHierarchyComponents ( Registry & registry,
Entity entity,
Entity oldParent,
Entity newParent )
inline

Writes the Parent and Children components from the ChildOf relation, for entity and the parents it left and joined.

The relation is the hierarchy; these components are its copy for whoever reads components rather than the relation (scripts, scene files, the editor). Children lists the children in the relation's order, so a sibling removed from the middle no longer reorders the rest.

Definition at line 437 of file TransformSystem.hpp.

References esengine::ecs::Registry::childOf(), esengine::ecs::Registry::emplace(), esengine::ecs::Children::entities, esengine::ecs::Registry::get(), esengine::ecs::Registry::has(), esengine::Entity::isValid(), esengine::ecs::Registry::patch(), esengine::ecs::Registry::remove(), esengine::ecs::Registry::tryGet(), and esengine::ecs::Registry::valid().

Referenced by applySceneEntityOrder(), and setParent().

◆ tickAfter()

◆ transformEpochWords()

u32 * esengine::ecs::transformEpochWords ( )
inline

How many times a transform composition INPUT has changed.

One shared counter, written by every producer of a local transform field or of the hierarchy, on either side of the wasm boundary.

Note
Modulo 2^32: aliasing needs 2^32 invalidations between two compositions.

Definition at line 19 of file TransformEpoch.hpp.

Referenced by transformMutationEpoch(), and transformUnstampedEpoch().

◆ transformMutationEpoch()

u32 & esengine::ecs::transformMutationEpoch ( )
inline

◆ transformUnstampedEpoch()

u32 & esengine::ecs::transformUnstampedEpoch ( )
inline

How many times a producer has written a local transform WITHOUT stamping it.

The word after transformMutationEpoch, so a script reaches both through one address. Composition recomposes only what was stamped; when this has moved, it cannot know what was written and composes everything.

Definition at line 30 of file TransformEpoch.hpp.

References transformEpochWords().

Referenced by invalidateUnstampedTransforms().

◆ uiRenderOrderUpdate()

void esengine::ecs::uiRenderOrderUpdate ( Registry & registry,
UITreeOrder * tree = nullptr )
inline

Variable Documentation

◆ ENTITY_CHANGE_CAPACITY

◆ ENTITY_CHANGE_NO_COMPONENT

u32 esengine::ecs::ENTITY_CHANGE_NO_COMPONENT = 4294967295
staticconstexpr

◆ ENTITY_CHANGE_REPLACED

u32 esengine::ecs::ENTITY_CHANGE_REPLACED = 4
staticconstexpr

◆ ENTITY_CHANGE_RESET

u32 esengine::ecs::ENTITY_CHANGE_RESET = 2
staticconstexpr

◆ ENTITY_CHANGE_SUBTREE

u32 esengine::ecs::ENTITY_CHANGE_SUBTREE = 1
staticconstexpr

◆ ENTITY_CHANGE_WORDS

u32 esengine::ecs::ENTITY_CHANGE_WORDS = 3
staticconstexpr

Definition at line 15 of file EntityChangeJournal.hpp.

◆ inherited_alpha_stack_

std::vector<f32> esengine::ecs::inherited_alpha_stack_
static

Definition at line 22 of file UILayoutSystem.cpp.

◆ inherited_block_stack_

std::vector<u8> esengine::ecs::inherited_block_stack_
static

Definition at line 23 of file UILayoutSystem.cpp.