[cpp] Add RTTI information for constraint data types.

This commit is contained in:
Mario Zechner 2022-09-02 14:11:30 +02:00
parent cfeb2505d1
commit 2f4ab354ba
9 changed files with 18 additions and 3 deletions

View File

@ -34,9 +34,11 @@
#include <spine/SpineString.h>
namespace spine {
/// The interface for all constraints.
/// The interface for all constraints.
class SP_API ConstraintData : public SpineObject {
RTTI_DECL
public:
ConstraintData(const String &name);

View File

@ -50,6 +50,8 @@ namespace spine {
friend class IkConstraintTimeline;
public:
RTTI_DECL
explicit IkConstraintData(const String &name);
/// The bones that are constrained by this IK Constraint.

View File

@ -57,8 +57,9 @@ namespace spine {
friend class PathConstraintPositionTimeline;
friend class PathConstraintSpacingTimeline;
public:
RTTI_DECL
explicit PathConstraintData(const String &name);
Vector<BoneData *> &getBones();

View File

@ -50,6 +50,8 @@ namespace spine {
friend class TransformConstraintTimeline;
public:
RTTI_DECL
explicit TransformConstraintData(const String &name);
Vector<BoneData *> &getBones();

View File

@ -286,7 +286,7 @@ void Atlas::load(const char *begin, int length, const char *dir, bool createText
} else {
page->texturePath = String(path, true);
}
page->index = _pages.size();
page->index = _pages.size();
_pages.add(page);
} else {
AtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();

View File

@ -31,6 +31,8 @@
using namespace spine;
RTTI_IMPL_NOPARENT(ConstraintData)
ConstraintData::ConstraintData(const String &name) : _name(name), _order(0), _skinRequired(false) {
}

View File

@ -33,6 +33,8 @@
using namespace spine;
RTTI_IMPL(IkConstraintData, ConstraintData)
IkConstraintData::IkConstraintData(const String &name) : ConstraintData(name),
_target(NULL),
_bendDirection(1),

View File

@ -36,6 +36,8 @@
using namespace spine;
RTTI_IMPL(PathConstraintData, ConstraintData)
PathConstraintData::PathConstraintData(const String &name) : ConstraintData(name),
_target(NULL),
_positionMode(PositionMode_Fixed),

View File

@ -35,6 +35,8 @@
using namespace spine;
RTTI_IMPL(TransformConstraintData, ConstraintData)
TransformConstraintData::TransformConstraintData(const String &name) : ConstraintData(name),
_target(NULL),
_mixRotate(0),