Deterministic Walk / Sprint / Crouch state machine. 更多...
#include <FpsGait.h>
Public 成员函数 | |
| Result< void > | setProfile (const FpsGaitProfile &profile) |
| Replace the profile; invalid profiles leave the previous one intact. | |
| const FpsGaitProfile & | profile () const |
| Current profile (defaults until setProfile succeeds). | |
| FpsGaitMode | mode () const |
| Last committed mode. | |
| Result< FpsGaitPose > | evaluate (const FpsGaitInput &input) |
| Evaluate one frame and commit the mode. @cost Cheap; O(1) per call. Amortize by calling once per simulation step. | |
详细描述
Deterministic Walk / Sprint / Crouch state machine.
Priority: Crouch > Sprint > Walk. Sprint requires grounded and not crouching. Crouch latches while !canStand so stand-up cannot teleport into geometry. Does not integrate motion or query physics — callers drive moveCapsule.
成员函数说明
◆ evaluate()
| Result< FpsGaitPose > eve::combat::FpsGait::evaluate | ( | const FpsGaitInput & | input | ) |
Evaluate one frame and commit the mode. @cost Cheap; O(1) per call. Amortize by calling once per simulation step.
在文件 FpsGait.cpp 第 42 行定义.
引用了 eve::combat::FpsGaitProfile::capsuleRadius, eve::combat::Crouch, eve::combat::FpsGaitProfile::crouchEyeHeight, eve::combat::FpsGaitProfile::crouchHeight, eve::combat::FpsGaitProfile::crouchSpeed, eve::Result< T >::failure(), input, pose, eve::combat::Sprint, eve::combat::FpsGaitProfile::sprintSpeed, eve::combat::FpsGaitProfile::standEyeHeight, eve::combat::FpsGaitProfile::standHeight, eve::Result< T >::success(), valid, eve::combat::FpsGaitProfile::validate(), eve::combat::Walk , 以及 eve::combat::FpsGaitProfile::walkSpeed.
◆ mode()
|
inline |
◆ profile()
|
inline |
◆ setProfile()
| Result< void > eve::combat::FpsGait::setProfile | ( | const FpsGaitProfile & | profile | ) |
Replace the profile; invalid profiles leave the previous one intact.
在文件 FpsGait.cpp 第 35 行定义.
引用了 profile(), eve::Result< T >::success(), valid , 以及 eve::combat::FpsGaitProfile::validate().
该类的文档由以下文件生成:
- src/modules/combat/FpsGait.h
- src/modules/combat/FpsGait.cpp