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

Paired-foot IK with contact smoothing and pelvis compensation. 更多...

#include <FootIKSolver.h>

Public 成员函数

 FootIKSolver (AnimSkeleton *skeleton)
 Construct for a non-null borrowed skeleton.
 
 ~FootIKSolver ()
 Foot ik solver.
 
 FootIKSolver (const FootIKSolver &)=default
 Foot ik solver.
 
FootIKSolver & operator= (const FootIKSolver &)=default
 Operator =.
 
void setSkeleton (AnimSkeleton *skeleton)
 Rebind; changing skeleton clears all bone-index configuration.
 
AnimSkeleton * getSkeleton () const
 Return the borrowed skeleton, or null. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or solver destruction.
 
void setPelvisBone (int bone)
 Configure the pelvis bone.
 
void configureLeftLeg (int hip, int knee, int foot, float soleOffset=0.f)
 Configure the left hip-knee-foot chain and sole offset.
 
void configureRightLeg (int hip, int knee, int foot, float soleOffset=0.f)
 Configure the right hip-knee-foot chain and sole offset.
 
void configureLeftToe (int toe, float soleOffset=0.f)
 Configure an optional left toe child and its sole offset.
 
void configureRightToe (int toe, float soleOffset=0.f)
 Configure an optional right toe child and its sole offset.
 
void setGroundProvider (const FootIKGroundProvider *provider)
 Set an optional automatic ground-query provider. @ownership Borrowed; ownership remains with the caller. @lifetime The provider must outlive this solver or be cleared before destruction.
 
const FootIKGroundProvider * getGroundProvider () const
 Return the borrowed ground provider, or null. @ownership Borrowed; ownership remains with the caller. @lifetime Valid until setGroundProvider(), provider destruction, or solver destruction.
 
void setGroundQuery (float startHeight, float distance)
 Set ray origin height and downward query distance.
 
void setLeftContact (bool hit, float x, float y, float z, float nx, float ny, float nz, float weight=1.f)
 Supply the left model-space ground contact.
 
void setRightContact (bool hit, float x, float y, float z, float nx, float ny, float nz, float weight=1.f)
 Supply the right model-space ground contact.
 
void setMaxPelvisOffset (float distance)
 Set maximum pelvis compensation distance.
 
void setMinGroundNormalY (float value)
 Set minimum accepted upward normal cosine in [0, 1].
 
void setPositionResponse (float value)
 Set contact interpolation response in inverse seconds.
 
void setRotationResponse (float value)
 Set foot-normal interpolation response in inverse seconds.
 
void setContactGraceTime (float seconds)
 Set how long a missing automatic contact retains its prior target.
 
void setFootLockEnabled (bool enabled)
 Enable or disable world-space foot locking.
 
void setFootLockThresholds (float enterWeight, float exitWeight)
 Set lock enter and release contact-weight thresholds.
 
bool isLeftFootLocked () const
 Return whether the left foot is currently locked.
 
bool isRightFootLocked () const
 Return whether the right foot is currently locked.
 
void reset ()
 Clear interpolated contacts.
 
void apply (AnimPose *pose, float dt)
 Apply using injected delta time and owning contact values.
 
FootIKDebugSnapshot debugSnapshot () const
 Copy smoothed contacts and lock state for tooling visualization.
 

详细描述

Paired-foot IK with contact smoothing and pelvis compensation.

注解
Main-thread only. The borrowed skeleton must outlive this object.

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

构造及析构函数说明

◆ FootIKSolver() [1/2]

eve::animation::FootIKSolver::FootIKSolver ( AnimSkeleton *  skeleton)
explicit

Construct for a non-null borrowed skeleton.

在文件 FootIKSolver.cpp 第 15 行定义.

◆ ~FootIKSolver()

eve::animation::FootIKSolver::~FootIKSolver ( )
default

Foot ik solver.

◆ FootIKSolver() [2/2]

eve::animation::FootIKSolver::FootIKSolver ( const FootIKSolver &  )
default

Foot ik solver.

成员函数说明

◆ apply()

void eve::animation::FootIKSolver::apply ( AnimPose *  pose,
float  dt 
)

Apply using injected delta time and owning contact values.

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

引用了 eve::animation::AnimSkeleton::getBoneCount(), eve::animation::Leg, offset, p , 以及 pose.

◆ configureLeftLeg()

void eve::animation::FootIKSolver::configureLeftLeg ( int  hip,
int  knee,
int  foot,
float  soleOffset = 0.f 
)

Configure the left hip-knee-foot chain and sole offset.

在文件 FootIKSolver.cpp 第 36 行定义.

引用了 f , 以及 h.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ configureLeftToe()

void eve::animation::FootIKSolver::configureLeftToe ( int  toe,
float  soleOffset = 0.f 
)

Configure an optional left toe child and its sole offset.

在文件 FootIKSolver.cpp 第 43 行定义.

引用了 offset.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ configureRightLeg()

void eve::animation::FootIKSolver::configureRightLeg ( int  hip,
int  knee,
int  foot,
float  soleOffset = 0.f 
)

Configure the right hip-knee-foot chain and sole offset.

在文件 FootIKSolver.cpp 第 37 行定义.

引用了 f , 以及 h.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ configureRightToe()

