mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 10:46:53 +08:00
[cpp] Unshadow apply in BoneTimeline and others by prefixing the protected method with _apply()
This commit is contained in:
parent
244abfb65a
commit
fa4d43bda5
@ -79,7 +79,7 @@ namespace spine {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Applies changes to the pose based on the timeline values.
|
/// Applies changes to the pose based on the timeline values.
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) = 0;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) = 0;
|
||||||
|
|
||||||
int _boneIndex;
|
int _boneIndex;
|
||||||
};
|
};
|
||||||
@ -110,7 +110,7 @@ namespace spine {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Applies changes to the pose based on the timeline values.
|
/// Applies changes to the pose based on the timeline values.
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) = 0;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) = 0;
|
||||||
|
|
||||||
int _boneIndex;
|
int _boneIndex;
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ namespace spine {
|
|||||||
void setFrame(int frame, float time, float r, float g, float b, float a);
|
void setFrame(int frame, float time, float r, float g, float b, float a);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
virtual void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
||||||
|
|
||||||
static const int ENTRIES = 5;
|
static const int ENTRIES = 5;
|
||||||
static const int R = 1;
|
static const int R = 1;
|
||||||
@ -81,7 +81,7 @@ namespace spine {
|
|||||||
void setFrame(int frame, float time, float r, float g, float b);
|
void setFrame(int frame, float time, float r, float g, float b);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
virtual void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
||||||
|
|
||||||
static const int ENTRIES = 4;
|
static const int ENTRIES = 4;
|
||||||
static const int R = 1;
|
static const int R = 1;
|
||||||
@ -131,7 +131,7 @@ namespace spine {
|
|||||||
void setFrame(int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2);
|
void setFrame(int frame, float time, float r, float g, float b, float a, float r2, float g2, float b2);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
virtual void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
||||||
|
|
||||||
static const int ENTRIES = 8;
|
static const int ENTRIES = 8;
|
||||||
static const int R = 1;
|
static const int R = 1;
|
||||||
@ -162,7 +162,7 @@ namespace spine {
|
|||||||
void setFrame(int frame, float time, float r, float g, float b, float r2, float g2, float b2);
|
void setFrame(int frame, float time, float r, float g, float b, float r2, float g2, float b2);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
virtual void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
||||||
|
|
||||||
static const int ENTRIES = 7;
|
static const int ENTRIES = 7;
|
||||||
static const int R = 1;
|
static const int R = 1;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ namespace spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Array<Array<float>> _vertices;
|
Array<Array<float>> _vertices;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace spine {
|
|||||||
explicit RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit RotateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace spine {
|
|||||||
explicit ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ScaleTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local BoneLocal::getScaleX().
|
/// Changes a bone's local BoneLocal::getScaleX().
|
||||||
@ -60,7 +60,7 @@ namespace spine {
|
|||||||
explicit ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local BoneLocal::getScaleY().
|
/// Changes a bone's local BoneLocal::getScaleY().
|
||||||
@ -75,7 +75,7 @@ namespace spine {
|
|||||||
explicit ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace spine {
|
|||||||
explicit ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ShearTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local BoneLocal::getShearX().
|
/// Changes a bone's local BoneLocal::getShearX().
|
||||||
@ -60,7 +60,7 @@ namespace spine {
|
|||||||
explicit ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local BoneLocal::getShearY().
|
/// Changes a bone's local BoneLocal::getShearY().
|
||||||
@ -75,7 +75,7 @@ namespace spine {
|
|||||||
explicit ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ namespace spine {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Applies the timeline to the slot pose.
|
/// Applies the timeline to the slot pose.
|
||||||
virtual void apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) = 0;
|
virtual void _apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) = 0;
|
||||||
|
|
||||||
int _slotIndex;
|
int _slotIndex;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -52,9 +52,9 @@ namespace spine {
|
|||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
friend class TransformConstraintTimeline;
|
friend class TransformConstraintTimeline;
|
||||||
|
|
||||||
|
public:
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
|
||||||
TransformConstraint(TransformConstraintData &data, Skeleton &skeleton);
|
TransformConstraint(TransformConstraintData &data, Skeleton &skeleton);
|
||||||
|
|
||||||
virtual TransformConstraint ©(Skeleton &skeleton);
|
virtual TransformConstraint ©(Skeleton &skeleton);
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace spine {
|
|||||||
explicit TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit TranslateTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local X translation.
|
/// Changes a bone's local X translation.
|
||||||
@ -61,7 +61,7 @@ namespace spine {
|
|||||||
explicit TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit TranslateXTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Changes a bone's local Y translation.
|
/// Changes a bone's local Y translation.
|
||||||
@ -76,7 +76,7 @@ namespace spine {
|
|||||||
explicit TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
explicit TranslateYTimeline(size_t frameCount, size_t bezierCount, int boneIndex);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
virtual void _apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ void BoneTimeline1::apply(Skeleton &skeleton, float lastTime, float time, Array<
|
|||||||
|
|
||||||
Bone *bone = skeleton._bones[_boneIndex];
|
Bone *bone = skeleton._bones[_boneIndex];
|
||||||
if (bone->isActive()) {
|
if (bone->isActive()) {
|
||||||
apply(appliedPose ? *bone->_applied : bone->_pose, bone->_data._setup, time, alpha, blend, direction);
|
_apply(appliedPose ? *bone->_applied : bone->_pose, bone->_data._setup, time, alpha, blend, direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ void BoneTimeline2::apply(Skeleton &skeleton, float lastTime, float time, Array<
|
|||||||
|
|
||||||
Bone *bone = skeleton._bones[_boneIndex];
|
Bone *bone = skeleton._bones[_boneIndex];
|
||||||
if (bone->isActive()) {
|
if (bone->isActive()) {
|
||||||
apply(appliedPose ? *bone->_applied : bone->_pose, bone->_data._setup, time, alpha, blend, direction);
|
_apply(appliedPose ? *bone->_applied : bone->_pose, bone->_data._setup, time, alpha, blend, direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ void RGBATimeline::setFrame(int frame, float time, float r, float g, float b, fl
|
|||||||
_frames[frame + A] = a;
|
_frames[frame + A] = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGBATimeline::apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
void RGBATimeline::_apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
||||||
Color &color = pose._color;
|
Color &color = pose._color;
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
Color &setup = slot._data._setup._color;
|
Color &setup = slot._data._setup._color;
|
||||||
@ -134,7 +134,7 @@ void RGBTimeline::setFrame(int frame, float time, float r, float g, float b) {
|
|||||||
_frames[frame + B] = b;
|
_frames[frame + B] = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGBTimeline::apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
void RGBTimeline::_apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
||||||
Color &color = pose._color;
|
Color &color = pose._color;
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
Color &setup = slot._data._setup._color;
|
Color &setup = slot._data._setup._color;
|
||||||
@ -275,7 +275,7 @@ void RGBA2Timeline::setFrame(int frame, float time, float r, float g, float b, f
|
|||||||
_frames[frame + B2] = b2;
|
_frames[frame + B2] = b2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGBA2Timeline::apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
void RGBA2Timeline::_apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
||||||
Color &light = pose._color;
|
Color &light = pose._color;
|
||||||
Color &dark = pose._darkColor;
|
Color &dark = pose._darkColor;
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
@ -388,7 +388,7 @@ void RGB2Timeline::setFrame(int frame, float time, float r, float g, float b, fl
|
|||||||
_frames[frame + B2] = b2;
|
_frames[frame + B2] = b2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RGB2Timeline::apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
void RGB2Timeline::_apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
||||||
Color &light = pose._color;
|
Color &light = pose._color;
|
||||||
Color &dark = pose._darkColor;
|
Color &dark = pose._darkColor;
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
|
|||||||
@ -56,7 +56,7 @@ DeformTimeline::DeformTimeline(size_t frameCount, size_t bezierCount, int slotIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DeformTimeline::apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
void DeformTimeline::_apply(Slot &slot, SlotPose &pose, float time, float alpha, MixBlend blend) {
|
||||||
Attachment *slotAttachment = pose._attachment;
|
Attachment *slotAttachment = pose._attachment;
|
||||||
if (slotAttachment == NULL || !slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti)) {
|
if (slotAttachment == NULL || !slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -39,7 +39,7 @@ RotateTimeline::RotateTimeline(size_t frameCount, size_t bezierCount, int boneIn
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_Rotate) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_Rotate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RotateTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void RotateTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
SP_UNUSED(direction);
|
SP_UNUSED(direction);
|
||||||
pose._rotation = getRelativeValue(time, alpha, blend, pose._rotation, setup._rotation);
|
pose._rotation = getRelativeValue(time, alpha, blend, pose._rotation, setup._rotation);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ ScaleTimeline::ScaleTimeline(size_t frameCount, size_t bezierCount, int boneInde
|
|||||||
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_ScaleX, Property_ScaleY) {
|
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_ScaleX, Property_ScaleY) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScaleTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ScaleTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
case MixBlend_Setup:
|
case MixBlend_Setup:
|
||||||
@ -146,7 +146,7 @@ ScaleXTimeline::ScaleXTimeline(size_t frameCount, size_t bezierCount, int boneIn
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ScaleX) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ScaleX) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScaleXTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ScaleXTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._scaleX = getScaleValue(time, alpha, blend, direction, pose._scaleX, setup._scaleX);
|
pose._scaleX = getScaleValue(time, alpha, blend, direction, pose._scaleX, setup._scaleX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,6 +156,6 @@ ScaleYTimeline::ScaleYTimeline(size_t frameCount, size_t bezierCount, int boneIn
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ScaleY) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ScaleY) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScaleYTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ScaleYTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._scaleY = getScaleValue(time, alpha, blend, direction, pose._scaleY, setup._scaleY);
|
pose._scaleY = getScaleValue(time, alpha, blend, direction, pose._scaleY, setup._scaleY);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ ShearTimeline::ShearTimeline(size_t frameCount, size_t bezierCount, int boneInde
|
|||||||
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_ShearX, Property_ShearY) {
|
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_ShearX, Property_ShearY) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShearTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ShearTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
case MixBlend_Setup:
|
case MixBlend_Setup:
|
||||||
@ -108,7 +108,7 @@ ShearXTimeline::ShearXTimeline(size_t frameCount, size_t bezierCount, int boneIn
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ShearX) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ShearX) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShearXTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ShearXTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._shearX = getRelativeValue(time, alpha, blend, pose._shearX, setup._shearX);
|
pose._shearX = getRelativeValue(time, alpha, blend, pose._shearX, setup._shearX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +118,6 @@ ShearYTimeline::ShearYTimeline(size_t frameCount, size_t bezierCount, int boneIn
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ShearY) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_ShearY) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShearYTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void ShearYTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._shearY = getRelativeValue(time, alpha, blend, pose._shearY, setup._shearY);
|
pose._shearY = getRelativeValue(time, alpha, blend, pose._shearY, setup._shearY);
|
||||||
}
|
}
|
||||||
@ -60,5 +60,5 @@ void SlotCurveTimeline::apply(Skeleton &skeleton, float lastTime, float time, Ar
|
|||||||
SP_UNUSED(direction);
|
SP_UNUSED(direction);
|
||||||
|
|
||||||
Slot *slot = skeleton._slots[_slotIndex];
|
Slot *slot = skeleton._slots[_slotIndex];
|
||||||
if (slot->_bone.isActive()) apply(*slot, appliedPose ? *slot->_applied : slot->_pose, time, alpha, blend);
|
if (slot->_bone.isActive()) _apply(*slot, appliedPose ? *slot->_applied : slot->_pose, time, alpha, blend);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ TranslateTimeline::TranslateTimeline(size_t frameCount, size_t bezierCount, int
|
|||||||
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_X, Property_Y) {
|
: BoneTimeline2(frameCount, bezierCount, boneIndex, Property_X, Property_Y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslateTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void TranslateTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
if (time < _frames[0]) {
|
if (time < _frames[0]) {
|
||||||
switch (blend) {
|
switch (blend) {
|
||||||
case MixBlend_Setup:
|
case MixBlend_Setup:
|
||||||
@ -108,7 +108,7 @@ TranslateXTimeline::TranslateXTimeline(size_t frameCount, size_t bezierCount, in
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_X) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_X) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslateXTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void TranslateXTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._x = getRelativeValue(time, alpha, blend, pose._x, setup._x);
|
pose._x = getRelativeValue(time, alpha, blend, pose._x, setup._x);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +118,6 @@ TranslateYTimeline::TranslateYTimeline(size_t frameCount, size_t bezierCount, in
|
|||||||
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_Y) {
|
: BoneTimeline1(frameCount, bezierCount, boneIndex, Property_Y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslateYTimeline::apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
void TranslateYTimeline::_apply(BoneLocal &pose, BoneLocal &setup, float time, float alpha, MixBlend blend, MixDirection direction) {
|
||||||
pose._y = getRelativeValue(time, alpha, blend, pose._y, setup._y);
|
pose._y = getRelativeValue(time, alpha, blend, pose._y, setup._y);
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user