载入中...
搜索中...
未找到
eve::ik::Skeleton2D类 参考

Script-facing 2D skeleton + pose state (ik::skeleton2d + ik::ecs2d). Bone indices are stable after each createBone / topological refresh. Root bone is always id 0. 更多...

#include <Skeleton2D.h>

Public 成员函数

 Skeleton2D ()
 
 ~Skeleton2D ()=default
 
 Skeleton2D (const Skeleton2D &)=delete
 
Skeleton2Doperator= (const Skeleton2D &)=delete
 
int createBone (int parentId, float length=1.f)
 Create a child bone under parentId; returns new bone id.
 
int getBoneCount () const
 
int getRootId () const
 
int getParent (int boneId) const
 
int getChildCount (int boneId) const
 
int getChild (int boneId, int childIndex) const
 
float getLength (int boneId) const
 
void setLength (int boneId, float length)
 
void setPosition (int boneId, float x, float y)
 
float getX (int boneId) const
 
float getY (int boneId) const
 
void setOrientation (int boneId, float x, float y)
 
float getOrientationX (int boneId) const
 
float getOrientationY (int boneId) const
 
void setRotation (int boneId, float angle)
 Local hinge angle (radians) relative to parent forward.
 
float getRotation (int boneId) const
 
void setConstraints (int boneId, float minAngle, float maxAngle)
 Joint limits for the single 2D hinge DOF.
 
void clearConstraints (int boneId)
 
bool hasConstraints (int boneId) const
 
void initStraightPose (float rootX=0.f, float rootY=0.f)
 
void bind ()
 
void forwardKinematics ()
 
void updateRotations ()
 
float totalLengthTo (int boneId) const
 
::ik::skeleton2d & native ()
 
::ik::ecs2d & state ()
 
const ::ik::skeleton2d & native () const
 
const ::ik::ecs2d & state () const
 

详细描述

Script-facing 2D skeleton + pose state (ik::skeleton2d + ik::ecs2d). Bone indices are stable after each createBone / topological refresh. Root bone is always id 0.

在文件 Skeleton2D.h12 行定义.

构造及析构函数说明

◆ Skeleton2D() [1/2]

eve::ik::Skeleton2D::Skeleton2D ( )

在文件 Skeleton2D.cpp7 行定义.

◆ ~Skeleton2D()

eve::ik::Skeleton2D::~Skeleton2D ( )
default

◆ Skeleton2D() [2/2]

eve::ik::Skeleton2D::Skeleton2D ( const Skeleton2D )
delete

成员函数说明

◆ bind()

void eve::ik::Skeleton2D::bind ( )

在文件 Skeleton2D.cpp171 行定义.

◆ clearConstraints()

void eve::ik::Skeleton2D::clearConstraints ( int  boneId)

在文件 Skeleton2D.cpp155 行定义.

◆ createBone()

int eve::ik::Skeleton2D::createBone ( int  parentId,
float  length = 1.f 
)

Create a child bone under parentId; returns new bone id.

在文件 Skeleton2D.cpp43 行定义.

引用了 eve::ui::WidgetDesc::id , 以及 parent.

◆ forwardKinematics()

void eve::ik::Skeleton2D::forwardKinematics ( )

在文件 Skeleton2D.cpp177 行定义.

◆ getBoneCount()

int eve::ik::Skeleton2D::getBoneCount ( ) const

在文件 Skeleton2D.cpp56 行定义.

被这些函数引用 eve::particles::ParticleEmitter::attachToSkeleton2D().

◆ getChild()

int eve::ik::Skeleton2D::getChild ( int  boneId,
int  childIndex 
) const

在文件 Skeleton2D.cpp73 行定义.

引用了 b.

◆ getChildCount()

int eve::ik::Skeleton2D::getChildCount ( int  boneId) const

在文件 Skeleton2D.cpp68 行定义.

◆ getLength()

