Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::Pulsar Class Reference

Singleton facade for the Pulsar physics runtime. More...

#include <Pulsar.h>

Static Public Member Functions

static PULSAR_API void Init (const PhysicsConfiguration &config)
 Initialises the global Jolt runtime with the given configuration.
static PULSAR_API void Shutdown ()
 Tears down the global Jolt runtime, freeing all internal resources.
static JPH::TempAllocatorImpl * GetAllocator ()
 Returns the global Jolt temporary allocator.
static JPH::JobSystemThreadPool * GetJobSystem ()
 Returns the global Jolt job system.
static PULSAR_API PhysicsConfigurationGetConfig ()
 Returns a mutable reference to the active physics configuration.

Detailed Description

Singleton facade for the Pulsar physics runtime.

Manages the lifetime of the Jolt allocator and job system, which are shared across all PhysicsWorld instances within the process. Call Init once at engine startup and Shutdown on teardown.

Member Function Documentation

◆ GetAllocator()

JPH::TempAllocatorImpl * Raven::Pulsar::GetAllocator ( )
inlinestatic

Returns the global Jolt temporary allocator.

Returns
Non-owning pointer to the TempAllocatorImpl instance.

◆ GetConfig()

PULSAR_API PhysicsConfiguration & Raven::Pulsar::GetConfig ( )
inlinestatic

Returns a mutable reference to the active physics configuration.

Returns
Reference to the stored PhysicsConfiguration.

◆ GetJobSystem()

JPH::JobSystemThreadPool * Raven::Pulsar::GetJobSystem ( )
inlinestatic

Returns the global Jolt job system.

Returns
Non-owning pointer to the JobSystemThreadPool instance.

◆ Init()

void Raven::Pulsar::Init ( const PhysicsConfiguration & config)
static

Initialises the global Jolt runtime with the given configuration.

Parameters
configPhysics configuration to apply. Stored internally and accessible via GetConfig for the lifetime of the runtime.

◆ Shutdown()

void Raven::Pulsar::Shutdown ( )
static

Tears down the global Jolt runtime, freeing all internal resources.

Must be called after all PhysicsWorld instances have been shut down.


The documentation for this class was generated from the following files: