diff --git a/spine-cpp/spine-cpp/include/spine/Posed.h b/spine-cpp/spine-cpp/include/spine/Posed.h deleted file mode 100644 index df1d34cfd..000000000 --- a/spine-cpp/spine-cpp/include/spine/Posed.h +++ /dev/null @@ -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 -#include -#include - -namespace spine { - template - 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 */ \ No newline at end of file diff --git a/spine-cpp/spine-cpp/include/spine/PosedActive.h b/spine-cpp/spine-cpp/include/spine/PosedActive.h deleted file mode 100644 index 0a4568eac..000000000 --- a/spine-cpp/spine-cpp/include/spine/PosedActive.h +++ /dev/null @@ -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 - -namespace spine { - template - class PosedActive : public Posed { - public: - PosedActive(D& data, P& pose, A& constrained) : Posed(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 */ \ No newline at end of file diff --git a/spine-cpp/spine-cpp/include/spine/PosedData.h b/spine-cpp/spine-cpp/include/spine/PosedData.h deleted file mode 100644 index ade6e8a79..000000000 --- a/spine-cpp/spine-cpp/include/spine/PosedData.h +++ /dev/null @@ -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 -#include -#include - -namespace spine { - /// The base class for all constrained datas. - template - 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 */ \ No newline at end of file diff --git a/spine-cpp/spine-cpp/include/spine/Pose.h b/spine-cpp/spine-cpp/include/spine/Updatable.h similarity index 81% rename from spine-cpp/spine-cpp/include/spine/Pose.h rename to spine-cpp/spine-cpp/include/spine/Updatable.h index ab23a5335..dc5b4d375 100644 --- a/spine-cpp/spine-cpp/include/spine/Pose.h +++ b/spine-cpp/spine-cpp/include/spine/Updatable.h @@ -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 +#include +#include namespace spine { - template - 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 */ \ No newline at end of file +#endif /* Spine_Updatable_h */ diff --git a/spine-cpp/spine-cpp/include/spine/Update.h b/spine-cpp/spine-cpp/include/spine/Update.h deleted file mode 100644 index 70204ddf0..000000000 --- a/spine-cpp/spine-cpp/include/spine/Update.h +++ /dev/null @@ -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 -#include -#include - -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 */ \ No newline at end of file diff --git a/spine-cpp/spine-cpp/include/spine/spine.h b/spine-cpp/spine-cpp/include/spine/spine.h index 009fcb80f..ab3e5414e 100644 --- a/spine-cpp/spine-cpp/include/spine/spine.h +++ b/spine-cpp/spine-cpp/include/spine/spine.h @@ -107,14 +107,7 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include #include #include diff --git a/spine-cpp/spine-cpp/src/spine/Update.cpp b/spine-cpp/spine-cpp/src/spine/Updatable.cpp similarity index 93% rename from spine-cpp/spine-cpp/src/spine/Update.cpp rename to spine-cpp/spine-cpp/src/spine/Updatable.cpp index 81ee025dc..8e874a272 100644 --- a/spine-cpp/spine-cpp/src/spine/Update.cpp +++ b/spine-cpp/spine-cpp/src/spine/Updatable.cpp @@ -27,14 +27,14 @@ * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#include +#include using namespace spine; -RTTI_IMPL_NOPARENT(Update) +RTTI_IMPL_NOPARENT(Updatable) -Update::Update() { +Updatable::Updatable() { } -Update::~Update() { -} \ No newline at end of file +Updatable::~Updatable() { +}