载入中...
搜索中...
未找到
FpsGait.cpp
浏览该文件的文档.
22 if (!finitePositive(standEyeHeight) || !finitePositive(crouchEyeHeight) || crouchEyeHeight > standEyeHeight)
86 DiagnosticCode::InvalidArgument, "fps head bob reference speed must be positive", "referenceSpeed"));
Stable, structured diagnostics shared by engine modules.
First-person walk/sprint/crouch gait pose (no physics).
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Result< FpsGaitPose > evaluate(const FpsGaitInput &input)
Evaluate one frame and commit the mode. @cost Cheap; O(1) per call. Amortize by calling once per simu...
Definition FpsGait.cpp:42
const FpsGaitProfile & profile() const
Current profile (defaults until setProfile succeeds).
Definition FpsGait.h:61
Result< void > setProfile(const FpsGaitProfile &profile)
Replace the profile; invalid profiles leave the previous one intact.
Definition FpsGait.cpp:35
static Result< FpsHeadBobOffset > solve(const FpsHeadBobRequest &request)
Solve eye Y offset; does not mutate request.
Definition FpsGait.cpp:78
Definition ActionDamageSink.cpp:9
@ Crouch
@ Sprint
@ InvalidArgument
Per-frame intent and environment facts owned by the game.
Definition FpsGait.h:31
Tunable speeds and capsule/eye heights for one FPS body.
Definition FpsGait.h:16
Result< void > validate() const
Reject non-finite or non-positive sizes/speeds.
Definition FpsGait.cpp:14
Eye-local vertical offset from bob + landing dip.
Definition FpsGait.h:89