载入中...
搜索中...
未找到
eve::animation::MotionRuntime类 参考

Owns typed motion slots and applies SimulationStep updates. 更多...

#include <MotionRuntime.h>

类

struct  ColorDesc
 
struct  FloatDesc
 FloatDesc public API. 更多...
 
struct  QuatDesc
 
struct  Vec2Desc
 
struct  Vec3Desc
 

Public 类型

using FloatCallback = std::function< void(float)>
 
using Vec2Callback = std::function< void(MotionVec2)>
 
using Vec3Callback = std::function< void(MotionVec3)>
 
using ColorCallback = std::function< void(MotionColor)>
 
using QuatCallback = std::function< void(MotionQuat)>
 
using VoidCallback = std::function< void()>
 

Public 成员函数

 MotionRuntime ()=default
 
 ~MotionRuntime ()=default
 
 MotionRuntime (const MotionRuntime &)=delete
 
MotionRuntime & operator= (const MotionRuntime &)=delete
 
void ensureFloatCapacity (std::size_t count)
 Pre-size float pool slots (Inactive) and reserve storage.
 
void ensureVec2Capacity (std::size_t count)
 
void ensureVec3Capacity (std::size_t count)
 
void ensureColorCapacity (std::size_t count)
 
void ensureQuatCapacity (std::size_t count)
 
void ensureCapacity (std::size_t floatCount)
 Convenience: ensure float pool capacity (primary hot path).
 
std::size_t floatCapacity () const noexcept
 
std::size_t floatFreeCount () const noexcept
 
std::size_t vec2Capacity () const noexcept
 
std::size_t vec3Capacity () const noexcept
 
std::size_t colorCapacity () const noexcept
 
std::size_t quatCapacity () const noexcept
 
eve::Result< MotionHandle > spawnFloat (const FloatDesc &desc)
 
eve::Result< MotionHandle > spawnVec2 (const Vec2Desc &desc)
 
eve::Result< MotionHandle > spawnVec3 (const Vec3Desc &desc)
 
eve::Result< MotionHandle > spawnColor (const ColorDesc &desc)
 
eve::Result< MotionHandle > spawnQuat (const QuatDesc &desc)
 
bool isActive (MotionHandle handle) const noexcept
 
eve::Result< float > floatValue (MotionHandle handle) const
 
eve::Result< MotionVec2 > vec2Value (MotionHandle handle) const
 
eve::Result< MotionVec3 > vec3Value (MotionHandle handle) const
 
eve::Result< MotionColor > colorValue (MotionHandle handle) const
 
eve::Result< MotionQuat > quatValue (MotionHandle handle) const
 
eve::Result< void > complete (MotionHandle handle)
 
eve::Result< void > cancel (MotionHandle handle)
 
int activeCount () const noexcept
 
int floatSlotCount () const noexcept
 
eve::Result< void > advance (const eve::SimulationStep &step)
 
bool hasCurrentTick () const noexcept
 
eve::SimulationTick currentTick () const noexcept
 

详细描述

Owns typed motion slots and applies SimulationStep updates.

@ownership Animation owns the runtime. Sinks and callbacks are borrowed. @thread Main-thread animation pump only; not synchronized. @reentrancy Callbacks must not spawn/cancel motions on this same runtime during advance (Phase 1 has no deferred command queue).

在文件 MotionRuntime.h 第 27 行定义.

成员类型定义说明

◆ ColorCallback

在文件 MotionRuntime.h 第 32 行定义.

◆ FloatCallback

using eve::animation::MotionRuntime::FloatCallback = std::function<void(float)>

在文件 MotionRuntime.h 第 29 行定义.

◆ QuatCallback

在文件 MotionRuntime.h 第 33 行定义.

◆ Vec2Callback

在文件 MotionRuntime.h 第 30 行定义.

◆ Vec3Callback

在文件 MotionRuntime.h 第 31 行定义.

◆ VoidCallback

using eve::animation::MotionRuntime::VoidCallback = std::function<void()>

在文件 MotionRuntime.h 第 34 行定义.

构造及析构函数说明

◆ MotionRuntime() [1/2]

eve::animation::MotionRuntime::MotionRuntime ( )
default

◆ ~MotionRuntime()

eve::animation::MotionRuntime::~MotionRuntime ( )
default

◆ MotionRuntime() [2/2]

eve::animation::MotionRuntime::MotionRuntime ( const MotionRuntime &  )
delete

成员函数说明

◆ activeCount()

int eve::animation::MotionRuntime::activeCount ( ) const
noexcept

在文件 MotionRuntime.cpp 第 692 行定义.

引用了 n , 以及 s.

被这些函数引用 eve::animation::Animation::getActiveCount().

◆ advance()

eve::Result< void > eve::animation::MotionRuntime::advance ( const eve::SimulationStep &  step)

◆ cancel()

eve::Result< void > eve::animation::MotionRuntime::cancel ( MotionHandle  handle)

