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

Script-facing 3D skeleton + pose state (ik::skeleton3d + ik::ecs3d). Local angles are yaw/pitch in the parent bone frame. 更多...

#include <Skeleton3D.h>

Public 成员函数

 Skeleton3D ()
 Creates an empty 3D skeleton with a root bone.
 
 ~Skeleton3D ()=default
 Releases skeleton and pose state.
 
 Skeleton3D (const Skeleton3D &)=delete
 
Skeleton3D & operator= (const Skeleton3D &)=delete
 
int createBone (int parentId, float length=1.f)
 Create a child bone under parentId; returns new bone id.
 
int getBoneCount () const
 Number of bones currently in the skeleton.
 
int getRootId () const
 Root bone id (always 0).
 
int getParent (int boneId) const
 Parent bone id, or -1 for the root.
 
int getChildCount (int boneId) const
 Number of direct children of boneId.
 
int getChild (int boneId, int childIndex) const
 Child bone id at childIndex under boneId.
 
float getLength (int boneId) const
 Rest length of the bone.
 
void setLength (int boneId, float length)
 Sets the rest length of the bone.
 
void setPosition (int boneId, float x, float y, float z)
 Sets the world-space bone position.
 
float getX (int boneId) const
 World-space X of the bone (or component).
 
float getY (int boneId) const
 World-space Y of the bone (or component).
 
float getZ (int boneId) const
 World-space Z of the bone (or component).
 
void setOrientation (int boneId, float x, float y, float z)
 Sets the bone forward orientation vector.
 
float getOrientationX (int boneId) const
 Orientation vector X.
 
float getOrientationY (int boneId) const
 Orientation vector Y.
 
float getOrientationZ (int boneId) const
 Orientation vector Z.
 
void setRotation (int boneId, float yaw, float pitch)
 Sets local hinge/yaw-pitch rotation (radians).
 
float getRotationYaw (int boneId) const
 Local yaw in radians.
 
float getRotationPitch (int boneId) const
 Local pitch in radians.
 
void setConstraints (int boneId, float minYaw, float minPitch, float maxYaw, float maxPitch)
 Sets joint angle limits for the bone.
 
void clearConstraints (int boneId)
 Removes joint limits from the bone.
 
bool hasConstraints (int boneId) const
 True if the bone has joint limits.
 
void initStraightPose (float rootX=0.f, float rootY=0.f, float rootZ=0.f)
 Initializes a straight chain pose from the root.
 
void bind ()
 Binds the current pose as the rest pose.
 
void forwardKinematics ()
 Updates world positions from local rotations.
 
void updateRotations ()
 Derives local rotations from world positions.
 
float totalLengthTo (int boneId) const
 Sum of bone lengths from root to boneId inclusive.
 
::ik::skeleton3d & native ()
 
::ik::ecs3d & state ()
 
const ::ik::skeleton3d & native () const
 
const ::ik::ecs3d & state () const
 

详细描述

Script-facing 3D skeleton + pose state (ik::skeleton3d + ik::ecs3d). Local angles are yaw/pitch in the parent bone frame.

在文件 Skeleton3D.h 第 13 行定义.

构造及析构函数说明

◆ Skeleton3D() [1/2]

eve::ik::Skeleton3D::Skeleton3D ( )

Creates an empty 3D skeleton with a root bone.

在文件 Skeleton3D.cpp 第 7 行定义.

◆ ~Skeleton3D()

eve::ik::Skeleton3D::~Skeleton3D ( )
default

Releases skeleton and pose state.

◆ Skeleton3D() [2/2]

eve::ik::Skeleton3D::Skeleton3D ( const Skeleton3D &  )
delete

成员函数说明

◆ bind()

void eve::ik::Skeleton3D::bind ( )

Binds the current pose as the rest pose.

在文件 Skeleton3D.cpp 第 190 行定义.

◆ clearConstraints()

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

Removes joint limits from the bone.

在文件 Skeleton3D.cpp 第 174 行定义.

◆ createBone()

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

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

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

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

◆ forwardKinematics()

void eve::ik::Skeleton3D::forwardKinematics ( )

Updates world positions from local rotations.

在文件 Skeleton3D.cpp 第 196 行定义.

◆ getBoneCount()

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

