载入中...
搜索中...
未找到
AnimationPlayerBindings.cpp
浏览该文件的文档.
23 if (bits == static_cast<std::uint8_t>(RootMotionLockAxes::X | RootMotionLockAxes::Y)) return "xy";
24 if (bits == static_cast<std::uint8_t>(RootMotionLockAxes::Y | RootMotionLockAxes::Z)) return "yz";
58 player.addFunc("setRootMotionLockAxes", [vm = table.getHandle()](AnimPlayer* self, const std::string& axes) {
65 player.addFunc("setRootMotionApplySpace", [vm = table.getHandle()](AnimPlayer* self, const std::string& space) {
72 player.addFunc("setBakeRootTranslationIntoPose", [vm = table.getHandle()](AnimPlayer* self, bool enabled) {
77 player.addFunc("setBakeRootRotationIntoPose", [vm = table.getHandle()](AnimPlayer* self, bool enabled) {
82 player.addFunc("setRootMotionLockRotation", [vm = table.getHandle()](AnimPlayer* self, bool enabled) {
98 player.addFunc("setRootMotionCharacterYaw", [vm = table.getHandle()](AnimPlayer* self, float yaw) {
The single Squirrel projection for common Result, Status and Value.
Single-clip (or cross-fading) 3D animation player. Script type: AnimPlayer.
Definition AnimPlayer.h:30
std::string getEventName(int index) const override
Name of a dispatched event, or empty for invalid index.
Definition AnimPlayer.cpp:150
void setRootMotionBone(int boneIndex)
Select the bone whose per-frame motion is extracted (default 0).
Definition AnimPlayer.cpp:116
void clearEvents()
Clear currently dispatched events. update() also clears them at frame start.
Definition AnimPlayer.h:139
std::string consumeEvent()
Pop the oldest notify crossed since the previous update.
Definition AnimPlayer.cpp:137
void update(float dt)
Legacy seconds facade retained for scripts and old callers.
Definition AnimPlayer.cpp:269
void crossFade(AnimClip *clip, float blendSeconds)
Cross-fade to clip over blendSeconds (keeps sampling previous until done).
Definition AnimPlayer.cpp:76
std::string getEventPayload(int index) const override
Payload of a dispatched event, or empty for invalid index.
Definition AnimPlayer.cpp:155
int getEventCount() const override
Number of events crossed by the most recent play/update call.
Definition AnimPlayer.h:133
float getRootMotionX() const
Controller-facing translation X after policy filtering (BoneLocal or CharacterFacing).
Definition AnimPlayer.h:112
AnimPose * getPose() override
Borrowed pointer accessor. @ownership Borrowed @lifetime Valid while the owning animation object rema...
Definition AnimPlayer.cpp:114
void setUpdateRate(float hz)
Limit pose evaluation frequency for animation LOD; 0 updates every call.
Definition AnimPlayer.cpp:144
AnimClip * getClip() const
Borrow the selected clip, or null if none is selected. The caller owns the clip and must keep it aliv...
Definition AnimPlayer.h:86
Definition Animation.cpp:58
RootMotionLockAxes
Per-axis translation locks for extracted root-motion deltas.
Definition RootMotionPolicy.h:21
@ HorizontalXZ
void exposeAnimPlayerBindings(ssq::Table &table)
Register playback, sampling and event inspection for AnimPlayer.
Definition AnimationPlayerBindings.cpp:38
RootMotionApplySpace
Coordinate space used when publishing root-motion translation.
Definition RootMotionPolicy.h:52
@ CharacterFacing
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:470