[cpp] 4.3 porting WIP

This commit is contained in:
Mario Zechner 2025-07-01 00:04:21 +02:00
parent 91f2f71abf
commit 28c48dc88a
2 changed files with 13 additions and 0 deletions

View File

@ -78,6 +78,9 @@ namespace spine {
/// @param parent May be NULL.
Bone(BoneData& data, Bone* parent);
/// Copy constructor. Does not copy the children bones.
Bone(Bone& bone, Bone* parent);
/// The parent bone, or null if this is the root bone.
Bone* getParent();

View File

@ -47,6 +47,16 @@ Bone::Bone(BoneData &data, Bone *parent) : PosedGeneric<BoneData, BoneLocal, Bon
_applied->_bone = this;
}
Bone::Bone(Bone &bone, Bone *parent) : PosedGeneric<BoneData, BoneLocal, BonePose>(bone._data),
PosedActive(),
_parent(parent),
_children(),
_sorted(false) {
_constrained._bone = this;
_applied->_bone = this;
_pose.set(bone._pose);
}
Bone *Bone::getParent() {
return _parent;
}