Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrainCore module · class

Native::

FGroundHandle

A thread-safe handle a terrain world publishes into: every snapshot the world publishes, it also hands to its handle, and when the world is destroyed it closes the handle.

Declaration

class FGroundHandle
Header
#include "Native/GroundHandle.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrainCore"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Acquire and Revision: any thread, no allocation, never blocks on IO.

Description

Get it on the game thread, once (FTerrainWorld::GetGroundHandle, UOrbdaleTerrainSubsystem::GetGroundHandle), then keep it on any thread for as long as the work runs: a buyer's task, a PCG worker, an extension's simulation. It holds no reference to the world, so it outlives it safely. After the world is destroyed, Acquire returns an empty query (every answer NoData) and Revision returns 0, never a dangling one.

Acquire per batch or per tick and pass the query down, as with UOrbdaleTerrainSubsystem::AcquireQuery: each Acquire costs one shared-pointer copy under a short leaf lock (TAtomicSharedPtr). A query acquired before the world was destroyed stays valid and answers from its snapshot, which it keeps alive.

Note.

Acquire and Revision: any thread, no allocation, never blocks on IO. Publishing and closing: the owning world only, on the game thread.

See also

FGroundQuery, FTerrainWorld::GetGroundHandle

Functions

  • FGroundHandle (2 overloads)
  • operator=
  • Acquire

    A query on the world's current snapshot.

  • Revision

    The revision of the latest snapshot published to this handle: it moves on every publish, streaming included (FGroundQuery::LastEditRevision moves on truth changes only).

  • IsAlive

    Whether the world behind the handle still exists.