在文件 MotionRuntime.cpp 第 653 行定义.

引用了 eve::Result< T >::failure() , 以及 handle.

被这些函数引用 eve::animation::MotionSequenceHandle::cancel().

◆ colorCapacity()

std::size_t eve::animation::MotionRuntime::colorCapacity ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 151 行定义.

◆ colorValue()

eve::Result< MotionColor > eve::animation::MotionRuntime::colorValue ( MotionHandle  handle) const

◆ complete()

eve::Result< void > eve::animation::MotionRuntime::complete ( MotionHandle  handle)

在文件 MotionRuntime.cpp 第 619 行定义.

引用了 eve::Result< T >::failure() , 以及 handle.

被这些函数引用 eve::animation::MotionSequenceHandle::complete().

◆ currentTick()

eve::SimulationTick eve::animation::MotionRuntime::currentTick ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 176 行定义.

被这些函数引用 eve::animation::Animation::advance().

◆ ensureCapacity()

void eve::animation::MotionRuntime::ensureCapacity ( std::size_t  floatCount)
inline

Convenience: ensure float pool capacity (primary hot path).

在文件 MotionRuntime.h 第 145 行定义.

◆ ensureColorCapacity()

void eve::animation::MotionRuntime::ensureColorCapacity ( std::size_t  count)

在文件 MotionRuntime.cpp 第 136 行定义.

引用了 count.

◆ ensureFloatCapacity()

void eve::animation::MotionRuntime::ensureFloatCapacity ( std::size_t  count)

Pre-size float pool slots (Inactive) and reserve storage.

注解
Enables O(1) spawn via the free-list without reallocation churn.

在文件 MotionRuntime.cpp 第 100 行定义.

引用了 count.

◆ ensureQuatCapacity()

void eve::animation::MotionRuntime::ensureQuatCapacity ( std::size_t  count)

在文件 MotionRuntime.cpp 第 148 行定义.

引用了 count.

◆ ensureVec2Capacity()

void eve::animation::MotionRuntime::ensureVec2Capacity ( std::size_t  count)

在文件 MotionRuntime.cpp 第 112 行定义.

引用了 count.

◆ ensureVec3Capacity()

void eve::animation::MotionRuntime::ensureVec3Capacity ( std::size_t  count)

在文件 MotionRuntime.cpp 第 124 行定义.

引用了 count.

◆ floatCapacity()

std::size_t eve::animation::MotionRuntime::floatCapacity ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 147 行定义.

◆ floatFreeCount()

std::size_t eve::animation::MotionRuntime::floatFreeCount ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 148 行定义.

◆ floatSlotCount()

int eve::animation::MotionRuntime::floatSlotCount ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 171 行定义.

◆ floatValue()

eve::Result< float > eve::animation::MotionRuntime::floatValue ( MotionHandle  handle) const

◆ hasCurrentTick()

bool eve::animation::MotionRuntime::hasCurrentTick ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 175 行定义.

被这些函数引用 eve::animation::Animation::advance().

◆ isActive()

bool eve::animation::MotionRuntime::isActive ( MotionHandle  handle) const
noexcept

◆ operator=()

MotionRuntime & eve::animation::MotionRuntime::operator= ( const MotionRuntime &  )
delete

◆ quatCapacity()

std::size_t eve::animation::MotionRuntime::quatCapacity ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 152 行定义.

◆ quatValue()

eve::Result< MotionQuat > eve::animation::MotionRuntime::quatValue ( MotionHandle  handle) const

◆ spawnColor()

eve::Result< MotionHandle > eve::animation::MotionRuntime::spawnColor ( const ColorDesc &  desc)

◆ spawnFloat()

eve::Result< MotionHandle > eve::animation::MotionRuntime::spawnFloat ( const FloatDesc &  desc)

◆ spawnQuat()

eve::Result< MotionHandle > eve::animation::MotionRuntime::spawnQuat ( const QuatDesc &  desc)

◆ spawnVec2()

eve::Result< MotionHandle > eve::animation::MotionRuntime::spawnVec2 ( const Vec2Desc &  desc)

◆ spawnVec3()

eve::Result< MotionHandle > eve::animation::MotionRuntime::spawnVec3 ( const Vec3Desc &  desc)

◆ vec2Capacity()

std::size_t eve::animation::MotionRuntime::vec2Capacity ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 149 行定义.

◆ vec2Value()

eve::Result< MotionVec2 > eve::animation::MotionRuntime::vec2Value ( MotionHandle  handle) const

◆ vec3Capacity()

std::size_t eve::animation::MotionRuntime::vec3Capacity ( ) const
inlinenoexcept

在文件 MotionRuntime.h 第 150 行定义.

◆ vec3Value()

eve::Result< MotionVec3 > eve::animation::MotionRuntime::vec3Value ( MotionHandle  handle) const

该类的文档由以下文件生成: