mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[cpp] 4.3 porting WIP
This commit is contained in:
parent
c6dd51015d
commit
27c6770708
@ -1,60 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMPROPERTY_H_
|
|
||||||
#define SPINE_FROMPROPERTY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/Vector.h>
|
|
||||||
#include <spine/SpineObject.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class ToProperty;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
/// Source property for a TransformConstraint.
|
|
||||||
class SP_API FromProperty : public SpineObject {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromProperty();
|
|
||||||
virtual ~FromProperty();
|
|
||||||
|
|
||||||
/// The value of this property that corresponds to ToProperty::offset.
|
|
||||||
float offset;
|
|
||||||
|
|
||||||
/// Constrained properties.
|
|
||||||
Vector<ToProperty*> to;
|
|
||||||
|
|
||||||
/// Reads this property from the specified bone.
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) = 0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMPROPERTY_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMROTATE_H_
|
|
||||||
#define SPINE_FROMROTATE_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromRotate : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromRotate();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMROTATE_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMSCALEX_H_
|
|
||||||
#define SPINE_FROMSCALEX_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromScaleX : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromScaleX();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMSCALEX_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMSCALEY_H_
|
|
||||||
#define SPINE_FROMSCALEY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromScaleY : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromScaleY();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMSCALEY_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMSHEARY_H_
|
|
||||||
#define SPINE_FROMSHEARY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromShearY : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromShearY();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMSHEARY_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMX_H_
|
|
||||||
#define SPINE_FROMX_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromX : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromX();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMX_H_ */
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_FROMY_H_
|
|
||||||
#define SPINE_FROMY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/FromProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API FromY : public FromProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
FromY();
|
|
||||||
|
|
||||||
virtual float value(BonePose& source, bool local, Vector<float>& offsets) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_FROMY_H_ */
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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_TOPROPERTY_H_
|
|
||||||
#define SPINE_TOPROPERTY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
/// Constrained property for a TransformConstraint.
|
|
||||||
class SP_API ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
ToProperty();
|
|
||||||
virtual ~ToProperty();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
/// The value of this property that corresponds to FromProperty::offset.
|
|
||||||
float offset;
|
|
||||||
|
|
||||||
/// The maximum value of this property when TransformConstraintData::clamp clamped.
|
|
||||||
float max;
|
|
||||||
|
|
||||||
/// The scale of the FromProperty value in relation to this property.
|
|
||||||
float scale;
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Reads the mix for this property from the specified pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) = 0;
|
|
||||||
|
|
||||||
/// Applies the value to this property.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) = 0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOPROPERTY_H_ */
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOROTATE_H_
|
|
||||||
#define SPINE_TOROTATE_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToRotate : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToRotate();
|
|
||||||
virtual ~ToRotate();
|
|
||||||
|
|
||||||
/// Returns the mix rotation value from the pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
/// Applies the rotation value to the bone.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOROTATE_H_ */
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOSCALEX_H_
|
|
||||||
#define SPINE_TOSCALEX_H_
|
|
||||||
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToScaleX : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
public:
|
|
||||||
ToScaleX();
|
|
||||||
virtual ~ToScaleX();
|
|
||||||
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOSCALEX_H_ */
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOSCALEY_H_
|
|
||||||
#define SPINE_TOSCALEY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToScaleY : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToScaleY();
|
|
||||||
virtual ~ToScaleY();
|
|
||||||
|
|
||||||
/// Returns the mix scale Y value from the pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
/// Applies the scale Y value to the bone.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOSCALEY_H_ */
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOSHEARY_H_
|
|
||||||
#define SPINE_TOSHEARY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToShearY : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToShearY();
|
|
||||||
virtual ~ToShearY();
|
|
||||||
|
|
||||||
/// Returns the mix shear Y value from the pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
/// Applies the shear Y value to the bone.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOSHEARY_H_ */
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOX_H_
|
|
||||||
#define SPINE_TOX_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToX : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToX();
|
|
||||||
virtual ~ToX();
|
|
||||||
|
|
||||||
/// Returns the mix X value from the pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
/// Applies the X value to the bone.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOX_H_ */
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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_TOY_H_
|
|
||||||
#define SPINE_TOY_H_
|
|
||||||
|
|
||||||
#include <spine/dll.h>
|
|
||||||
#include <spine/ToProperty.h>
|
|
||||||
#include <spine/RTTI.h>
|
|
||||||
|
|
||||||
namespace spine {
|
|
||||||
class TransformConstraintPose;
|
|
||||||
class BonePose;
|
|
||||||
|
|
||||||
class SP_API ToY : public ToProperty {
|
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToY();
|
|
||||||
virtual ~ToY();
|
|
||||||
|
|
||||||
/// Returns the mix Y value from the pose.
|
|
||||||
virtual float mix(TransformConstraintPose& pose) override;
|
|
||||||
|
|
||||||
/// Applies the Y value to the bone.
|
|
||||||
virtual void apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) override;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* SPINE_TOY_H_ */
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromProperty.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL_NOPARENT(FromProperty)
|
|
||||||
|
|
||||||
FromProperty::FromProperty() : SpineObject(), offset(0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
FromProperty::~FromProperty() {
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromRotate.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromRotate, FromProperty)
|
|
||||||
|
|
||||||
FromRotate::FromRotate() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromRotate::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
if (local) return source.getRotation() + offsets[0];
|
|
||||||
float value = MathUtil::atan2(source._c, source._a) * MathUtil::Rad_Deg
|
|
||||||
+ (source._a * source._d - source._b * source._c > 0 ? offsets[0] : -offsets[0]);
|
|
||||||
if (value < 0) value += 360;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromScaleX.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromScaleX, FromProperty)
|
|
||||||
|
|
||||||
FromScaleX::FromScaleX() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromScaleX::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
return (local ? source.getScaleX() : MathUtil::sqrt(source._a * source._a + source._c * source._c)) + offsets[3];
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromScaleY.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromScaleY, FromProperty)
|
|
||||||
|
|
||||||
FromScaleY::FromScaleY() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromScaleY::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
return (local ? source.getScaleY() : MathUtil::sqrt(source._b * source._b + source._d * source._d)) + offsets[4];
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromShearY.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromShearY, FromProperty)
|
|
||||||
|
|
||||||
FromShearY::FromShearY() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromShearY::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
return (local ? source.getShearY() : (MathUtil::atan2(source._d, source._b) - MathUtil::atan2(source._c, source._a)) * MathUtil::Rad_Deg - 90) + offsets[5];
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromX.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromX, FromProperty)
|
|
||||||
|
|
||||||
FromX::FromX() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromX::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
return local ? source.getX() + offsets[1] : offsets[1] * source._a + offsets[2] * source._b + source._worldX;
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/FromY.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(FromY, FromProperty)
|
|
||||||
|
|
||||||
FromY::FromY() : FromProperty() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float FromY::value(BonePose& source, bool local, Vector<float>& offsets) {
|
|
||||||
return local ? source.getY() + offsets[2] : offsets[1] * source._c + offsets[2] * source._d + source._worldY;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Spine Runtimes License Agreement
|
|
||||||
* Last updated July 28, 2023. Replaces all prior versions.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2013-2023, 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/ToProperty.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL_NOPARENT(ToProperty)
|
|
||||||
|
|
||||||
ToProperty::ToProperty() : offset(0), max(0), scale(1) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToProperty::~ToProperty() {
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToRotate.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToRotate, ToProperty)
|
|
||||||
|
|
||||||
ToRotate::ToRotate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToRotate::~ToRotate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToRotate::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixRotate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToRotate::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (!additive) value -= bone.getRotation();
|
|
||||||
bone.setRotation(bone.getRotation() + value * pose.getMixRotate());
|
|
||||||
} else {
|
|
||||||
float a = bone._a, b = bone._b, c = bone._c, d = bone._d;
|
|
||||||
value *= MathUtil::Deg_Rad;
|
|
||||||
if (!additive) value -= MathUtil::atan2(c, a);
|
|
||||||
if (value > MathUtil::Pi)
|
|
||||||
value -= MathUtil::Pi * 2;
|
|
||||||
else if (value < -MathUtil::Pi)
|
|
||||||
value += MathUtil::Pi * 2;
|
|
||||||
value *= pose.getMixRotate();
|
|
||||||
float cosVal = MathUtil::cos(value), sinVal = MathUtil::sin(value);
|
|
||||||
bone._a = cosVal * a - sinVal * c;
|
|
||||||
bone._b = cosVal * b - sinVal * d;
|
|
||||||
bone._c = sinVal * a + cosVal * c;
|
|
||||||
bone._d = sinVal * b + cosVal * d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToScaleX.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToScaleX, ToProperty)
|
|
||||||
|
|
||||||
ToScaleX::ToScaleX() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToScaleX::~ToScaleX() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToScaleX::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixScaleX();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToScaleX::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (additive)
|
|
||||||
bone.setScaleX(bone.getScaleX() * (1 + ((value - 1) * pose.getMixScaleX())));
|
|
||||||
else if (bone.getScaleX() != 0)
|
|
||||||
bone.setScaleX(1 + (value / bone.getScaleX() - 1) * pose.getMixScaleX());
|
|
||||||
} else {
|
|
||||||
float s;
|
|
||||||
if (additive)
|
|
||||||
s = 1 + (value - 1) * pose.getMixScaleX();
|
|
||||||
else {
|
|
||||||
s = MathUtil::sqrt(bone._a * bone._a + bone._c * bone._c);
|
|
||||||
if (s != 0) s = 1 + (value / s - 1) * pose.getMixScaleX();
|
|
||||||
}
|
|
||||||
bone._a *= s;
|
|
||||||
bone._c *= s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToScaleY.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToScaleY, ToProperty)
|
|
||||||
|
|
||||||
ToScaleY::ToScaleY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToScaleY::~ToScaleY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToScaleY::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixScaleY();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToScaleY::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (additive)
|
|
||||||
bone.setScaleY(bone.getScaleY() * (1 + ((value - 1) * pose.getMixScaleY())));
|
|
||||||
else if (bone.getScaleY() != 0)
|
|
||||||
bone.setScaleY(1 + (value / bone.getScaleY() - 1) * pose.getMixScaleY());
|
|
||||||
} else {
|
|
||||||
float s;
|
|
||||||
if (additive)
|
|
||||||
s = 1 + (value - 1) * pose.getMixScaleY();
|
|
||||||
else {
|
|
||||||
s = MathUtil::sqrt(bone._b * bone._b + bone._d * bone._d);
|
|
||||||
if (s != 0) s = 1 + (value / s - 1) * pose.getMixScaleY();
|
|
||||||
}
|
|
||||||
bone._b *= s;
|
|
||||||
bone._d *= s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToShearY.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
#include <spine/MathUtil.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToShearY, ToProperty)
|
|
||||||
|
|
||||||
ToShearY::ToShearY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToShearY::~ToShearY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToShearY::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixShearY();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToShearY::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (!additive) value -= bone.getShearY();
|
|
||||||
bone.setShearY(bone.getShearY() + value * pose.getMixShearY());
|
|
||||||
} else {
|
|
||||||
float b = bone._b, d = bone._d, by = MathUtil::atan2(d, b);
|
|
||||||
value = (value + 90) * MathUtil::Deg_Rad;
|
|
||||||
if (additive)
|
|
||||||
value -= MathUtil::Pi / 2;
|
|
||||||
else {
|
|
||||||
value -= by - MathUtil::atan2(bone._c, bone._a);
|
|
||||||
if (value > MathUtil::Pi)
|
|
||||||
value -= MathUtil::Pi * 2;
|
|
||||||
else if (value < -MathUtil::Pi)
|
|
||||||
value += MathUtil::Pi * 2;
|
|
||||||
}
|
|
||||||
value = by + value * pose.getMixShearY();
|
|
||||||
float s = MathUtil::sqrt(b * b + d * d);
|
|
||||||
bone._b = MathUtil::cos(value) * s;
|
|
||||||
bone._d = MathUtil::sin(value) * s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToX.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToX, ToProperty)
|
|
||||||
|
|
||||||
ToX::ToX() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToX::~ToX() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToX::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixX();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToX::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (!additive) value -= bone.getX();
|
|
||||||
bone.setX(bone.getX() + value * pose.getMixX());
|
|
||||||
} else {
|
|
||||||
if (!additive) value -= bone.getWorldX();
|
|
||||||
bone.setWorldX(bone.getWorldX() + value * pose.getMixX());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* 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/ToY.h>
|
|
||||||
#include <spine/TransformConstraintPose.h>
|
|
||||||
#include <spine/BonePose.h>
|
|
||||||
|
|
||||||
using namespace spine;
|
|
||||||
|
|
||||||
RTTI_IMPL(ToY, ToProperty)
|
|
||||||
|
|
||||||
ToY::ToY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ToY::~ToY() {
|
|
||||||
}
|
|
||||||
|
|
||||||
float ToY::mix(TransformConstraintPose& pose) {
|
|
||||||
return pose.getMixY();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToY::apply(TransformConstraintPose& pose, BonePose& bone, float value, bool local, bool additive) {
|
|
||||||
if (local) {
|
|
||||||
if (!additive) value -= bone.getY();
|
|
||||||
bone.setY(bone.getY() + value * pose.getMixY());
|
|
||||||
} else {
|
|
||||||
if (!additive) value -= bone.getWorldY();
|
|
||||||
bone.setWorldY(bone.getWorldY() + value * pose.getMixY());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user