Spine skeleton JSON data (bones / slots / skins / animations). 更多...
#include <SpineSkeletonData.h>
类 | |
| struct | AnimationData |
| struct | AttachmentKey |
| struct | BoneData |
| struct | BoneTimeline |
| struct | FloatKey |
| struct | RegionAttachment |
| struct | ScaleKey |
| struct | SkinData |
| struct | SlotData |
| struct | SlotTimeline |
| struct | TranslateKey |
Public 类型 | |
| using | SkinAttachments = std::unordered_map< int, std::unordered_map< std::string, RegionAttachment > > |
| slotIndex → attachmentName → region | |
Public 成员函数 | |
| SpineSkeletonData ()=default | |
| ~SpineSkeletonData ()=default | |
| SpineSkeletonData (const SpineSkeletonData &)=delete | |
| SpineSkeletonData & | operator= (const SpineSkeletonData &)=delete |
| bool | loadFromJson (const std::string &json, std::string *error=nullptr) |
| bool | loadFromFile (const std::string &path, std::string *error=nullptr) |
| void | clear () |
| std::string | getSpineVersion () const |
| int | getBoneCount () const |
| int | findBone (const std::string &name) const |
| std::string | getBoneName (int index) const |
| int | getBoneParent (int index) const |
| float | getBoneX (int index) const |
| float | getBoneY (int index) const |
| float | getBoneRotation (int index) const |
| float | getBoneScaleX (int index) const |
| float | getBoneScaleY (int index) const |
| int | getSlotCount () const |
| int | findSlot (const std::string &name) const |
| std::string | getSlotName (int index) const |
| int | getSlotBone (int index) const |
| std::string | getSlotAttachment (int index) const |
| int | getSkinCount () const |
| int | findSkin (const std::string &name) const |
| std::string | getSkinName (int index) const |
| int | getDefaultSkin () const |
| int | getAnimationCount () const |
| int | findAnimation (const std::string &name) const |
| std::string | getAnimationName (int index) const |
| float | getAnimationDuration (int index) const |
| const BoneData & | bone (int i) const |
| const SlotData & | slot (int i) const |
| const SkinData & | skin (int i) const |
| const AnimationData & | animation (int i) const |
| const RegionAttachment * | findAttachment (int skinIndex, int slotIndex, const std::string &name) const |
详细描述
Spine skeleton JSON data (bones / slots / skins / animations).
Supports a practical subset for 2D region attachments:
- bones: name, parent, x, y, rotation, scaleX, scaleY
- slots: name, bone, attachment
- skins: region attachments (x/y/rotation/width/height/path)
- animations: bone translate/rotate/scale + slot attachment timelines
Mesh / IK / path / clipping / deform are ignored (use official spine-cpp plugin for full runtime). Script type: SpineSkeletonData.
在文件 SpineSkeletonData.h 第 21 行定义.
成员类型定义说明
◆ SkinAttachments
| using eve::animation::SpineSkeletonData::SkinAttachments = std::unordered_map<int, std::unordered_map<std::string, RegionAttachment> > |
slotIndex → attachmentName → region
在文件 SpineSkeletonData.h 第 87 行定义.
构造及析构函数说明
◆ SpineSkeletonData() [1/2]
|
default |
◆ ~SpineSkeletonData()
|
default |
◆ SpineSkeletonData() [2/2]
|
delete |
成员函数说明
◆ animation()
|
inline |
在文件 SpineSkeletonData.h 第 139 行定义.
被这些函数引用 eve::animation::SpineAnim::apply().
◆ bone()
|
inline |
◆ clear()
| void eve::animation::SpineSkeletonData::clear | ( | ) |
在文件 SpineSkeletonData.cpp 第 68 行定义.
被这些函数引用 loadFromJson().
◆ findAnimation()
| int eve::animation::SpineSkeletonData::findAnimation | ( | const std::string & | name | ) | const |
◆ findAttachment()
| const SpineSkeletonData::RegionAttachment * eve::animation::SpineSkeletonData::findAttachment | ( | int | skinIndex, |
| int | slotIndex, | ||
| const std::string & | name | ||
| ) | const |
在文件 SpineSkeletonData.cpp 第 153 行定义.
引用了 eve::animation::SpineSkeletonData::SkinData::attachments, getSkinCount() , 以及 name.
◆ findBone()
| int eve::animation::SpineSkeletonData::findBone | ( | const std::string & | name | ) | const |
在文件 SpineSkeletonData.cpp 第 81 行定义.
引用了 name.
被这些函数引用 eve::particles::ParticleEmitter::attachToSpineBoneByName() , 以及 loadFromJson().
◆ findSkin()
| int eve::animation::SpineSkeletonData::findSkin | ( | const std::string & | name | ) | const |
在文件 SpineSkeletonData.cpp 第 89 行定义.
引用了 name.
被这些函数引用 loadFromJson() , 以及 eve::animation::SpineSkeleton::setSkin().
◆ findSlot()
| int eve::animation::SpineSkeletonData::findSlot | ( | const std::string & | name | ) | const |
◆ getAnimationCount()
|
inline |
在文件 SpineSkeletonData.h 第 56 行定义.
◆ getAnimationDuration()
| float eve::animation::SpineSkeletonData::getAnimationDuration | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 148 行定义.
◆ getAnimationName()
| std::string eve::animation::SpineSkeletonData::getAnimationName | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 144 行定义.
引用了 name.
◆ getBoneCount()
|
inline |
◆ getBoneName()
| std::string eve::animation::SpineSkeletonData::getBoneName | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 98 行定义.
引用了 name.
◆ getBoneParent()
| int eve::animation::SpineSkeletonData::getBoneParent | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 102 行定义.
引用了 parent.
◆ getBoneRotation()
| float eve::animation::SpineSkeletonData::getBoneRotation | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 114 行定义.
◆ getBoneScaleX()
| float eve::animation::SpineSkeletonData::getBoneScaleX | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 118 行定义.
◆ getBoneScaleY()
| float eve::animation::SpineSkeletonData::getBoneScaleY | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 122 行定义.
◆ getBoneX()
| float eve::animation::SpineSkeletonData::getBoneX | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 106 行定义.
引用了 x.
◆ getBoneY()
| float eve::animation::SpineSkeletonData::getBoneY | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 110 行定义.
引用了 y.
◆ getDefaultSkin()
|
inline |
◆ getSkinCount()
|
inline |
在文件 SpineSkeletonData.h 第 51 行定义.
被这些函数引用 findAttachment().
◆ getSkinName()
| std::string eve::animation::SpineSkeletonData::getSkinName | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 140 行定义.
引用了 name.
◆ getSlotAttachment()
| std::string eve::animation::SpineSkeletonData::getSlotAttachment | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 135 行定义.
◆ getSlotBone()
| int eve::animation::SpineSkeletonData::getSlotBone | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 131 行定义.
引用了 bone().
◆ getSlotCount()
|
inline |
◆ getSlotName()
| std::string eve::animation::SpineSkeletonData::getSlotName | ( | int | index | ) | const |
在文件 SpineSkeletonData.cpp 第 127 行定义.
引用了 name.
◆ getSpineVersion()
|
inline |
在文件 SpineSkeletonData.h 第 33 行定义.
◆ loadFromFile()
| bool eve::animation::SpineSkeletonData::loadFromFile | ( | const std::string & | path, |
| std::string * | error = nullptr |
||
| ) |
在文件 SpineSkeletonData.cpp 第 165 行定义.
引用了 data, error , 以及 loadFromJson().
◆ loadFromJson()
| bool eve::animation::SpineSkeletonData::loadFromJson | ( | const std::string & | json, |
| std::string * | error = nullptr |
||
| ) |
在文件 SpineSkeletonData.cpp 第 188 行定义.
引用了 eve::animation::SpineSkeletonData::SlotTimeline::attachment, eve::animation::SpineSkeletonData::SkinData::attachments, b, eve::animation::SpineSkeletonData::BoneTimeline::boneIndex, eve::animation::SpineSkeletonData::AnimationData::bones, clear(), eve::animation::SpineSkeletonData::AnimationData::duration, error, findBone(), findSkin(), findSlot(), eve::animation::SpineSkeletonData::RegionAttachment::height, eve::animation::SpineSkeletonData::BoneData::name, eve::animation::SpineSkeletonData::SlotData::name, eve::animation::SpineSkeletonData::RegionAttachment::name, eve::animation::SpineSkeletonData::SkinData::name, eve::animation::SpineSkeletonData::AttachmentKey::name, eve::animation::SpineSkeletonData::AnimationData::name, parent, eve::animation::SpineSkeletonData::RegionAttachment::path, eve::animation::SpineSkeletonData::BoneTimeline::rotate, eve::animation::SpineSkeletonData::RegionAttachment::rotation, s, eve::animation::SpineSkeletonData::BoneTimeline::scale, eve::animation::SpineSkeletonData::RegionAttachment::scaleX, eve::animation::SpineSkeletonData::RegionAttachment::scaleY, skin(), eve::animation::SpineSkeletonData::SlotTimeline::slotIndex, eve::animation::SpineSkeletonData::AnimationData::slots, eve::animation::SpineSkeletonData::FloatKey::stepped, eve::animation::SpineSkeletonData::TranslateKey::stepped, eve::animation::SpineSkeletonData::ScaleKey::stepped, eve::animation::SpineSkeletonData::FloatKey::time, eve::animation::SpineSkeletonData::TranslateKey::time, eve::animation::SpineSkeletonData::ScaleKey::time, eve::animation::SpineSkeletonData::AttachmentKey::time, eve::animation::SpineSkeletonData::BoneTimeline::translate, type, eve::animation::SpineSkeletonData::FloatKey::value, eve::animation::SpineSkeletonData::RegionAttachment::width, eve::animation::SpineSkeletonData::RegionAttachment::x, eve::animation::SpineSkeletonData::TranslateKey::x, eve::animation::SpineSkeletonData::ScaleKey::x, eve::animation::SpineSkeletonData::RegionAttachment::y, eve::animation::SpineSkeletonData::TranslateKey::y , 以及 eve::animation::SpineSkeletonData::ScaleKey::y.
被这些函数引用 loadFromFile().
◆ operator=()
|
delete |
◆ skin()
|
inline |
在文件 SpineSkeletonData.h 第 138 行定义.
被这些函数引用 loadFromJson().
◆ slot()
|
inline |
在文件 SpineSkeletonData.h 第 137 行定义.
被这些函数引用 eve::animation::SpineAnim::apply() , 以及 eve::animation::SpineSkeleton::setToSetupPose().
该类的文档由以下文件生成:
- src/modules/animation/SpineSkeletonData.h
- src/modules/animation/SpineSkeletonData.cpp