mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[flutter] Wrap IkConstraint
This commit is contained in:
parent
10c2e2195e
commit
0a37ec4329
@ -1080,7 +1080,7 @@ class IkConstraintData extends ConstraintData {
|
||||
}
|
||||
|
||||
bool getCompress() {
|
||||
return _bindings.spine_ik_constraint_data_get_compress(_data) == -1 ? true : false;
|
||||
return _bindings.spine_ik_constraint_data_get_compress(_data) == -1;
|
||||
}
|
||||
|
||||
void setCompress(bool compress) {
|
||||
@ -1088,7 +1088,7 @@ class IkConstraintData extends ConstraintData {
|
||||
}
|
||||
|
||||
bool getStretch() {
|
||||
return _bindings.spine_ik_constraint_data_get_stretch(_data) == -1 ? true : false;
|
||||
return _bindings.spine_ik_constraint_data_get_stretch(_data) == -1;
|
||||
}
|
||||
|
||||
void setStretch(bool stretch) {
|
||||
@ -1096,7 +1096,7 @@ class IkConstraintData extends ConstraintData {
|
||||
}
|
||||
|
||||
bool getUniform() {
|
||||
return _bindings.spine_ik_constraint_data_get_uniform(_data) == -1 ? true : false;
|
||||
return _bindings.spine_ik_constraint_data_get_uniform(_data) == -1;
|
||||
}
|
||||
|
||||
void setUniform(bool uniform) {
|
||||
@ -1120,11 +1120,88 @@ class IkConstraintData extends ConstraintData {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME
|
||||
class IkConstraint {
|
||||
final spine_ik_constraint _constraint;
|
||||
|
||||
IkConstraint._(this._constraint);
|
||||
|
||||
void update() {
|
||||
_bindings.spine_ik_constraint_update(_constraint);
|
||||
}
|
||||
|
||||
int getOrder() {
|
||||
return _bindings.spine_ik_constraint_get_order(_constraint);
|
||||
}
|
||||
|
||||
IkConstraintData getData() {
|
||||
return IkConstraintData._(_bindings.spine_ik_constraint_get_data(_constraint));
|
||||
}
|
||||
|
||||
List<Bone> getBones() {
|
||||
List<Bone> result = [];
|
||||
final num = _bindings.spine_ik_constraint_get_num_bones(_constraint);
|
||||
final nativeBones = _bindings.spine_ik_constraint_get_bones(_constraint);
|
||||
for (int i = 0; i < num; i++) {
|
||||
result.add(Bone._(nativeBones[i]));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Bone getTarget() {
|
||||
return Bone._(_bindings.spine_ik_constraint_get_target(_constraint));
|
||||
}
|
||||
|
||||
void setTarget(Bone target) {
|
||||
_bindings.spine_ik_constraint_set_target(_constraint, target._bone);
|
||||
}
|
||||
|
||||
int getBendDirection() {
|
||||
return _bindings.spine_ik_constraint_get_bend_direction(_constraint);
|
||||
}
|
||||
|
||||
void setBendDirection(int bendDirection) {
|
||||
_bindings.spine_ik_constraint_set_bend_direction(_constraint, bendDirection);
|
||||
}
|
||||
|
||||
bool getCompress() {
|
||||
return _bindings.spine_ik_constraint_get_compress(_constraint) == -1;
|
||||
}
|
||||
|
||||
void setCompress(bool compress) {
|
||||
_bindings.spine_ik_constraint_set_compress(_constraint, compress ? -1 : 0);
|
||||
}
|
||||
|
||||
bool getStretch() {
|
||||
return _bindings.spine_ik_constraint_get_stretch(_constraint) == -1;
|
||||
}
|
||||
|
||||
void setStretch(bool stretch) {
|
||||
_bindings.spine_ik_constraint_set_stretch(_constraint, stretch ? -1 : 0);
|
||||
}
|
||||
|
||||
double getMix() {
|
||||
return _bindings.spine_ik_constraint_get_mix(_constraint);
|
||||
}
|
||||
|
||||
void setMix(double mix) {
|
||||
_bindings.spine_ik_constraint_set_mix(_constraint, mix);
|
||||
}
|
||||
|
||||
double getSoftness() {
|
||||
return _bindings.spine_ik_constraint_get_softness(_constraint);
|
||||
}
|
||||
|
||||
void setSoftness(double softness) {
|
||||
_bindings.spine_ik_constraint_set_softness(_constraint, softness);
|
||||
}
|
||||
|
||||
bool isActive() {
|
||||
return _bindings.spine_ik_constraint_get_is_active(_constraint) == -1;
|
||||
}
|
||||
|
||||
void setIsActive(bool isActive) {
|
||||
_bindings.spine_ik_constraint_set_is_active(_constraint, isActive ? -1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME
|
||||
|
||||
@ -5066,6 +5066,308 @@ class SpineFlutterBindings {
|
||||
late final _spine_ik_constraint_data_set_softness =
|
||||
_spine_ik_constraint_data_set_softnessPtr
|
||||
.asFunction<void Function(spine_ik_constraint_data, double)>();
|
||||
|
||||
void spine_ik_constraint_update(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_update(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_updatePtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_update');
|
||||
late final _spine_ik_constraint_update = _spine_ik_constraint_updatePtr
|
||||
.asFunction<void Function(spine_ik_constraint)>();
|
||||
|
||||
int spine_ik_constraint_get_order(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_order(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_orderPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_order');
|
||||
late final _spine_ik_constraint_get_order = _spine_ik_constraint_get_orderPtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
spine_ik_constraint_data spine_ik_constraint_get_data(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_data(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_dataPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
spine_ik_constraint_data Function(
|
||||
spine_ik_constraint)>>('spine_ik_constraint_get_data');
|
||||
late final _spine_ik_constraint_get_data = _spine_ik_constraint_get_dataPtr
|
||||
.asFunction<spine_ik_constraint_data Function(spine_ik_constraint)>();
|
||||
|
||||
int spine_ik_constraint_get_num_bones(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_num_bones(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_num_bonesPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_num_bones');
|
||||
late final _spine_ik_constraint_get_num_bones =
|
||||
_spine_ik_constraint_get_num_bonesPtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
ffi.Pointer<spine_bone> spine_ik_constraint_get_bones(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_bones(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_bonesPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<spine_bone> Function(
|
||||
spine_ik_constraint)>>('spine_ik_constraint_get_bones');
|
||||
late final _spine_ik_constraint_get_bones = _spine_ik_constraint_get_bonesPtr
|
||||
.asFunction<ffi.Pointer<spine_bone> Function(spine_ik_constraint)>();
|
||||
|
||||
spine_bone spine_ik_constraint_get_target(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_target(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_targetPtr =
|
||||
_lookup<ffi.NativeFunction<spine_bone Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_target');
|
||||
late final _spine_ik_constraint_get_target =
|
||||
_spine_ik_constraint_get_targetPtr
|
||||
.asFunction<spine_bone Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_target(
|
||||
spine_ik_constraint constraint,
|
||||
spine_bone target,
|
||||
) {
|
||||
return _spine_ik_constraint_set_target(
|
||||
constraint,
|
||||
target,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_targetPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
spine_bone)>>('spine_ik_constraint_set_target');
|
||||
late final _spine_ik_constraint_set_target =
|
||||
_spine_ik_constraint_set_targetPtr
|
||||
.asFunction<void Function(spine_ik_constraint, spine_bone)>();
|
||||
|
||||
int spine_ik_constraint_get_bend_direction(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_bend_direction(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_bend_directionPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_bend_direction');
|
||||
late final _spine_ik_constraint_get_bend_direction =
|
||||
_spine_ik_constraint_get_bend_directionPtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_bend_direction(
|
||||
spine_ik_constraint constraint,
|
||||
int bendDirection,
|
||||
) {
|
||||
return _spine_ik_constraint_set_bend_direction(
|
||||
constraint,
|
||||
bendDirection,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_bend_directionPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
ffi.Int32)>>('spine_ik_constraint_set_bend_direction');
|
||||
late final _spine_ik_constraint_set_bend_direction =
|
||||
_spine_ik_constraint_set_bend_directionPtr
|
||||
.asFunction<void Function(spine_ik_constraint, int)>();
|
||||
|
||||
int spine_ik_constraint_get_compress(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_compress(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_compressPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_compress');
|
||||
late final _spine_ik_constraint_get_compress =
|
||||
_spine_ik_constraint_get_compressPtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_compress(
|
||||
spine_ik_constraint constraint,
|
||||
int compress,
|
||||
) {
|
||||
return _spine_ik_constraint_set_compress(
|
||||
constraint,
|
||||
compress,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_compressPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
ffi.Int32)>>('spine_ik_constraint_set_compress');
|
||||
late final _spine_ik_constraint_set_compress =
|
||||
_spine_ik_constraint_set_compressPtr
|
||||
.asFunction<void Function(spine_ik_constraint, int)>();
|
||||
|
||||
int spine_ik_constraint_get_stretch(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_stretch(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_stretchPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_stretch');
|
||||
late final _spine_ik_constraint_get_stretch =
|
||||
_spine_ik_constraint_get_stretchPtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_stretch(
|
||||
spine_ik_constraint constraint,
|
||||
int stretch,
|
||||
) {
|
||||
return _spine_ik_constraint_set_stretch(
|
||||
constraint,
|
||||
stretch,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_stretchPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
ffi.Int32)>>('spine_ik_constraint_set_stretch');
|
||||
late final _spine_ik_constraint_set_stretch =
|
||||
_spine_ik_constraint_set_stretchPtr
|
||||
.asFunction<void Function(spine_ik_constraint, int)>();
|
||||
|
||||
double spine_ik_constraint_get_mix(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_mix(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_mixPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Float Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_mix');
|
||||
late final _spine_ik_constraint_get_mix = _spine_ik_constraint_get_mixPtr
|
||||
.asFunction<double Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_mix(
|
||||
spine_ik_constraint constraint,
|
||||
double mix,
|
||||
) {
|
||||
return _spine_ik_constraint_set_mix(
|
||||
constraint,
|
||||
mix,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_mixPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
spine_ik_constraint, ffi.Float)>>('spine_ik_constraint_set_mix');
|
||||
late final _spine_ik_constraint_set_mix = _spine_ik_constraint_set_mixPtr
|
||||
.asFunction<void Function(spine_ik_constraint, double)>();
|
||||
|
||||
double spine_ik_constraint_get_softness(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_softness(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_softnessPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Float Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_softness');
|
||||
late final _spine_ik_constraint_get_softness =
|
||||
_spine_ik_constraint_get_softnessPtr
|
||||
.asFunction<double Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_softness(
|
||||
spine_ik_constraint constraint,
|
||||
double softness,
|
||||
) {
|
||||
return _spine_ik_constraint_set_softness(
|
||||
constraint,
|
||||
softness,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_softnessPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
ffi.Float)>>('spine_ik_constraint_set_softness');
|
||||
late final _spine_ik_constraint_set_softness =
|
||||
_spine_ik_constraint_set_softnessPtr
|
||||
.asFunction<void Function(spine_ik_constraint, double)>();
|
||||
|
||||
int spine_ik_constraint_get_is_active(
|
||||
spine_ik_constraint constraint,
|
||||
) {
|
||||
return _spine_ik_constraint_get_is_active(
|
||||
constraint,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_get_is_activePtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int32 Function(spine_ik_constraint)>>(
|
||||
'spine_ik_constraint_get_is_active');
|
||||
late final _spine_ik_constraint_get_is_active =
|
||||
_spine_ik_constraint_get_is_activePtr
|
||||
.asFunction<int Function(spine_ik_constraint)>();
|
||||
|
||||
void spine_ik_constraint_set_is_active(
|
||||
spine_ik_constraint constraint,
|
||||
int isActive,
|
||||
) {
|
||||
return _spine_ik_constraint_set_is_active(
|
||||
constraint,
|
||||
isActive,
|
||||
);
|
||||
}
|
||||
|
||||
late final _spine_ik_constraint_set_is_activePtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(spine_ik_constraint,
|
||||
ffi.Int32)>>('spine_ik_constraint_set_is_active');
|
||||
late final _spine_ik_constraint_set_is_active =
|
||||
_spine_ik_constraint_set_is_activePtr
|
||||
.asFunction<void Function(spine_ik_constraint, int)>();
|
||||
}
|
||||
|
||||
class spine_atlas extends ffi.Struct {
|
||||
|
||||
@ -2185,3 +2185,117 @@ FFI_PLUGIN_EXPORT void spine_ik_constraint_data_set_softness(spine_ik_constraint
|
||||
_data->setSoftness(softness);
|
||||
}
|
||||
|
||||
// IKConstraint
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_update(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->update();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_order(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getOrder();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return nullptr;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return (spine_ik_constraint_data)&_constraint->getData();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_num_bones(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return (int)_constraint->getBones().size();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT spine_bone* spine_ik_constraint_get_bones(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return nullptr;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return (spine_bone*)_constraint->getBones().buffer();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT spine_bone spine_ik_constraint_get_target(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return nullptr;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return (spine_bone)_constraint->getTarget();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_target(spine_ik_constraint constraint, spine_bone target) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setTarget((Bone*)target);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_bend_direction(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 1;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getBendDirection();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_bend_direction(spine_ik_constraint constraint, int bendDirection) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setBendDirection(bendDirection);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_compress(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getCompress() ? -1 : 0;
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_compress(spine_ik_constraint constraint, int compress) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setCompress(compress);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_stretch(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getStretch() ? -1 : 0;
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_stretch(spine_ik_constraint constraint, int stretch) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setStretch(stretch);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT float spine_ik_constraint_get_mix(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getMix();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_mix(spine_ik_constraint constraint, float mix) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setMix(mix);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT float spine_ik_constraint_get_softness(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->getSoftness();
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_softness(spine_ik_constraint constraint, float softness) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setSoftness(softness);
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_is_active(spine_ik_constraint constraint) {
|
||||
if (constraint == nullptr) return 0;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
return _constraint->isActive() ? -1 : 0;
|
||||
}
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_is_active(spine_ik_constraint constraint, int isActive) {
|
||||
if (constraint == nullptr) return;
|
||||
IkConstraint *_constraint = (IkConstraint*)constraint;
|
||||
_constraint->setActive(isActive);
|
||||
}
|
||||
|
||||
@ -482,3 +482,23 @@ FFI_PLUGIN_EXPORT float spine_ik_constraint_data_get_mix(spine_ik_constraint_dat
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_data_set_mix(spine_ik_constraint_data data, float mix);
|
||||
FFI_PLUGIN_EXPORT float spine_ik_constraint_data_get_softness(spine_ik_constraint_data data);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_data_set_softness(spine_ik_constraint_data data, float softness);
|
||||
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_update(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_order(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT spine_ik_constraint_data spine_ik_constraint_get_data(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_num_bones(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT spine_bone* spine_ik_constraint_get_bones(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT spine_bone spine_ik_constraint_get_target(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_target(spine_ik_constraint constraint, spine_bone target);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_bend_direction(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_bend_direction(spine_ik_constraint constraint, int bendDirection);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_compress(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_compress(spine_ik_constraint constraint, int compress);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_stretch(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_stretch(spine_ik_constraint constraint, int stretch);
|
||||
FFI_PLUGIN_EXPORT float spine_ik_constraint_get_mix(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_mix(spine_ik_constraint constraint, float mix);
|
||||
FFI_PLUGIN_EXPORT float spine_ik_constraint_get_softness(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_softness(spine_ik_constraint constraint, float softness);
|
||||
FFI_PLUGIN_EXPORT int spine_ik_constraint_get_is_active(spine_ik_constraint constraint);
|
||||
FFI_PLUGIN_EXPORT void spine_ik_constraint_set_is_active(spine_ik_constraint constraint, int isActive);
|
||||
Loading…
x
Reference in New Issue
Block a user