mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
[cpp] 4.3 porting WIP
This commit is contained in:
parent
e6f85fb9d1
commit
a743b7aa23
47
spine-cpp/spine-cpp/include/spine/BoneTimeline.h
Normal file
47
spine-cpp/spine-cpp/include/spine/BoneTimeline.h
Normal file
@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_BoneTimeline_h
|
||||
#define Spine_BoneTimeline_h
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
namespace spine {
|
||||
/// An interface for timelines which change the property of a bone.
|
||||
class SP_API BoneTimeline {
|
||||
public:
|
||||
BoneTimeline();
|
||||
virtual ~BoneTimeline();
|
||||
|
||||
/// The index of the bone in Skeleton::getBones() that will be changed when this timeline is applied.
|
||||
virtual int getBoneIndex() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
47
spine-cpp/spine-cpp/include/spine/ConstraintTimeline.h
Normal file
47
spine-cpp/spine-cpp/include/spine/ConstraintTimeline.h
Normal file
@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_ConstraintTimeline_h
|
||||
#define Spine_ConstraintTimeline_h
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
namespace spine {
|
||||
/// An interface for timelines which change the property of a constraint.
|
||||
class SP_API ConstraintTimeline {
|
||||
public:
|
||||
ConstraintTimeline();
|
||||
virtual ~ConstraintTimeline();
|
||||
|
||||
/// The index of the constraint in Skeleton::getConstraints() that will be changed when this timeline is applied.
|
||||
virtual int getConstraintIndex() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
81
spine-cpp/spine-cpp/include/spine/IkConstraintPose.h
Normal file
81
spine-cpp/spine-cpp/include/spine/IkConstraintPose.h
Normal file
@ -0,0 +1,81 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_IkConstraintPose_h
|
||||
#define Spine_IkConstraintPose_h
|
||||
|
||||
#include <spine/Pose.h>
|
||||
#include <spine/RTTI.h>
|
||||
|
||||
namespace spine {
|
||||
|
||||
/// Stores the current pose for an IK constraint.
|
||||
class SP_API IkConstraintPose : public Pose<IkConstraintPose> {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
IkConstraintPose();
|
||||
virtual ~IkConstraintPose();
|
||||
|
||||
virtual void set(IkConstraintPose& pose) override;
|
||||
|
||||
/// A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
///
|
||||
/// For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0.
|
||||
float getMix();
|
||||
void setMix(float mix);
|
||||
|
||||
/// For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones
|
||||
/// will not straighten completely until the target is this far out of range.
|
||||
float getSoftness();
|
||||
void setSoftness(float softness);
|
||||
|
||||
/// For two bone IK, controls the bend direction of the IK bones, either 1 or -1.
|
||||
int getBendDirection();
|
||||
void setBendDirection(int bendDirection);
|
||||
|
||||
/// For one bone IK, when true and the target is too close, the bone is scaled to reach it.
|
||||
bool getCompress();
|
||||
void setCompress(bool compress);
|
||||
|
||||
/// When true and the target is out of range, the parent bone is scaled to reach it.
|
||||
///
|
||||
/// For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if getSoftness() is
|
||||
/// > 0, and 3) if the parent bone has local nonuniform scale, stretch is not applied.
|
||||
bool getStretch();
|
||||
void setStretch(bool stretch);
|
||||
|
||||
private:
|
||||
int _bendDirection;
|
||||
bool _compress, _stretch;
|
||||
float _mix, _softness;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* Spine_IkConstraintPose_h */
|
||||
@ -31,6 +31,7 @@
|
||||
#define Spine_TransformMode_h
|
||||
|
||||
namespace spine {
|
||||
/// Determines how a bone inherits world transforms from parent bones.
|
||||
enum Inherit {
|
||||
Inherit_Normal = 0,
|
||||
Inherit_OnlyTranslation,
|
||||
|
||||
@ -32,12 +32,32 @@
|
||||
|
||||
namespace spine {
|
||||
|
||||
/// Controls how a timeline is mixed with the setup or current pose.
|
||||
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)
|
||||
/// Controls how timeline values are mixed with setup pose values or current pose values when a timeline is applied with
|
||||
/// alpha < 1.
|
||||
///
|
||||
/// See Timeline::apply().
|
||||
enum MixBlend {
|
||||
/// Transitions between the setup and timeline values (the current value is not used). Before the first frame, the setup
|
||||
/// value is used.
|
||||
///
|
||||
/// MixBlend_Setup is intended to transition to or from the setup pose, not for animations layered on top of others.
|
||||
MixBlend_Setup = 0,
|
||||
/// Transitions between the current and timeline values. Before the first frame, transitions between the current and setup
|
||||
/// values. Timelines which perform instant transitions, such as DrawOrderTimeline or AttachmentTimeline, use
|
||||
/// the setup value before the first frame.
|
||||
///
|
||||
/// MixBlend_First is intended for the first animations applied, not for animations layered on top of others.
|
||||
MixBlend_First,
|
||||
/// Transitions between the current and timeline values. No change is made before the first frame.
|
||||
///
|
||||
/// MixBlend_Replace is intended for animations layered on top of others, not for the first animations applied.
|
||||
MixBlend_Replace,
|
||||
/// Transitions between the current value and the current plus timeline values. No change is made before the first frame.
|
||||
///
|
||||
/// MixBlend_Add is intended for animations layered on top of others, not for the first animations applied.
|
||||
///
|
||||
/// Properties set by additive animations must be set manually or by another animation before applying the additive
|
||||
/// animations, else the property values will increase each time the additive animations are applied.
|
||||
MixBlend_Add
|
||||
};
|
||||
}
|
||||
|
||||
@ -32,8 +32,10 @@
|
||||
|
||||
namespace spine {
|
||||
|
||||
/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).
|
||||
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
|
||||
/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose value) or
|
||||
/// mixing in toward 1 (the timeline's value). Some timelines use this to decide how values are applied.
|
||||
///
|
||||
/// See Timeline::apply().
|
||||
enum MixDirection {
|
||||
MixDirection_In = 0,
|
||||
MixDirection_Out
|
||||
|
||||
76
spine-cpp/spine-cpp/include/spine/PathConstraintPose.h
Normal file
76
spine-cpp/spine-cpp/include/spine/PathConstraintPose.h
Normal file
@ -0,0 +1,76 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_PathConstraintPose_h
|
||||
#define Spine_PathConstraintPose_h
|
||||
|
||||
#include <spine/Pose.h>
|
||||
#include <spine/RTTI.h>
|
||||
|
||||
namespace spine {
|
||||
/// Stores a pose for a path constraint.
|
||||
class SP_API PathConstraintPose : public Pose<PathConstraintPose> {
|
||||
RTTI_DECL
|
||||
|
||||
private:
|
||||
float _position;
|
||||
float _spacing;
|
||||
float _mixRotate;
|
||||
float _mixX;
|
||||
float _mixY;
|
||||
|
||||
public:
|
||||
PathConstraintPose();
|
||||
virtual ~PathConstraintPose();
|
||||
|
||||
virtual void set(PathConstraintPose& pose) override;
|
||||
|
||||
/// The position along the path.
|
||||
float getPosition();
|
||||
void setPosition(float position);
|
||||
|
||||
/// The spacing between bones.
|
||||
float getSpacing();
|
||||
void setSpacing(float spacing);
|
||||
|
||||
/// A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
float getMixRotate();
|
||||
void setMixRotate(float mixRotate);
|
||||
|
||||
/// A percentage (0-1) that controls the mix between the constrained and unconstrained translation X.
|
||||
float getMixX();
|
||||
void setMixX(float mixX);
|
||||
|
||||
/// A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y.
|
||||
float getMixY();
|
||||
void setMixY(float mixY);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -30,19 +30,19 @@
|
||||
#ifndef Spine_Physics_h
|
||||
#define Spine_Physics_h
|
||||
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
/// Determines how physics and other non-deterministic updates are applied.
|
||||
namespace spine {
|
||||
enum Physics {
|
||||
/** Physics are not updated or applied. */
|
||||
/// Physics are not updated or applied.
|
||||
Physics_None,
|
||||
|
||||
/** Physics are reset to the current pose. */
|
||||
/// Physics are reset to the current pose.
|
||||
Physics_Reset,
|
||||
|
||||
/** Physics are updated and the pose from physics is applied. */
|
||||
/// Physics are updated and the pose from physics is applied.
|
||||
Physics_Update,
|
||||
|
||||
/** Physics are not updated but the pose from physics is applied. */
|
||||
/// Physics are not updated but the pose from physics is applied.
|
||||
Physics_Pose
|
||||
};
|
||||
}
|
||||
|
||||
80
spine-cpp/spine-cpp/include/spine/PhysicsConstraintPose.h
Normal file
80
spine-cpp/spine-cpp/include/spine/PhysicsConstraintPose.h
Normal file
@ -0,0 +1,80 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_PhysicsConstraintPose_h
|
||||
#define Spine_PhysicsConstraintPose_h
|
||||
|
||||
#include <spine/Pose.h>
|
||||
#include <spine/RTTI.h>
|
||||
|
||||
namespace spine {
|
||||
/// Stores a pose for a physics constraint.
|
||||
class SP_API PhysicsConstraintPose : public Pose<PhysicsConstraintPose> {
|
||||
RTTI_DECL
|
||||
|
||||
private:
|
||||
float _inertia;
|
||||
float _strength;
|
||||
float _damping;
|
||||
float _massInverse;
|
||||
float _wind;
|
||||
float _gravity;
|
||||
float _mix;
|
||||
|
||||
public:
|
||||
PhysicsConstraintPose();
|
||||
virtual ~PhysicsConstraintPose();
|
||||
|
||||
virtual void set(PhysicsConstraintPose& pose) override;
|
||||
|
||||
float getInertia();
|
||||
void setInertia(float inertia);
|
||||
|
||||
float getStrength();
|
||||
void setStrength(float strength);
|
||||
|
||||
float getDamping();
|
||||
void setDamping(float damping);
|
||||
|
||||
float getMassInverse();
|
||||
void setMassInverse(float massInverse);
|
||||
|
||||
float getWind();
|
||||
void setWind(float wind);
|
||||
|
||||
float getGravity();
|
||||
void setGravity(float gravity);
|
||||
|
||||
/// A percentage (0-1) that controls the mix between the constrained and unconstrained poses.
|
||||
float getMix();
|
||||
void setMix(float mix);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
55
spine-cpp/spine-cpp/include/spine/Pose.h
Normal file
55
spine-cpp/spine-cpp/include/spine/Pose.h
Normal file
@ -0,0 +1,55 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_Pose_h
|
||||
#define Spine_Pose_h
|
||||
|
||||
#include <spine/SpineObject.h>
|
||||
|
||||
namespace spine {
|
||||
template<class P>
|
||||
class SP_API Pose : public SpineObject {
|
||||
public:
|
||||
Pose();
|
||||
virtual ~Pose();
|
||||
|
||||
/// Sets the pose values.
|
||||
virtual void set(P& pose) = 0;
|
||||
};
|
||||
|
||||
template<class P>
|
||||
Pose<P>::Pose() {
|
||||
}
|
||||
|
||||
template<class P>
|
||||
Pose<P>::~Pose() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
101
spine-cpp/spine-cpp/include/spine/PosedData.h
Normal file
101
spine-cpp/spine-cpp/include/spine/PosedData.h
Normal file
@ -0,0 +1,101 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_PosedData_h
|
||||
#define Spine_PosedData_h
|
||||
|
||||
#include <spine/SpineObject.h>
|
||||
#include <spine/SpineString.h>
|
||||
|
||||
namespace spine {
|
||||
template<class P>
|
||||
class Pose;
|
||||
|
||||
/// The base class for all constrained datas.
|
||||
template<class P>
|
||||
class SP_API PosedData : public SpineObject {
|
||||
private:
|
||||
spine::String _name;
|
||||
P* _setup;
|
||||
bool _skinRequired;
|
||||
|
||||
public:
|
||||
PosedData(const spine::String& name, P* setup);
|
||||
virtual ~PosedData();
|
||||
|
||||
/// The constraint's name, which is unique across all constraints in the skeleton of the same type.
|
||||
const spine::String& getName();
|
||||
|
||||
P* getSetupPose();
|
||||
|
||||
/// When true, Skeleton::updateWorldTransform(Physics) only updates this constraint if the Skeleton::getSkin()
|
||||
/// contains this constraint.
|
||||
///
|
||||
/// See Skin::getConstraints().
|
||||
bool getSkinRequired();
|
||||
void setSkinRequired(bool skinRequired);
|
||||
|
||||
virtual spine::String toString();
|
||||
};
|
||||
|
||||
template<class P>
|
||||
PosedData<P>::PosedData(const spine::String& name, P* setup) : _name(name), _setup(setup), _skinRequired(false) {
|
||||
}
|
||||
|
||||
template<class P>
|
||||
PosedData<P>::~PosedData() {
|
||||
}
|
||||
|
||||
template<class P>
|
||||
const spine::String& PosedData<P>::getName() {
|
||||
return _name;
|
||||
}
|
||||
|
||||
template<class P>
|
||||
P* PosedData<P>::getSetupPose() {
|
||||
return _setup;
|
||||
}
|
||||
|
||||
template<class P>
|
||||
bool PosedData<P>::getSkinRequired() {
|
||||
return _skinRequired;
|
||||
}
|
||||
|
||||
template<class P>
|
||||
void PosedData<P>::setSkinRequired(bool skinRequired) {
|
||||
_skinRequired = skinRequired;
|
||||
}
|
||||
|
||||
template<class P>
|
||||
spine::String PosedData<P>::toString() {
|
||||
return _name;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -31,6 +31,9 @@
|
||||
#define Spine_PositionMode_h
|
||||
|
||||
namespace spine {
|
||||
/// Controls how the first bone is positioned along the path.
|
||||
///
|
||||
/// @see https://esotericsoftware.com/spine-path-constraints#Position-mode Position mode in the Spine User Guide.
|
||||
enum PositionMode {
|
||||
PositionMode_Fixed = 0,
|
||||
PositionMode_Percent
|
||||
|
||||
@ -31,9 +31,14 @@
|
||||
#define Spine_RotateMode_h
|
||||
|
||||
namespace spine {
|
||||
/// Controls how bones are rotated, translated, and scaled to match the path.
|
||||
///
|
||||
/// @see https://esotericsoftware.com/spine-path-constraints#Rotate-Mix Rotate mode in the Spine User Guide.
|
||||
enum RotateMode {
|
||||
RotateMode_Tangent = 0,
|
||||
RotateMode_Chain,
|
||||
/// When chain scale, constrained bones should all have the same parent. That way when the path constraint scales a bone, it
|
||||
/// doesn't affect other constrained bones.
|
||||
RotateMode_ChainScale
|
||||
};
|
||||
}
|
||||
|
||||
57
spine-cpp/spine-cpp/include/spine/SliderPose.h
Normal file
57
spine-cpp/spine-cpp/include/spine/SliderPose.h
Normal file
@ -0,0 +1,57 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_SliderPose_h
|
||||
#define Spine_SliderPose_h
|
||||
|
||||
#include <spine/Pose.h>
|
||||
#include <spine/RTTI.h>
|
||||
|
||||
namespace spine {
|
||||
/// Stores a pose for a slider.
|
||||
class SP_API SliderPose : public Pose<SliderPose> {
|
||||
RTTI_DECL
|
||||
private:
|
||||
float _time, _mix;
|
||||
|
||||
public:
|
||||
SliderPose();
|
||||
virtual ~SliderPose();
|
||||
|
||||
virtual void set(SliderPose& pose) override;
|
||||
|
||||
float getTime();
|
||||
void setTime(float time);
|
||||
|
||||
float getMix();
|
||||
void setMix(float mix);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
47
spine-cpp/spine-cpp/include/spine/SlotTimeline.h
Normal file
47
spine-cpp/spine-cpp/include/spine/SlotTimeline.h
Normal file
@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef Spine_SlotTimeline_h
|
||||
#define Spine_SlotTimeline_h
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
namespace spine {
|
||||
|
||||
/// An interface for timelines which change the property of a slot.
|
||||
class SP_API SlotTimeline {
|
||||
public:
|
||||
virtual ~SlotTimeline() {}
|
||||
|
||||
/// The index of the slot in Skeleton::getSlots() that will be changed when this timeline is applied.
|
||||
virtual int getSlotIndex() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* Spine_SlotTimeline_h */
|
||||
@ -31,6 +31,9 @@
|
||||
#define Spine_SpacingMode_h
|
||||
|
||||
namespace spine {
|
||||
/// Controls how bones after the first bone are positioned along the path.
|
||||
///
|
||||
/// @see https://esotericsoftware.com/spine-path-constraints#Spacing-mode Spacing mode in the Spine User Guide.
|
||||
enum SpacingMode {
|
||||
SpacingMode_Length = 0,
|
||||
SpacingMode_Fixed,
|
||||
|
||||
@ -41,12 +41,14 @@
|
||||
#include <spine/AttachmentType.h>
|
||||
#include <spine/BlendMode.h>
|
||||
#include <spine/Bone.h>
|
||||
#include <spine/BoneTimeline.h>
|
||||
#include <spine/BoneData.h>
|
||||
#include <spine/BoundingBoxAttachment.h>
|
||||
#include <spine/ClippingAttachment.h>
|
||||
#include <spine/Color.h>
|
||||
#include <spine/ColorTimeline.h>
|
||||
#include <spine/ConstraintData.h>
|
||||
#include <spine/ConstraintTimeline.h>
|
||||
#include <spine/ContainerUtil.h>
|
||||
#include <spine/CurveTimeline.h>
|
||||
#include <spine/DeformTimeline.h>
|
||||
@ -59,6 +61,7 @@
|
||||
#include <spine/HashMap.h>
|
||||
#include <spine/IkConstraint.h>
|
||||
#include <spine/IkConstraintData.h>
|
||||
#include <spine/IkConstraintPose.h>
|
||||
#include <spine/IkConstraintTimeline.h>
|
||||
#include <spine/Inherit.h>
|
||||
#include <spine/InheritTimeline.h>
|
||||
@ -71,14 +74,18 @@
|
||||
#include <spine/PathAttachment.h>
|
||||
#include <spine/PathConstraint.h>
|
||||
#include <spine/PathConstraintData.h>
|
||||
#include <spine/PathConstraintPose.h>
|
||||
#include <spine/PathConstraintMixTimeline.h>
|
||||
#include <spine/PathConstraintPositionTimeline.h>
|
||||
#include <spine/PathConstraintSpacingTimeline.h>
|
||||
#include <spine/Physics.h>
|
||||
#include <spine/PhysicsConstraint.h>
|
||||
#include <spine/PhysicsConstraintData.h>
|
||||
#include <spine/PhysicsConstraintPose.h>
|
||||
#include <spine/Pose.h>
|
||||
#include <spine/PointAttachment.h>
|
||||
#include <spine/Pool.h>
|
||||
#include <spine/PosedData.h>
|
||||
#include <spine/PositionMode.h>
|
||||
#include <spine/Property.h>
|
||||
#include <spine/RTTI.h>
|
||||
@ -95,8 +102,10 @@
|
||||
#include <spine/SkeletonJson.h>
|
||||
#include <spine/SkeletonRenderer.h>
|
||||
#include <spine/Skin.h>
|
||||
#include <spine/SliderPose.h>
|
||||
#include <spine/Slot.h>
|
||||
#include <spine/SlotData.h>
|
||||
#include <spine/SlotTimeline.h>
|
||||
#include <spine/SpacingMode.h>
|
||||
#include <spine/SpineObject.h>
|
||||
#include <spine/SpineString.h>
|
||||
|
||||
38
spine-cpp/spine-cpp/src/spine/BoneTimeline.cpp
Normal file
38
spine-cpp/spine-cpp/src/spine/BoneTimeline.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/BoneTimeline.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
BoneTimeline::BoneTimeline() {
|
||||
}
|
||||
|
||||
BoneTimeline::~BoneTimeline() {
|
||||
}
|
||||
38
spine-cpp/spine-cpp/src/spine/ConstraintTimeline.cpp
Normal file
38
spine-cpp/spine-cpp/src/spine/ConstraintTimeline.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/ConstraintTimeline.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
ConstraintTimeline::ConstraintTimeline() {
|
||||
}
|
||||
|
||||
ConstraintTimeline::~ConstraintTimeline() {
|
||||
}
|
||||
88
spine-cpp/spine-cpp/src/spine/IkConstraintPose.cpp
Normal file
88
spine-cpp/spine-cpp/src/spine/IkConstraintPose.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/IkConstraintPose.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
RTTI_IMPL_NOPARENT(IkConstraintPose)
|
||||
|
||||
IkConstraintPose::IkConstraintPose() : _bendDirection(0), _compress(false), _stretch(false), _mix(0), _softness(0) {
|
||||
}
|
||||
|
||||
IkConstraintPose::~IkConstraintPose() {
|
||||
}
|
||||
|
||||
void IkConstraintPose::set(IkConstraintPose& pose) {
|
||||
_mix = pose._mix;
|
||||
_softness = pose._softness;
|
||||
_bendDirection = pose._bendDirection;
|
||||
_compress = pose._compress;
|
||||
_stretch = pose._stretch;
|
||||
}
|
||||
|
||||
float IkConstraintPose::getMix() {
|
||||
return _mix;
|
||||
}
|
||||
|
||||
void IkConstraintPose::setMix(float mix) {
|
||||
_mix = mix;
|
||||
}
|
||||
|
||||
float IkConstraintPose::getSoftness() {
|
||||
return _softness;
|
||||
}
|
||||
|
||||
void IkConstraintPose::setSoftness(float softness) {
|
||||
_softness = softness;
|
||||
}
|
||||
|
||||
int IkConstraintPose::getBendDirection() {
|
||||
return _bendDirection;
|
||||
}
|
||||
|
||||
void IkConstraintPose::setBendDirection(int bendDirection) {
|
||||
_bendDirection = bendDirection;
|
||||
}
|
||||
|
||||
bool IkConstraintPose::getCompress() {
|
||||
return _compress;
|
||||
}
|
||||
|
||||
void IkConstraintPose::setCompress(bool compress) {
|
||||
_compress = compress;
|
||||
}
|
||||
|
||||
bool IkConstraintPose::getStretch() {
|
||||
return _stretch;
|
||||
}
|
||||
|
||||
void IkConstraintPose::setStretch(bool stretch) {
|
||||
_stretch = stretch;
|
||||
}
|
||||
88
spine-cpp/spine-cpp/src/spine/PathConstraintPose.cpp
Normal file
88
spine-cpp/spine-cpp/src/spine/PathConstraintPose.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/PathConstraintPose.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
RTTI_IMPL_NOPARENT(PathConstraintPose)
|
||||
|
||||
PathConstraintPose::PathConstraintPose() : Pose<PathConstraintPose>(), _position(0), _spacing(0), _mixRotate(0), _mixX(0), _mixY(0) {
|
||||
}
|
||||
|
||||
PathConstraintPose::~PathConstraintPose() {
|
||||
}
|
||||
|
||||
void PathConstraintPose::set(PathConstraintPose& pose) {
|
||||
_position = pose._position;
|
||||
_spacing = pose._spacing;
|
||||
_mixRotate = pose._mixRotate;
|
||||
_mixX = pose._mixX;
|
||||
_mixY = pose._mixY;
|
||||
}
|
||||
|
||||
float PathConstraintPose::getPosition() {
|
||||
return _position;
|
||||
}
|
||||
|
||||
void PathConstraintPose::setPosition(float position) {
|
||||
_position = position;
|
||||
}
|
||||
|
||||
float PathConstraintPose::getSpacing() {
|
||||
return _spacing;
|
||||
}
|
||||
|
||||
void PathConstraintPose::setSpacing(float spacing) {
|
||||
_spacing = spacing;
|
||||
}
|
||||
|
||||
float PathConstraintPose::getMixRotate() {
|
||||
return _mixRotate;
|
||||
}
|
||||
|
||||
void PathConstraintPose::setMixRotate(float mixRotate) {
|
||||
_mixRotate = mixRotate;
|
||||
}
|
||||
|
||||
float PathConstraintPose::getMixX() {
|
||||
return _mixX;
|
||||
}
|
||||
|
||||
void PathConstraintPose::setMixX(float mixX) {
|
||||
_mixX = mixX;
|
||||
}
|
||||
|
||||
float PathConstraintPose::getMixY() {
|
||||
return _mixY;
|
||||
}
|
||||
|
||||
void PathConstraintPose::setMixY(float mixY) {
|
||||
_mixY = mixY;
|
||||
}
|
||||
106
spine-cpp/spine-cpp/src/spine/PhysicsConstraintPose.cpp
Normal file
106
spine-cpp/spine-cpp/src/spine/PhysicsConstraintPose.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/PhysicsConstraintPose.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
RTTI_IMPL_NOPARENT(PhysicsConstraintPose)
|
||||
|
||||
PhysicsConstraintPose::PhysicsConstraintPose() : Pose<PhysicsConstraintPose>(), _inertia(0), _strength(0), _damping(0), _massInverse(0), _wind(0), _gravity(0), _mix(0) {
|
||||
}
|
||||
|
||||
PhysicsConstraintPose::~PhysicsConstraintPose() {
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::set(PhysicsConstraintPose& pose) {
|
||||
_inertia = pose._inertia;
|
||||
_strength = pose._strength;
|
||||
_damping = pose._damping;
|
||||
_massInverse = pose._massInverse;
|
||||
_wind = pose._wind;
|
||||
_gravity = pose._gravity;
|
||||
_mix = pose._mix;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getInertia() {
|
||||
return _inertia;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setInertia(float inertia) {
|
||||
_inertia = inertia;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getStrength() {
|
||||
return _strength;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setStrength(float strength) {
|
||||
_strength = strength;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getDamping() {
|
||||
return _damping;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setDamping(float damping) {
|
||||
_damping = damping;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getMassInverse() {
|
||||
return _massInverse;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setMassInverse(float massInverse) {
|
||||
_massInverse = massInverse;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getWind() {
|
||||
return _wind;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setWind(float wind) {
|
||||
_wind = wind;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getGravity() {
|
||||
return _gravity;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setGravity(float gravity) {
|
||||
_gravity = gravity;
|
||||
}
|
||||
|
||||
float PhysicsConstraintPose::getMix() {
|
||||
return _mix;
|
||||
}
|
||||
|
||||
void PhysicsConstraintPose::setMix(float mix) {
|
||||
_mix = mix;
|
||||
}
|
||||
61
spine-cpp/spine-cpp/src/spine/SliderPose.cpp
Normal file
61
spine-cpp/spine-cpp/src/spine/SliderPose.cpp
Normal file
@ -0,0 +1,61 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <spine/SliderPose.h>
|
||||
|
||||
using namespace spine;
|
||||
|
||||
RTTI_IMPL_NOPARENT(SliderPose)
|
||||
|
||||
SliderPose::SliderPose() : _time(0), _mix(0) {
|
||||
}
|
||||
|
||||
SliderPose::~SliderPose() {
|
||||
}
|
||||
|
||||
void SliderPose::set(SliderPose& pose) {
|
||||
_time = pose._time;
|
||||
_mix = pose._mix;
|
||||
}
|
||||
|
||||
float SliderPose::getTime() {
|
||||
return _time;
|
||||
}
|
||||
|
||||
void SliderPose::setTime(float time) {
|
||||
this->_time = time;
|
||||
}
|
||||
|
||||
float SliderPose::getMix() {
|
||||
return _mix;
|
||||
}
|
||||
|
||||
void SliderPose::setMix(float mix) {
|
||||
this->_mix = mix;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user