Number of bones currently in the skeleton.

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

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

◆ getChild()

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

Child bone id at childIndex under boneId.

在文件 Skeleton3D.cpp 第 73 行定义.

引用了 b.

◆ getChildCount()

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

Number of direct children of boneId.

在文件 Skeleton3D.cpp 第 68 行定义.

◆ getLength()

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

Rest length of the bone.

在文件 Skeleton3D.cpp 第 82 行定义.

◆ getOrientationX()

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

Orientation vector X.

在文件 Skeleton3D.cpp 第 128 行定义.

◆ getOrientationY()

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

Orientation vector Y.

在文件 Skeleton3D.cpp 第 134 行定义.

◆ getOrientationZ()

float eve::ik::Skeleton3D::getOrientationZ ( int  boneId) const

Orientation vector Z.

在文件 Skeleton3D.cpp 第 140 行定义.

◆ getParent()

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

Parent bone id, or -1 for the root.

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

引用了 b.

◆ getRootId()

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

Root bone id (always 0).

在文件 Skeleton3D.h 第 29 行定义.

◆ getRotationPitch()

float eve::ik::Skeleton3D::getRotationPitch ( int  boneId) const

Local pitch in radians.

在文件 Skeleton3D.cpp 第 158 行定义.

◆ getRotationYaw()

float eve::ik::Skeleton3D::getRotationYaw ( int  boneId) const

Local yaw in radians.

在文件 Skeleton3D.cpp 第 152 行定义.

◆ getX()

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

World-space X of the bone (or component).

在文件 Skeleton3D.cpp 第 104 行定义.

◆ getY()

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

World-space Y of the bone (or component).

在文件 Skeleton3D.cpp 第 110 行定义.

◆ getZ()

float eve::ik::Skeleton3D::getZ ( int  boneId) const

World-space Z of the bone (or component).

在文件 Skeleton3D.cpp 第 116 行定义.

◆ hasConstraints()

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

True if the bone has joint limits.

在文件 Skeleton3D.cpp 第 179 行定义.

◆ initStraightPose()

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

Initializes a straight chain pose from the root.

在文件 Skeleton3D.cpp 第 184 行定义.

◆ native() [1/2]

::ik::skeleton3d & eve::ik::Skeleton3D::native ( )
inline

在文件 Skeleton3D.h 第 87 行定义.

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

◆ native() [2/2]

const ::ik::skeleton3d & eve::ik::Skeleton3D::native ( ) const
inline

在文件 Skeleton3D.h 第 89 行定义.

◆ operator=()

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

◆ setConstraints()

void eve::ik::Skeleton3D::setConstraints ( int  boneId,
float  minYaw,
float  minPitch,
float  maxYaw,
float  maxPitch 
)

Sets joint angle limits for the bone.

在文件 Skeleton3D.cpp 第 164 行定义.

◆ setLength()

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

Sets the rest length of the bone.

在文件 Skeleton3D.cpp 第 87 行定义.

引用了 length.

◆ setOrientation()

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

Sets the bone forward orientation vector.

在文件 Skeleton3D.cpp 第 122 行定义.

引用了 x, y , 以及 z.

◆ setPosition()

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

Sets the world-space bone position.

在文件 Skeleton3D.cpp 第 98 行定义.

引用了 x, y , 以及 z.

◆ setRotation()

void eve::ik::Skeleton3D::setRotation ( int  boneId,
float  yaw,
float  pitch 
)

Sets local hinge/yaw-pitch rotation (radians).

在文件 Skeleton3D.cpp 第 146 行定义.

引用了 pitch , 以及 yaw.

◆ state() [1/2]

::ik::ecs3d & eve::ik::Skeleton3D::state ( )
inline

在文件 Skeleton3D.h 第 88 行定义.

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

◆ state() [2/2]

const ::ik::ecs3d & eve::ik::Skeleton3D::state ( ) const
inline

在文件 Skeleton3D.h 第 90 行定义.

◆ totalLengthTo()

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

Sum of bone lengths from root to boneId inclusive.

在文件 Skeleton3D.cpp 第 208 行定义.

◆ updateRotations()

void eve::ik::Skeleton3D::updateRotations ( )

Derives local rotations from world positions.

在文件 Skeleton3D.cpp 第 202 行定义.


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