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 | |
| Skeleton2D & | operator= (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.h 第 12 行定义.
构造及析构函数说明
◆ Skeleton2D() [1/2]
| eve::ik::Skeleton2D::Skeleton2D | ( | ) |
在文件 Skeleton2D.cpp 第 7 行定义.
◆ ~Skeleton2D()
|
default |
◆ Skeleton2D() [2/2]
|
delete |
成员函数说明
◆ bind()
| void eve::ik::Skeleton2D::bind | ( | ) |
在文件 Skeleton2D.cpp 第 171 行定义.
◆ clearConstraints()
| void eve::ik::Skeleton2D::clearConstraints | ( | int | boneId | ) |
在文件 Skeleton2D.cpp 第 155 行定义.
◆ createBone()
| int eve::ik::Skeleton2D::createBone | ( | int | parentId, |
| float | length = 1.f |
||
| ) |
Create a child bone under parentId; returns new bone id.
在文件 Skeleton2D.cpp 第 43 行定义.
引用了 eve::ui::WidgetDesc::id , 以及 parent.
◆ forwardKinematics()
| void eve::ik::Skeleton2D::forwardKinematics | ( | ) |
在文件 Skeleton2D.cpp 第 177 行定义.
◆ getBoneCount()
| int eve::ik::Skeleton2D::getBoneCount | ( | ) | const |
在文件 Skeleton2D.cpp 第 56 行定义.
被这些函数引用 eve::particles::ParticleEmitter::attachToSkeleton2D().
◆ getChild()
| int eve::ik::Skeleton2D::getChild | ( | int | boneId, |
| int | childIndex | ||
| ) | const |
在文件 Skeleton2D.cpp 第 73 行定义.
引用了 b.
◆ getChildCount()
| int eve::ik::Skeleton2D::getChildCount | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 68 行定义.
◆ getLength()
| float eve::ik::Skeleton2D::getLength | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 82 行定义.
◆ getOrientationX()
| float eve::ik::Skeleton2D::getOrientationX | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 122 行定义.
◆ getOrientationY()
| float eve::ik::Skeleton2D::getOrientationY | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 128 行定义.
◆ getParent()
| int eve::ik::Skeleton2D::getParent | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 61 行定义.
引用了 b.
◆ getRootId()
|
inline |
在文件 Skeleton2D.h 第 24 行定义.
◆ getRotation()
| float eve::ik::Skeleton2D::getRotation | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 140 行定义.
◆ getX()
| float eve::ik::Skeleton2D::getX | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 104 行定义.
◆ getY()
| float eve::ik::Skeleton2D::getY | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 110 行定义.
◆ hasConstraints()
| bool eve::ik::Skeleton2D::hasConstraints | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 160 行定义.
◆ initStraightPose()
在文件 Skeleton2D.cpp 第 165 行定义.
◆ native() [1/2]
|
inline |
在文件 Skeleton2D.h 第 56 行定义.
被这些函数引用 eve::ik::Solver2D::solve() , 以及 eve::ik::Solver2D::step().
◆ native() [2/2]
|
inline |
在文件 Skeleton2D.h 第 58 行定义.
◆ operator=()
|
delete |
◆ setConstraints()
| void eve::ik::Skeleton2D::setConstraints | ( | int | boneId, |
| float | minAngle, | ||
| float | maxAngle | ||
| ) |
Joint limits for the single 2D hinge DOF.
在文件 Skeleton2D.cpp 第 146 行定义.
◆ setLength()
| void eve::ik::Skeleton2D::setLength | ( | int | boneId, |
| float | length | ||
| ) |
在文件 Skeleton2D.cpp 第 87 行定义.
◆ setOrientation()
| void eve::ik::Skeleton2D::setOrientation | ( | int | boneId, |
| float | x, | ||
| float | y | ||
| ) |
在文件 Skeleton2D.cpp 第 116 行定义.
◆ setPosition()
| void eve::ik::Skeleton2D::setPosition | ( | int | boneId, |
| float | x, | ||
| float | y | ||
| ) |
在文件 Skeleton2D.cpp 第 98 行定义.
◆ setRotation()
| void eve::ik::Skeleton2D::setRotation | ( | int | boneId, |
| float | angle | ||
| ) |
Local hinge angle (radians) relative to parent forward.
在文件 Skeleton2D.cpp 第 134 行定义.
◆ state() [1/2]
|
inline |
在文件 Skeleton2D.h 第 57 行定义.
被这些函数引用 eve::ik::Solver2D::solve() , 以及 eve::ik::Solver2D::step().
◆ state() [2/2]
|
inline |
在文件 Skeleton2D.h 第 59 行定义.
◆ totalLengthTo()
| float eve::ik::Skeleton2D::totalLengthTo | ( | int | boneId | ) | const |
在文件 Skeleton2D.cpp 第 189 行定义.
◆ updateRotations()
| void eve::ik::Skeleton2D::updateRotations | ( | ) |
在文件 Skeleton2D.cpp 第 183 行定义.
该类的文档由以下文件生成:
- src/modules/ik/Skeleton2D.h
- src/modules/ik/Skeleton2D.cpp