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

Script-facing 3D skeleton + pose state. Local angles are yaw/pitch in the parent bone frame. 更多...

#include <Skeleton3D.h>

类

struct  Impl
 

Public 成员函数

 Skeleton3D ()
 Creates an empty 3D skeleton with a root bone.
 
 ~Skeleton3D ()
 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.
 

友元

class Solver3D
 

详细描述

Script-facing 3D skeleton + pose state. Local angles are yaw/pitch in the parent bone frame.

注解
Public headers intentionally hide the underlying ik.hpp types (Pimpl).

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

构造及析构函数说明

◆ Skeleton3D() [1/2]

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

Creates an empty 3D skeleton with a root bone.

在文件 Skeleton2D.cpp 第 178 行定义.

◆ ~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.

在文件 Skeleton2D.cpp 第 336 行定义.

◆ clearConstraints()

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

Removes joint limits from the bone.

在文件 Skeleton2D.cpp 第 320 行定义.

◆ createBone()

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

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

在文件 Skeleton2D.cpp 第 191 行定义.

引用了 length, parent , 以及 parentId.

◆ forwardKinematics()

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

Updates world positions from local rotations.

在文件 Skeleton2D.cpp 第 342 行定义.

◆ getBoneCount()

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

Number of bones currently in the skeleton.

在文件 Skeleton2D.cpp 第 204 行定义.

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

◆ getChild()

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

Child bone id at childIndex under boneId.

在文件 Skeleton2D.cpp 第 221 行定义.

引用了 b.

◆ getChildCount()

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

Number of direct children of boneId.

在文件 Skeleton2D.cpp 第 216 行定义.

◆ getLength()

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

Rest length of the bone.

在文件 Skeleton2D.cpp 第 230 行定义.

◆ getOrientationX()

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

Orientation vector X.

在文件 Skeleton2D.cpp 第 276 行定义.

◆ getOrientationY()

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

Orientation vector Y.

在文件 Skeleton2D.cpp 第 282 行定义.

◆ getOrientationZ()

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

Orientation vector Z.

在文件 Skeleton2D.cpp 第 288 行定义.

◆ getParent()

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

Parent bone id, or -1 for the root.

在文件 Skeleton2D.cpp 第 209 行定义.

引用了 b.

◆ getRootId()

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

Root bone id (always 0).

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

◆ getRotationPitch()

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

Local pitch in radians.

在文件 Skeleton2D.cpp 第 306 行定义.

◆ getRotationYaw()

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

Local yaw in radians.

在文件 Skeleton2D.cpp 第 300 行定义.

◆ getX()

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

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

在文件 Skeleton2D.cpp 第 252 行定义.

◆ getY()

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

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

在文件 Skeleton2D.cpp 第 258 行定义.

◆ getZ()

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

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

在文件 Skeleton2D.cpp 第 264 行定义.

◆ hasConstraints()

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

True if the bone has joint limits.

在文件 Skeleton2D.cpp 第 325 行定义.

◆ 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.

在文件 Skeleton2D.cpp 第 330 行定义.

◆ 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.

在文件 Skeleton2D.cpp 第 312 行定义.

◆ setLength()

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

Sets the rest length of the bone.

在文件 Skeleton2D.cpp 第 235 行定义.

引用了 length.

◆ setOrientation()

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

Sets the bone forward orientation vector.

在文件 Skeleton2D.cpp 第 270 行定义.

引用了 x, y , 以及 z.

◆ setPosition()

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

Sets the world-space bone position.

在文件 Skeleton2D.cpp 第 246 行定义.

引用了 x, y , 以及 z.

◆ setRotation()

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

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

在文件 Skeleton2D.cpp 第 294 行定义.

引用了 pitch , 以及 yaw.

◆ totalLengthTo()

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

Sum of bone lengths from root to boneId inclusive.

在文件 Skeleton2D.cpp 第 354 行定义.

◆ updateRotations()

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

Derives local rotations from world positions.

在文件 Skeleton2D.cpp 第 348 行定义.

友元及相关函数文档

◆ Solver3D

friend class Solver3D
friend

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


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