Rengine / docsProject documentation

Reference

Entity Model

Look up syntax, contracts, layouts, algorithms, and exact behavior.

An entity is a bundle of transform properties, components, a renderer, and shaders. A folder entity is an entity-like grouping node that owns children and applies parent transforms to them. That gives the engine a compact scene graph without needing a separate hierarchy system.

Te=(pe,ae,re,se)T_e = (p_e, a_e, r_e, s_e)
Entity transform. Each entity carries position, anchor, rotation, and scale.

The folder model is the key idea. It lets a parent pivot, move, scale, or rotate a child group, while individual children still keep their own local transforms and update components.

In the implementation, a folder is deliberately practical: it owns child entities, applies a parent transformation before rendering them, and can optionally recenter its origin around the geometric bounds of its children. It is less general than a full scene-graph math library, but the inspector can explain the hierarchy and grouping stays close to ordinary entity behavior.

rworld=(rparent+rlocal) mod 2πr_{\mathrm{world}} = (r_{\mathrm{parent}} + r_{\mathrm{local}}) \bmod 2\pi
Composed rotation. Folder entities compose child rotation with parent rotation.
  • Entity construction flows through Rengine.Entity.MakeEntity.
  • Folder construction flows through Rengine.Entity.MakeFolderEntity.
  • Folder bounds can optionally place origin and anchor at the geometric center.
  • Debug visualization shows anchors, positions, and parent-child relationships.