vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::GenerationIndex Struct Reference

Per-slot alive flag (bit 31) and generation counter (bits 0-30) in one uint32_t. More...

#include <types.h>

Public Member Functions

void setAlive (bool alive)
 Set the alive/dead status, leaving the generation untouched.
void bumpGeneration ()
 Increment the generation counter, preserving the alive bit.

Detailed Description

Per-slot alive flag (bit 31) and generation counter (bits 0-30) in one uint32_t.

Member Function Documentation

◆ setAlive()

void Vkm::Engine::GenerationIndex::setAlive ( bool alive)
inline

Set the alive/dead status, leaving the generation untouched.

Parameters
aliveTrue marks the slot alive, false dead.

◆ bumpGeneration()

void Vkm::Engine::GenerationIndex::bumpGeneration ( )
inline

Increment the generation counter, preserving the alive bit.

Called on each removal, staling every handle minted before. Wraps at 31 bits.


The documentation for this struct was generated from the following file: