Avara3D 0.2.0
C++ API reference
a3d::ext::Transients::SweepPolicy Struct Reference

Scheduling policy controlling when update() performs a sweep. More...

#include <a3d/extension/Transients.h>

Public Types

enum class  Mode { EveryUpdate , EveryNUpdates , EveryInterval }
 Available sweep scheduling modes. More...
 

Static Public Member Functions

static SweepPolicy EveryUpdate ()
 Creates a policy that sweeps on every call to update(). More...
 
static SweepPolicy EveryNUpdates (std::uint64_t updates)
 Creates a policy that sweeps after a fixed number of update() calls. More...
 
static SweepPolicy EveryInterval (double seconds)
 Creates a policy that sweeps at a fixed simulation-time interval. More...
 

Public Attributes

Mode mode {Mode::EveryUpdate}
 Selected scheduling mode. More...
 
std::uint64_t updateInterval {1}
 Number of update() calls between sweeps in Mode::EveryNUpdates. More...
 
double timeInterval {0.0}
 Seconds of simulation time between sweeps in Mode::EveryInterval. More...
 

Detailed Description

Scheduling policy controlling when update() performs a sweep.

Definition at line 83 of file Transients.h.

Member Enumeration Documentation

◆ Mode

Available sweep scheduling modes.

Enumerator
EveryUpdate 

Sweep on every call to update().

EveryNUpdates 

Sweep after a configured number of calls to update().

EveryInterval 

Sweep after a configured interval of simulation time.

Definition at line 86 of file Transients.h.

Member Function Documentation

◆ EveryInterval()

static SweepPolicy a3d::ext::Transients::SweepPolicy::EveryInterval ( double  seconds)
static

Creates a policy that sweeps at a fixed simulation-time interval.

Parameters
secondsSeconds of simulation time between sweeps.
Returns
the configured sweep policy.
Exceptions
std::invalid_argumentif seconds is less than or equal to zero.

◆ EveryNUpdates()

static SweepPolicy a3d::ext::Transients::SweepPolicy::EveryNUpdates ( std::uint64_t  updates)
static

Creates a policy that sweeps after a fixed number of update() calls.

Parameters
updatesNumber of update() calls between sweeps.
Returns
the configured sweep policy.
Exceptions
std::invalid_argumentif updates is zero.

◆ EveryUpdate()

static SweepPolicy a3d::ext::Transients::SweepPolicy::EveryUpdate ( )
static

Creates a policy that sweeps on every call to update().

Returns
the configured sweep policy.

Member Data Documentation

◆ mode

Mode a3d::ext::Transients::SweepPolicy::mode {Mode::EveryUpdate}

Selected scheduling mode.

Definition at line 93 of file Transients.h.

◆ timeInterval

double a3d::ext::Transients::SweepPolicy::timeInterval {0.0}

Seconds of simulation time between sweeps in Mode::EveryInterval.

Definition at line 99 of file Transients.h.

◆ updateInterval

std::uint64_t a3d::ext::Transients::SweepPolicy::updateInterval {1}

Number of update() calls between sweeps in Mode::EveryNUpdates.

Definition at line 96 of file Transients.h.


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