class
FDecalPool
Fixed-capacity ring of runtime-spawned decals: past capacity the oldest slot is recycled, so cost stays flat no matter the spawn rate.
- Module
- Game
- Header
#include "Renderer/DecalSystem.h"- Namespace
Mowo
Authored decals placed in the scene are not pool members and are never recycled — only what Spawn hands out is tracked.
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetScene | |
void | SetCapacity | 0 leaves the pool unbounded (the editor's default, so authoring is never silently truncated). |
uint32_t | GetCapacity | |
uint32_t | GetLiveCount | |
uint32_t | GetRecycledCount | |
EntityID | Spawn | Places a decal projecting along -normal at position. |
Vec3 | RotationFromSurfaceNormal | Euler angles in radians, in TransformComponent's Rx * Ry * Rz order, that put the decal's local +Y along normal — so the default -Y projection axis points into the surface. |
void | Clear |
Function details
SetScene
C++
void SetScene(Scene* scene)SetCapacity
C++
void SetCapacity(uint32_t capacity)0 leaves the pool unbounded (the editor's default, so authoring is never silently truncated).
GetCapacity
C++
uint32_t GetCapacity() constGetLiveCount
C++
uint32_t GetLiveCount() constGetRecycledCount
C++
uint32_t GetRecycledCount() constSpawn
C++
EntityID Spawn(const Vec3& position, const Vec3& normal, const Vec3& size, const std::string& materialPath, float lifetime)Places a decal projecting along -normal at position. Returns INVALID_ENTITY when the pool has no scene.
RotationFromSurfaceNormal
C++
static Vec3 RotationFromSurfaceNormal(const Vec3& normal)Euler angles in radians, in TransformComponent's Rx * Ry * Rz order, that put the decal's local +Y along normal — so the default -Y projection axis points into the surface.
Clear
C++
void Clear()Generated from Renderer/DecalSystem.h via game.json · Nov 5, 2026Version 1.0.0