mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cpp] 4.3 porting WIP
This commit is contained in:
parent
5b90c94926
commit
708a73bcee
@ -35,6 +35,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class VertexAttachment;
|
class VertexAttachment;
|
||||||
|
|
||||||
|
/// Changes a slot's SlotPose::getDeform() to deform a VertexAttachment.
|
||||||
class SP_API DeformTimeline : public SlotCurveTimeline {
|
class SP_API DeformTimeline : public SlotCurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
@ -45,10 +46,6 @@ namespace spine {
|
|||||||
public:
|
public:
|
||||||
explicit DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, VertexAttachment *attachment);
|
explicit DeformTimeline(size_t frameCount, size_t bezierCount, int slotIndex, VertexAttachment *attachment);
|
||||||
|
|
||||||
virtual void
|
|
||||||
apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha, MixBlend blend,
|
|
||||||
MixDirection direction, bool appliedPose) override;
|
|
||||||
|
|
||||||
/// Sets the time and vertices for the specified frame.
|
/// Sets the time and vertices for the specified frame.
|
||||||
void setFrame(int frameIndex, float time, Vector<float> &vertices);
|
void setFrame(int frameIndex, float time, Vector<float> &vertices);
|
||||||
|
|
||||||
|
|||||||
@ -55,19 +55,6 @@ DeformTimeline::DeformTimeline(size_t frameCount, size_t bezierCount, int slotIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeformTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector<Event *> *pEvents, float alpha,
|
|
||||||
MixBlend blend, MixDirection direction, bool appliedPose) {
|
|
||||||
SP_UNUSED(lastTime);
|
|
||||||
SP_UNUSED(pEvents);
|
|
||||||
SP_UNUSED(direction);
|
|
||||||
|
|
||||||
Slot *slotP = skeleton._slots[_slotIndex];
|
|
||||||
Slot &slot = *slotP;
|
|
||||||
if (!slot._bone.isActive()) return;
|
|
||||||
SlotPose &pose = appliedPose ? *slot._applied : slot._pose;
|
|
||||||
|
|
||||||
apply(slot, pose, time, alpha, blend);
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user