Epok Engine

EPOK RUNTIME

epok::TransformCache::sync_root

Function template · 1 overload

Function template

Common physics case: an unparented collider.

Belongs to
epok::TransformCache
Header
transform_cache.hpp
Overloads
1

Declaration

template
Declaration
template<class Object,class MakeLocal> void sync_root(const Object& object,Affine<Number>& world,size_t index,MakeLocal make_local)

Common physics case: an unparented collider.

ParameterTypeMeaning
objectconst Object &Value supplied for object. Keep referenced or pointed-to data valid for the complete call.
worldAffine<Number> &Value supplied for world. Keep referenced or pointed-to data valid for the complete call.
indexsize_tValue supplied for index. Keep referenced or pointed-to data valid for the complete call.
make_localMakeLocalValue supplied for make_local. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "transform_cache.hpp"

// Replace these template arguments with types or values accepted by the declaration:
// Object, MakeLocal

// Assume these named values have been initialized with valid data:
// const Object & object
// Affine<Number> & world
// size_t index
// MakeLocal make_local

epok::TransformCache& object = /* obtain a valid instance */;

object.sync_root<Object, MakeLocal>(object, world, index, make_local);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. This is classified as **Engine internal**. Prefer a higher-level Epok service unless you need this exact control. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/transform_cache.hpp:27

Related members