Revert "[cpp] Add pose architecture foundation for 4.3-beta"

This reverts commit 84637da40bc7c2a1d753b14feb2428faa8ee572f.

# Conflicts:
#	.gitignore
#	spine-cpp/spine-cpp/include/spine/spine.h
This commit is contained in:
Mario Zechner 2025-06-05 20:00:52 +02:00
parent b3717f3a9b
commit a9874c887c
7 changed files with 25 additions and 299 deletions

View File

@ -1,83 +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_Posed_h
#define Spine_Posed_h
#include <spine/SpineObject.h>
#include <spine/PosedData.h>
#include <spine/Pose.h>
namespace spine {
template<typename D, typename P, typename A>
class Posed : public SpineObject {
public:
Posed(D& data, P& pose, A& constrained) : _data(data), _pose(pose), _constrained(constrained), _applied(&pose) {
}
virtual ~Posed() {}
void setupPose() {
_pose.set(_data.getSetupPose());
}
/// The constraint's setup pose data.
D& getData() {
return _data;
}
const D& getData() const {
return _data;
}
P& getPose() {
return _pose;
}
const P& getPose() const {
return _pose;
}
A& getAppliedPose() {
return *_applied;
}
const A& getAppliedPose() const {
return *_applied;
}
protected:
D& _data;
P& _pose;
A& _constrained;
A* _applied;
};
}
#endif /* Spine_Posed_h */

View File

@ -1,61 +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_PosedActive_h
#define Spine_PosedActive_h
#include <spine/Posed.h>
namespace spine {
template<typename D, typename P, typename A>
class PosedActive : public Posed<D, P, A> {
public:
PosedActive(D& data, P& pose, A& constrained) : Posed<D, P, A>(data, pose, constrained), _active(false) {
this->setupPose();
}
virtual ~PosedActive() {}
/// Returns false when this constraint won't be updated by
/// Skeleton::updateWorldTransform(Physics) because a skin is required and the
/// active skin does not contain this item.
/// @see Skin::getBones()
/// @see Skin::getConstraints()
/// @see PosedData::getSkinRequired()
/// @see Skeleton::updateCache()
bool isActive() const {
return _active;
}
protected:
bool _active;
};
}
#endif /* Spine_PosedActive_h */

View File

@ -1,79 +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_PosedData_h
#define Spine_PosedData_h
#include <spine/SpineObject.h>
#include <spine/SpineString.h>
#include <spine/Pose.h>
namespace spine {
/// The base class for all constrained datas.
template<typename P>
class PosedData : public SpineObject {
public:
PosedData(const String& name, P& setup) : _name(name), _setup(setup), _skinRequired(false) {
}
virtual ~PosedData() {}
/// The constraint's name, which is unique across all constraints in the skeleton of the same type.
const String& getName() const {
return _name;
}
P& getSetupPose() {
return _setup;
}
const P& getSetupPose() const {
return _setup;
}
/// When true, Skeleton::updateWorldTransform(Physics) only updates this constraint if the Skeleton::getSkin()
/// contains this constraint.
///
/// See Skin::getConstraints().
bool getSkinRequired() const {
return _skinRequired;
}
void setSkinRequired(bool skinRequired) {
_skinRequired = skinRequired;
}
protected:
const String _name;
P& _setup;
bool _skinRequired;
};
}
#endif /* Spine_PosedData_h */

View File

@ -27,17 +27,28 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef Spine_Pose_h
#define Spine_Pose_h
#ifndef Spine_Updatable_h
#define Spine_Updatable_h
#include <spine/RTTI.h>
#include <spine/SpineObject.h>
#include <spine/Physics.h>
namespace spine {
template<typename P>
class Pose {
public:
virtual ~Pose() {}
class SP_API Updatable : public SpineObject {
RTTI_DECL
virtual void set(const P& pose) = 0;
public:
Updatable();
virtual ~Updatable();
virtual void update(Physics physics) = 0;
virtual bool isActive() = 0;
virtual void setActive(bool inValue) = 0;
};
}
#endif /* Spine_Pose_h */
#endif /* Spine_Updatable_h */

View File

@ -1,55 +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_Update_h
#define Spine_Update_h
#include <spine/RTTI.h>
#include <spine/SpineObject.h>
#include <spine/Physics.h>
namespace spine {
class Skeleton;
/// The interface for items updated by Skeleton::updateWorldTransform(Physics).
class SP_API Update : public SpineObject {
RTTI_DECL
public:
Update();
virtual ~Update();
/// @param skeleton The skeleton being updated.
/// @param physics Determines how physics and other non-deterministic updates are applied.
virtual void update(Skeleton& skeleton, Physics physics) = 0;
};
}
#endif /* Spine_Update_h */

View File

@ -107,14 +107,7 @@
#include <spine/TransformConstraintTimeline.h>
#include <spine/TranslateTimeline.h>
#include <spine/Triangulator.h>
#include <spine/Update.h>
#include <spine/Pose.h>
#include <spine/PosedData.h>
#include <spine/Posed.h>
#include <spine/PosedActive.h>
#include <spine/BoneLocal.h>
#include <spine/BonePose.h>
#include <spine/SlotPose.h>
#include <spine/Updatable.h>
#include <spine/Vector.h>
#include <spine/VertexAttachment.h>
#include <spine/Vertices.h>

View File

@ -27,14 +27,14 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include <spine/Update.h>
#include <spine/Updatable.h>
using namespace spine;
RTTI_IMPL_NOPARENT(Update)
RTTI_IMPL_NOPARENT(Updatable)
Update::Update() {
Updatable::Updatable() {
}
Update::~Update() {
}
Updatable::~Updatable() {
}