Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
es::skeletal::EventBuffer Class Reference

#include <SkeletalModule.hpp>

Public Member Functions

void clear ()
void push (int kind, int track, float floatValue, int intValue, EventStrings strings)
int count () const
const float * values () const
std::size_t byteLength () const
const EventStrings * strings (int index) const

Static Public Attributes

static constexpr int MAX_PER_UPDATE = 64

Detailed Description

Events queued for the caller to drain after an update.

The numbers ride in a float array because that is the one buffer type that crosses cheaply; the two integers ride as their bit patterns, and the SDK reads them back through the same reinterpretation. Capacity is fixed and overflow is dropped: a frame that produced more events than this had a runaway animation, and growing the buffer would only postpone noticing.

Definition at line 304 of file SkeletalModule.hpp.

Member Function Documentation

◆ byteLength()

std::size_t es::skeletal::EventBuffer::byteLength ( ) const
inline

Live extent of the float buffer — a caller cannot infer it from the count without assuming this packing's stride.

Definition at line 328 of file SkeletalModule.hpp.

◆ clear()

void es::skeletal::EventBuffer::clear ( )
inline

Definition at line 308 of file SkeletalModule.hpp.

◆ count()

int es::skeletal::EventBuffer::count ( ) const
inline

Definition at line 324 of file SkeletalModule.hpp.

◆ push()

void es::skeletal::EventBuffer::push ( int kind,
int track,
float floatValue,
int intValue,
EventStrings strings )
inline

Definition at line 314 of file SkeletalModule.hpp.

References MAX_PER_UPDATE, and strings().

◆ strings()

const EventStrings * es::skeletal::EventBuffer::strings ( int index) const
inline

Definition at line 329 of file SkeletalModule.hpp.

Referenced by push().

◆ values()

const float * es::skeletal::EventBuffer::values ( ) const
inline

Definition at line 325 of file SkeletalModule.hpp.

Member Data Documentation

◆ MAX_PER_UPDATE

int es::skeletal::EventBuffer::MAX_PER_UPDATE = 64
staticconstexpr

Definition at line 306 of file SkeletalModule.hpp.

Referenced by push().


The documentation for this class was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/bindings/modules/spine/SkeletalModule.hpp