float eve::ik::Skeleton2D::getLength ( int  boneId) const

在文件 Skeleton2D.cpp82 行定义.

◆ getOrientationX()

float eve::ik::Skeleton2D::getOrientationX ( int  boneId) const

在文件 Skeleton2D.cpp122 行定义.

◆ getOrientationY()

float eve::ik::Skeleton2D::getOrientationY ( int  boneId) const

在文件 Skeleton2D.cpp128 行定义.

◆ getParent()

int eve::ik::Skeleton2D::getParent ( int  boneId) const

在文件 Skeleton2D.cpp61 行定义.

引用了 b.

◆ getRootId()

int eve::ik::Skeleton2D::getRootId ( ) const
inline

在文件 Skeleton2D.h24 行定义.

◆ getRotation()

float eve::ik::Skeleton2D::getRotation ( int  boneId) const

在文件 Skeleton2D.cpp140 行定义.

◆ getX()

float eve::ik::Skeleton2D::getX ( int  boneId) const

在文件 Skeleton2D.cpp104 行定义.

◆ getY()

float eve::ik::Skeleton2D::getY ( int  boneId) const

在文件 Skeleton2D.cpp110 行定义.

◆ hasConstraints()

bool eve::ik::Skeleton2D::hasConstraints ( int  boneId) const

在文件 Skeleton2D.cpp160 行定义.

◆ initStraightPose()

void eve::ik::Skeleton2D::initStraightPose ( float  rootX = 0.f,
float  rootY = 0.f 
)

在文件 Skeleton2D.cpp165 行定义.

◆ native() [1/2]

::ik::skeleton2d & eve::ik::Skeleton2D::native ( )
inline

在文件 Skeleton2D.h56 行定义.

被这些函数引用 eve::ik::Solver2D::solve() , 以及 eve::ik::Solver2D::step().

◆ native() [2/2]

const ::ik::skeleton2d & eve::ik::Skeleton2D::native ( ) const
inline

在文件 Skeleton2D.h58 行定义.

◆ operator=()

Skeleton2D & eve::ik::Skeleton2D::operator= ( const Skeleton2D )
delete

◆ setConstraints()

void eve::ik::Skeleton2D::setConstraints ( int  boneId,
float  minAngle,
float  maxAngle 
)

Joint limits for the single 2D hinge DOF.

在文件 Skeleton2D.cpp146 行定义.

◆ setLength()

void eve::ik::Skeleton2D::setLength ( int  boneId,
float  length 
)

在文件 Skeleton2D.cpp87 行定义.

◆ setOrientation()

void eve::ik::Skeleton2D::setOrientation ( int  boneId,
float  x,
float  y 
)

在文件 Skeleton2D.cpp116 行定义.

引用了 x , 以及 y.

◆ setPosition()

void eve::ik::Skeleton2D::setPosition ( int  boneId,
float  x,
float  y 
)

在文件 Skeleton2D.cpp98 行定义.

引用了 x , 以及 y.

◆ setRotation()

void eve::ik::Skeleton2D::setRotation ( int  boneId,
float  angle 
)

Local hinge angle (radians) relative to parent forward.

在文件 Skeleton2D.cpp134 行定义.

◆ state() [1/2]

::ik::ecs2d & eve::ik::Skeleton2D::state ( )
inline

在文件 Skeleton2D.h57 行定义.

被这些函数引用 eve::ik::Solver2D::solve() , 以及 eve::ik::Solver2D::step().

◆ state() [2/2]

const ::ik::ecs2d & eve::ik::Skeleton2D::state ( ) const
inline

在文件 Skeleton2D.h59 行定义.

◆ totalLengthTo()

float eve::ik::Skeleton2D::totalLengthTo ( int  boneId) const

在文件 Skeleton2D.cpp189 行定义.

◆ updateRotations()

void eve::ik::Skeleton2D::updateRotations ( )

在文件 Skeleton2D.cpp183 行定义.


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