void eve::animation::FootIKSolver::configureRightToe ( int  toe,
float  soleOffset = 0.f 
)

Configure an optional right toe child and its sole offset.

在文件 FootIKSolver.cpp 第 44 行定义.

引用了 offset.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ debugSnapshot()

◆ getGroundProvider()

const FootIKGroundProvider * eve::animation::FootIKSolver::getGroundProvider ( ) const
inline

Return the borrowed ground provider, or null. @ownership Borrowed; ownership remains with the caller. @lifetime Valid until setGroundProvider(), provider destruction, or solver destruction.

在文件 FootIKSolver.h 第 71 行定义.

◆ getSkeleton()

AnimSkeleton * eve::animation::FootIKSolver::getSkeleton ( ) const
inline

Return the borrowed skeleton, or null. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or solver destruction.

在文件 FootIKSolver.h 第 49 行定义.

◆ isLeftFootLocked()

bool eve::animation::FootIKSolver::isLeftFootLocked ( ) const
inline

Return whether the left foot is currently locked.

在文件 FootIKSolver.h 第 95 行定义.

◆ isRightFootLocked()

bool eve::animation::FootIKSolver::isRightFootLocked ( ) const
inline

Return whether the right foot is currently locked.

在文件 FootIKSolver.h 第 97 行定义.

◆ operator=()

FootIKSolver & eve::animation::FootIKSolver::operator= ( const FootIKSolver &  )
default

Operator =.

◆ reset()

void eve::animation::FootIKSolver::reset ( )

Clear interpolated contacts.

在文件 FootIKSolver.cpp 第 66 行定义.

◆ setContactGraceTime()

void eve::animation::FootIKSolver::setContactGraceTime ( float  seconds)

Set how long a missing automatic contact retains its prior target.

在文件 FootIKSolver.cpp 第 63 行定义.

引用了 v.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setFootLockEnabled()

void eve::animation::FootIKSolver::setFootLockEnabled ( bool  enabled)

Enable or disable world-space foot locking.

在文件 FootIKSolver.cpp 第 64 行定义.

引用了 enabled.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setFootLockThresholds()

void eve::animation::FootIKSolver::setFootLockThresholds ( float  enterWeight,
float  exitWeight 
)

Set lock enter and release contact-weight thresholds.

在文件 FootIKSolver.cpp 第 65 行定义.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setGroundProvider()

void eve::animation::FootIKSolver::setGroundProvider ( const FootIKGroundProvider *  provider)
inline

Set an optional automatic ground-query provider. @ownership Borrowed; ownership remains with the caller. @lifetime The provider must outlive this solver or be cleared before destruction.

在文件 FootIKSolver.h 第 65 行定义.

◆ setGroundQuery()

void eve::animation::FootIKSolver::setGroundQuery ( float  startHeight,
float  distance 
)

Set ray origin height and downward query distance.

在文件 FootIKSolver.cpp 第 45 行定义.

引用了 distance.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setLeftContact()

void eve::animation::FootIKSolver::setLeftContact ( bool  hit,
float  x,
float  y,
float  z,
float  nx,
float  ny,
float  nz,
float  weight = 1.f 
)

Supply the left model-space ground contact.

在文件 FootIKSolver.cpp 第 53 行定义.

引用了 h, nx, ny, nz, w, x, y , 以及 z.

◆ setMaxPelvisOffset()

void eve::animation::FootIKSolver::setMaxPelvisOffset ( float  distance)

Set maximum pelvis compensation distance.

在文件 FootIKSolver.cpp 第 59 行定义.

引用了 v.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setMinGroundNormalY()

void eve::animation::FootIKSolver::setMinGroundNormalY ( float  value)

Set minimum accepted upward normal cosine in [0, 1].

在文件 FootIKSolver.cpp 第 60 行定义.

引用了 v.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setPelvisBone()

void eve::animation::FootIKSolver::setPelvisBone ( int  bone)

Configure the pelvis bone.

在文件 FootIKSolver.cpp 第 23 行定义.

引用了 bone , 以及 eve::animation::AnimSkeleton::getBoneCount().

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setPositionResponse()

void eve::animation::FootIKSolver::setPositionResponse ( float  value)

Set contact interpolation response in inverse seconds.

在文件 FootIKSolver.cpp 第 61 行定义.

引用了 v.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setRightContact()

void eve::animation::FootIKSolver::setRightContact ( bool  hit,
float  x,
float  y,
float  z,
float  nx,
float  ny,
float  nz,
float  weight = 1.f 
)

Supply the right model-space ground contact.

在文件 FootIKSolver.cpp 第 56 行定义.

引用了 h, nx, ny, nz, w, x, y , 以及 z.

◆ setRotationResponse()

void eve::animation::FootIKSolver::setRotationResponse ( float  value)

Set foot-normal interpolation response in inverse seconds.

在文件 FootIKSolver.cpp 第 62 行定义.

引用了 v.

被这些函数引用 eve::animation::DynamicBoneConfig::apply().

◆ setSkeleton()

void eve::animation::FootIKSolver::setSkeleton ( AnimSkeleton *  skeleton)

Rebind; changing skeleton clears all bone-index configuration.

在文件 FootIKSolver.cpp 第 19 行定义.


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