mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cpp] BoneTimeline is pure now
This commit is contained in:
parent
af05f0681d
commit
d25c75d86b
@ -43,22 +43,15 @@ namespace spine {
|
||||
RTTI_DECL_NOPARENT
|
||||
|
||||
public:
|
||||
BoneTimeline(int boneIndex) : _boneIndex(boneIndex) {
|
||||
BoneTimeline(int boneIndex) {
|
||||
}
|
||||
virtual ~BoneTimeline() {
|
||||
}
|
||||
|
||||
/// The index of the bone in Skeleton::getBones() that will be changed when this timeline is applied.
|
||||
virtual int getBoneIndex() {
|
||||
return _boneIndex;
|
||||
}
|
||||
virtual int getBoneIndex() const = 0;
|
||||
|
||||
virtual void setBoneIndex(int inValue) {
|
||||
_boneIndex = inValue;
|
||||
}
|
||||
|
||||
protected:
|
||||
int _boneIndex;
|
||||
virtual void setBoneIndex(int inValue) = 0;
|
||||
};
|
||||
|
||||
/// Base class for timelines that animate a single bone property.
|
||||
@ -75,9 +68,19 @@ namespace spine {
|
||||
virtual void apply(Skeleton &skeleton, float lastTime, float time, Array<Event *> *pEvents, float alpha, MixBlend blend,
|
||||
MixDirection direction, bool appliedPose) override;
|
||||
|
||||
virtual int getBoneIndex() const override {
|
||||
return _boneIndex;
|
||||
}
|
||||
|
||||
virtual void setBoneIndex(int inValue) override {
|
||||
_boneIndex = inValue;
|
||||
}
|
||||
|
||||
protected:
|
||||
/// 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;
|
||||
|
||||
int _boneIndex;
|
||||
};
|
||||
|
||||
/// Base class for timelines that animate two bone properties.
|
||||
@ -94,9 +97,19 @@ namespace spine {
|
||||
virtual void apply(Skeleton &skeleton, float lastTime, float time, Array<Event *> *pEvents, float alpha, MixBlend blend,
|
||||
MixDirection direction, bool appliedPose) override;
|
||||
|
||||
virtual int getBoneIndex() const override {
|
||||
return _boneIndex;
|
||||
}
|
||||
|
||||
virtual void setBoneIndex(int inValue) override {
|
||||
_boneIndex = inValue;
|
||||
}
|
||||
|
||||
protected:
|
||||
/// 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;
|
||||
|
||||
int _boneIndex;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@ namespace spine {
|
||||
virtual void setConstraintIndex(int inValue) override {
|
||||
_constraintIndex = inValue;
|
||||
}
|
||||
|
||||
private:
|
||||
int _constraintIndex;
|
||||
|
||||
|
||||
@ -59,7 +59,18 @@ namespace spine {
|
||||
virtual void apply(Skeleton &skeleton, float lastTime, float time, Array<Event *> *pEvents, float alpha, MixBlend blend,
|
||||
MixDirection direction, bool appliedPose) override;
|
||||
|
||||
|
||||
virtual int getBoneIndex() const override {
|
||||
return _boneIndex;
|
||||
}
|
||||
|
||||
void setBoneIndex(int inValue) override {
|
||||
_boneIndex = inValue;
|
||||
}
|
||||
|
||||
private:
|
||||
int _boneIndex;
|
||||
|
||||
static const int ENTRIES = 2;
|
||||
static const int INHERIT = 1;
|
||||
};
|
||||
|
||||
@ -64,6 +64,7 @@ namespace spine {
|
||||
virtual void setConstraintIndex(int inValue) override {
|
||||
_constraintIndex = inValue;
|
||||
}
|
||||
|
||||
private:
|
||||
int _constraintIndex;
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@ namespace spine {
|
||||
virtual void setConstraintIndex(int inValue) override {
|
||||
_constraintIndex = inValue;
|
||||
}
|
||||
|
||||
private:
|
||||
int _constraintIndex;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user