|
@@ -42,7 +42,7 @@ public class TransformConstraint implements Updatable {
|
|
final TransformConstraintData data;
|
|
final TransformConstraintData data;
|
|
final Array<Bone> bones;
|
|
final Array<Bone> bones;
|
|
Bone target;
|
|
Bone target;
|
|
- float rotateMix, translateMix, scaleMix, shearMix;
|
|
|
|
|
|
+ float mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY;
|
|
|
|
|
|
boolean active;
|
|
boolean active;
|
|
final Vector2 temp = new Vector2();
|
|
final Vector2 temp = new Vector2();
|
|
@@ -51,10 +51,12 @@ public class TransformConstraint implements Updatable {
|
|
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
|
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
|
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
|
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
|
this.data = data;
|
|
this.data = data;
|
|
- rotateMix = data.rotateMix;
|
|
|
|
- translateMix = data.translateMix;
|
|
|
|
- scaleMix = data.scaleMix;
|
|
|
|
- shearMix = data.shearMix;
|
|
|
|
|
|
+ mixRotate = data.mixRotate;
|
|
|
|
+ mixX = data.mixX;
|
|
|
|
+ mixY = data.mixY;
|
|
|
|
+ mixScaleX = data.mixScaleX;
|
|
|
|
+ mixScaleY = data.mixScaleY;
|
|
|
|
+ mixShearY = data.mixShearY;
|
|
bones = new Array(data.bones.size);
|
|
bones = new Array(data.bones.size);
|
|
for (BoneData boneData : data.bones)
|
|
for (BoneData boneData : data.bones)
|
|
bones.add(skeleton.findBone(boneData.name));
|
|
bones.add(skeleton.findBone(boneData.name));
|
|
@@ -70,15 +72,17 @@ public class TransformConstraint implements Updatable {
|
|
for (Bone bone : constraint.bones)
|
|
for (Bone bone : constraint.bones)
|
|
bones.add(skeleton.bones.get(bone.data.index));
|
|
bones.add(skeleton.bones.get(bone.data.index));
|
|
target = skeleton.bones.get(constraint.target.data.index);
|
|
target = skeleton.bones.get(constraint.target.data.index);
|
|
- rotateMix = constraint.rotateMix;
|
|
|
|
- translateMix = constraint.translateMix;
|
|
|
|
- scaleMix = constraint.scaleMix;
|
|
|
|
- shearMix = constraint.shearMix;
|
|
|
|
|
|
+ mixRotate = constraint.mixRotate;
|
|
|
|
+ mixX = constraint.mixX;
|
|
|
|
+ mixY = constraint.mixY;
|
|
|
|
+ mixScaleX = constraint.mixScaleX;
|
|
|
|
+ mixScaleY = constraint.mixScaleY;
|
|
|
|
+ mixShearY = constraint.mixShearY;
|
|
}
|
|
}
|
|
|
|
|
|
/** Applies the constraint to the constrained bones. */
|
|
/** Applies the constraint to the constrained bones. */
|
|
public void update () {
|
|
public void update () {
|
|
- if (rotateMix == 0 && translateMix == 0 && scaleMix == 0 && shearMix == 0) return;
|
|
|
|
|
|
+ if (mixRotate == 0 && mixX == 0 && mixY == 0 && mixScaleX == 0 && mixScaleX == 0 && mixShearY == 0) return;
|
|
if (data.local) {
|
|
if (data.local) {
|
|
if (data.relative)
|
|
if (data.relative)
|
|
applyRelativeLocal();
|
|
applyRelativeLocal();
|
|
@@ -93,22 +97,27 @@ public class TransformConstraint implements Updatable {
|
|
}
|
|
}
|
|
|
|
|
|
private void applyAbsoluteWorld () {
|
|
private void applyAbsoluteWorld () {
|
|
- float rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;
|
|
|
|
|
|
+ float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX,
|
|
|
|
+ mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
|
|
|
|
+ boolean translate = mixX != 0 || mixY != 0;
|
|
|
|
+
|
|
Bone target = this.target;
|
|
Bone target = this.target;
|
|
float ta = target.a, tb = target.b, tc = target.c, td = target.d;
|
|
float ta = target.a, tb = target.b, tc = target.c, td = target.d;
|
|
float degRadReflect = ta * td - tb * tc > 0 ? degRad : -degRad;
|
|
float degRadReflect = ta * td - tb * tc > 0 ? degRad : -degRad;
|
|
float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
|
|
float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
|
|
|
|
+
|
|
Object[] bones = this.bones.items;
|
|
Object[] bones = this.bones.items;
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
Bone bone = (Bone)bones[i];
|
|
Bone bone = (Bone)bones[i];
|
|
|
|
|
|
- if (rotateMix != 0) {
|
|
|
|
|
|
+ if (mixRotate != 0) {
|
|
float a = bone.a, b = bone.b, c = bone.c, d = bone.d;
|
|
float a = bone.a, b = bone.b, c = bone.c, d = bone.d;
|
|
float r = atan2(tc, ta) - atan2(c, a) + offsetRotation;
|
|
float r = atan2(tc, ta) - atan2(c, a) + offsetRotation;
|
|
if (r > PI)
|
|
if (r > PI)
|
|
r -= PI2;
|
|
r -= PI2;
|
|
- else if (r < -PI) r += PI2;
|
|
|
|
- r *= rotateMix;
|
|
|
|
|
|
+ else if (r < -PI) //
|
|
|
|
+ r += PI2;
|
|
|
|
+ r *= mixRotate;
|
|
float cos = cos(r), sin = sin(r);
|
|
float cos = cos(r), sin = sin(r);
|
|
bone.a = cos * a - sin * c;
|
|
bone.a = cos * a - sin * c;
|
|
bone.b = cos * b - sin * d;
|
|
bone.b = cos * b - sin * d;
|
|
@@ -116,32 +125,35 @@ public class TransformConstraint implements Updatable {
|
|
bone.d = sin * b + cos * d;
|
|
bone.d = sin * b + cos * d;
|
|
}
|
|
}
|
|
|
|
|
|
- if (translateMix != 0) {
|
|
|
|
|
|
+ if (translate) {
|
|
Vector2 temp = this.temp;
|
|
Vector2 temp = this.temp;
|
|
target.localToWorld(temp.set(data.offsetX, data.offsetY));
|
|
target.localToWorld(temp.set(data.offsetX, data.offsetY));
|
|
- bone.worldX += (temp.x - bone.worldX) * translateMix;
|
|
|
|
- bone.worldY += (temp.y - bone.worldY) * translateMix;
|
|
|
|
|
|
+ bone.worldX += (temp.x - bone.worldX) * mixX;
|
|
|
|
+ bone.worldY += (temp.y - bone.worldY) * mixY;
|
|
}
|
|
}
|
|
|
|
|
|
- if (scaleMix > 0) {
|
|
|
|
|
|
+ if (mixScaleX != 0) {
|
|
float s = (float)Math.sqrt(bone.a * bone.a + bone.c * bone.c);
|
|
float s = (float)Math.sqrt(bone.a * bone.a + bone.c * bone.c);
|
|
- if (s != 0) s = (s + ((float)Math.sqrt(ta * ta + tc * tc) - s + data.offsetScaleX) * scaleMix) / s;
|
|
|
|
|
|
+ if (s != 0) s = (s + ((float)Math.sqrt(ta * ta + tc * tc) - s + data.offsetScaleX) * mixScaleX) / s;
|
|
bone.a *= s;
|
|
bone.a *= s;
|
|
bone.c *= s;
|
|
bone.c *= s;
|
|
- s = (float)Math.sqrt(bone.b * bone.b + bone.d * bone.d);
|
|
|
|
- if (s != 0) s = (s + ((float)Math.sqrt(tb * tb + td * td) - s + data.offsetScaleY) * scaleMix) / s;
|
|
|
|
|
|
+ }
|
|
|
|
+ if (mixScaleY != 0) {
|
|
|
|
+ float s = (float)Math.sqrt(bone.b * bone.b + bone.d * bone.d);
|
|
|
|
+ if (s != 0) s = (s + ((float)Math.sqrt(tb * tb + td * td) - s + data.offsetScaleY) * mixScaleY) / s;
|
|
bone.b *= s;
|
|
bone.b *= s;
|
|
bone.d *= s;
|
|
bone.d *= s;
|
|
}
|
|
}
|
|
|
|
|
|
- if (shearMix > 0) {
|
|
|
|
|
|
+ if (mixShearY > 0) {
|
|
float b = bone.b, d = bone.d;
|
|
float b = bone.b, d = bone.d;
|
|
float by = atan2(d, b);
|
|
float by = atan2(d, b);
|
|
float r = atan2(td, tb) - atan2(tc, ta) - (by - atan2(bone.c, bone.a));
|
|
float r = atan2(td, tb) - atan2(tc, ta) - (by - atan2(bone.c, bone.a));
|
|
if (r > PI)
|
|
if (r > PI)
|
|
r -= PI2;
|
|
r -= PI2;
|
|
- else if (r < -PI) r += PI2;
|
|
|
|
- r = by + (r + offsetShearY) * shearMix;
|
|
|
|
|
|
+ else if (r < -PI) //
|
|
|
|
+ r += PI2;
|
|
|
|
+ r = by + (r + offsetShearY) * mixShearY;
|
|
float s = (float)Math.sqrt(b * b + d * d);
|
|
float s = (float)Math.sqrt(b * b + d * d);
|
|
bone.b = cos(r) * s;
|
|
bone.b = cos(r) * s;
|
|
bone.d = sin(r) * s;
|
|
bone.d = sin(r) * s;
|
|
@@ -152,22 +164,27 @@ public class TransformConstraint implements Updatable {
|
|
}
|
|
}
|
|
|
|
|
|
private void applyRelativeWorld () {
|
|
private void applyRelativeWorld () {
|
|
- float rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;
|
|
|
|
|
|
+ float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX,
|
|
|
|
+ mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
|
|
|
|
+ boolean translate = mixX != 0 || mixY != 0;
|
|
|
|
+
|
|
Bone target = this.target;
|
|
Bone target = this.target;
|
|
float ta = target.a, tb = target.b, tc = target.c, td = target.d;
|
|
float ta = target.a, tb = target.b, tc = target.c, td = target.d;
|
|
float degRadReflect = ta * td - tb * tc > 0 ? degRad : -degRad;
|
|
float degRadReflect = ta * td - tb * tc > 0 ? degRad : -degRad;
|
|
float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
|
|
float offsetRotation = data.offsetRotation * degRadReflect, offsetShearY = data.offsetShearY * degRadReflect;
|
|
|
|
+
|
|
Object[] bones = this.bones.items;
|
|
Object[] bones = this.bones.items;
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
Bone bone = (Bone)bones[i];
|
|
Bone bone = (Bone)bones[i];
|
|
|
|
|
|
- if (rotateMix != 0) {
|
|
|
|
|
|
+ if (mixRotate != 0) {
|
|
float a = bone.a, b = bone.b, c = bone.c, d = bone.d;
|
|
float a = bone.a, b = bone.b, c = bone.c, d = bone.d;
|
|
float r = atan2(tc, ta) + offsetRotation;
|
|
float r = atan2(tc, ta) + offsetRotation;
|
|
if (r > PI)
|
|
if (r > PI)
|
|
r -= PI2;
|
|
r -= PI2;
|
|
- else if (r < -PI) r += PI2;
|
|
|
|
- r *= rotateMix;
|
|
|
|
|
|
+ else if (r < -PI) //
|
|
|
|
+ r += PI2;
|
|
|
|
+ r *= mixRotate;
|
|
float cos = cos(r), sin = sin(r);
|
|
float cos = cos(r), sin = sin(r);
|
|
bone.a = cos * a - sin * c;
|
|
bone.a = cos * a - sin * c;
|
|
bone.b = cos * b - sin * d;
|
|
bone.b = cos * b - sin * d;
|
|
@@ -175,29 +192,32 @@ public class TransformConstraint implements Updatable {
|
|
bone.d = sin * b + cos * d;
|
|
bone.d = sin * b + cos * d;
|
|
}
|
|
}
|
|
|
|
|
|
- if (translateMix != 0) {
|
|
|
|
|
|
+ if (translate) {
|
|
Vector2 temp = this.temp;
|
|
Vector2 temp = this.temp;
|
|
target.localToWorld(temp.set(data.offsetX, data.offsetY));
|
|
target.localToWorld(temp.set(data.offsetX, data.offsetY));
|
|
- bone.worldX += temp.x * translateMix;
|
|
|
|
- bone.worldY += temp.y * translateMix;
|
|
|
|
|
|
+ bone.worldX += temp.x * mixX;
|
|
|
|
+ bone.worldY += temp.y * mixY;
|
|
}
|
|
}
|
|
|
|
|
|
- if (scaleMix > 0) {
|
|
|
|
- float s = ((float)Math.sqrt(ta * ta + tc * tc) - 1 + data.offsetScaleX) * scaleMix + 1;
|
|
|
|
|
|
+ if (mixScaleX != 0) {
|
|
|
|
+ float s = ((float)Math.sqrt(ta * ta + tc * tc) - 1 + data.offsetScaleX) * mixScaleX + 1;
|
|
bone.a *= s;
|
|
bone.a *= s;
|
|
bone.c *= s;
|
|
bone.c *= s;
|
|
- s = ((float)Math.sqrt(tb * tb + td * td) - 1 + data.offsetScaleY) * scaleMix + 1;
|
|
|
|
|
|
+ }
|
|
|
|
+ if (mixScaleY != 0) {
|
|
|
|
+ float s = ((float)Math.sqrt(tb * tb + td * td) - 1 + data.offsetScaleY) * mixScaleY + 1;
|
|
bone.b *= s;
|
|
bone.b *= s;
|
|
bone.d *= s;
|
|
bone.d *= s;
|
|
}
|
|
}
|
|
|
|
|
|
- if (shearMix > 0) {
|
|
|
|
|
|
+ if (mixShearY > 0) {
|
|
float r = atan2(td, tb) - atan2(tc, ta);
|
|
float r = atan2(td, tb) - atan2(tc, ta);
|
|
if (r > PI)
|
|
if (r > PI)
|
|
r -= PI2;
|
|
r -= PI2;
|
|
- else if (r < -PI) r += PI2;
|
|
|
|
|
|
+ else if (r < -PI) //
|
|
|
|
+ r += PI2;
|
|
float b = bone.b, d = bone.d;
|
|
float b = bone.b, d = bone.d;
|
|
- r = atan2(d, b) + (r - PI / 2 + offsetShearY) * shearMix;
|
|
|
|
|
|
+ r = atan2(d, b) + (r - PI / 2 + offsetShearY) * mixShearY;
|
|
float s = (float)Math.sqrt(b * b + d * d);
|
|
float s = (float)Math.sqrt(b * b + d * d);
|
|
bone.b = cos(r) * s;
|
|
bone.b = cos(r) * s;
|
|
bone.d = sin(r) * s;
|
|
bone.d = sin(r) * s;
|
|
@@ -208,38 +228,39 @@ public class TransformConstraint implements Updatable {
|
|
}
|
|
}
|
|
|
|
|
|
private void applyAbsoluteLocal () {
|
|
private void applyAbsoluteLocal () {
|
|
- float rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;
|
|
|
|
|
|
+ float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX,
|
|
|
|
+ mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
|
|
|
|
+
|
|
Bone target = this.target;
|
|
Bone target = this.target;
|
|
if (!target.appliedValid) target.updateAppliedTransform();
|
|
if (!target.appliedValid) target.updateAppliedTransform();
|
|
|
|
+
|
|
Object[] bones = this.bones.items;
|
|
Object[] bones = this.bones.items;
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
Bone bone = (Bone)bones[i];
|
|
Bone bone = (Bone)bones[i];
|
|
if (!bone.appliedValid) bone.updateAppliedTransform();
|
|
if (!bone.appliedValid) bone.updateAppliedTransform();
|
|
|
|
|
|
float rotation = bone.arotation;
|
|
float rotation = bone.arotation;
|
|
- if (rotateMix != 0) {
|
|
|
|
|
|
+ if (mixRotate != 0) {
|
|
float r = target.arotation - rotation + data.offsetRotation;
|
|
float r = target.arotation - rotation + data.offsetRotation;
|
|
r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360;
|
|
r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360;
|
|
- rotation += r * rotateMix;
|
|
|
|
|
|
+ rotation += r * mixRotate;
|
|
}
|
|
}
|
|
|
|
|
|
float x = bone.ax, y = bone.ay;
|
|
float x = bone.ax, y = bone.ay;
|
|
- if (translateMix != 0) {
|
|
|
|
- x += (target.ax - x + data.offsetX) * translateMix;
|
|
|
|
- y += (target.ay - y + data.offsetY) * translateMix;
|
|
|
|
- }
|
|
|
|
|
|
+ x += (target.ax - x + data.offsetX) * mixX;
|
|
|
|
+ y += (target.ay - y + data.offsetY) * mixY;
|
|
|
|
|
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
|
- if (scaleMix != 0) {
|
|
|
|
- if (scaleX != 0) scaleX = (scaleX + (target.ascaleX - scaleX + data.offsetScaleX) * scaleMix) / scaleX;
|
|
|
|
- if (scaleY != 0) scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * scaleMix) / scaleY;
|
|
|
|
- }
|
|
|
|
|
|
+ if (mixScaleX != 0 && scaleX != 0)
|
|
|
|
+ scaleX = (scaleX + (target.ascaleX - scaleX + data.offsetScaleX) * mixScaleX) / scaleX;
|
|
|
|
+ if (mixScaleY != 0 && scaleY != 0)
|
|
|
|
+ scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * mixScaleY) / scaleY;
|
|
|
|
|
|
float shearY = bone.ashearY;
|
|
float shearY = bone.ashearY;
|
|
- if (shearMix != 0) {
|
|
|
|
|
|
+ if (mixShearY != 0) {
|
|
float r = target.ashearY - shearY + data.offsetShearY;
|
|
float r = target.ashearY - shearY + data.offsetShearY;
|
|
r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360;
|
|
r -= (16384 - (int)(16384.499999999996 - r / 360)) * 360;
|
|
- shearY += r * shearMix;
|
|
|
|
|
|
+ shearY += r * mixShearY;
|
|
}
|
|
}
|
|
|
|
|
|
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
|
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
|
@@ -247,31 +268,23 @@ public class TransformConstraint implements Updatable {
|
|
}
|
|
}
|
|
|
|
|
|
private void applyRelativeLocal () {
|
|
private void applyRelativeLocal () {
|
|
- float rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;
|
|
|
|
|
|
+ float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX,
|
|
|
|
+ mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;
|
|
|
|
+
|
|
Bone target = this.target;
|
|
Bone target = this.target;
|
|
if (!target.appliedValid) target.updateAppliedTransform();
|
|
if (!target.appliedValid) target.updateAppliedTransform();
|
|
|
|
+
|
|
Object[] bones = this.bones.items;
|
|
Object[] bones = this.bones.items;
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
for (int i = 0, n = this.bones.size; i < n; i++) {
|
|
Bone bone = (Bone)bones[i];
|
|
Bone bone = (Bone)bones[i];
|
|
if (!bone.appliedValid) bone.updateAppliedTransform();
|
|
if (!bone.appliedValid) bone.updateAppliedTransform();
|
|
|
|
|
|
- float rotation = bone.arotation;
|
|
|
|
- if (rotateMix != 0) rotation += (target.arotation + data.offsetRotation) * rotateMix;
|
|
|
|
-
|
|
|
|
- float x = bone.ax, y = bone.ay;
|
|
|
|
- if (translateMix != 0) {
|
|
|
|
- x += (target.ax + data.offsetX) * translateMix;
|
|
|
|
- y += (target.ay + data.offsetY) * translateMix;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
|
|
|
- if (scaleMix != 0) {
|
|
|
|
- scaleX *= ((target.ascaleX - 1 + data.offsetScaleX) * scaleMix) + 1;
|
|
|
|
- scaleY *= ((target.ascaleY - 1 + data.offsetScaleY) * scaleMix) + 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- float shearY = bone.ashearY;
|
|
|
|
- if (shearMix != 0) shearY += (target.ashearY + data.offsetShearY) * shearMix;
|
|
|
|
|
|
+ float rotation = bone.arotation + (target.arotation + data.offsetRotation) * mixRotate;
|
|
|
|
+ float x = bone.ax + (target.ax + data.offsetX) * mixX;
|
|
|
|
+ float y = bone.ay + (target.ay + data.offsetY) * mixY;
|
|
|
|
+ float scaleX = (bone.ascaleX * ((target.ascaleX - 1 + data.offsetScaleX) * mixScaleX) + 1);
|
|
|
|
+ float scaleY = (bone.ascaleY * ((target.ascaleY - 1 + data.offsetScaleY) * mixScaleY) + 1);
|
|
|
|
+ float shearY = bone.ashearY + (target.ashearY + data.offsetShearY) * mixShearY;
|
|
|
|
|
|
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
|
bone.updateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
|
|
}
|
|
}
|
|
@@ -292,40 +305,58 @@ public class TransformConstraint implements Updatable {
|
|
this.target = target;
|
|
this.target = target;
|
|
}
|
|
}
|
|
|
|
|
|
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
|
|
- public float getRotateMix () {
|
|
|
|
- return rotateMix;
|
|
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
|
|
|
+ public float getMixRotate () {
|
|
|
|
+ return mixRotate;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setMixRotate (float mixRotate) {
|
|
|
|
+ this.mixRotate = mixRotate;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
|
|
|
+ public float getMixX () {
|
|
|
|
+ return mixX;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setMixX (float mixX) {
|
|
|
|
+ this.mixX = mixX;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
|
|
|
+ public float getMixY () {
|
|
|
|
+ return mixY;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setRotateMix (float rotateMix) {
|
|
|
|
- this.rotateMix = rotateMix;
|
|
|
|
|
|
+ public void setMixY (float mixY) {
|
|
|
|
+ this.mixY = mixY;
|
|
}
|
|
}
|
|
|
|
|
|
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained translations. */
|
|
|
|
- public float getTranslateMix () {
|
|
|
|
- return translateMix;
|
|
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained scale X. */
|
|
|
|
+ public float getMixScaleX () {
|
|
|
|
+ return mixScaleX;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setTranslateMix (float translateMix) {
|
|
|
|
- this.translateMix = translateMix;
|
|
|
|
|
|
+ public void setMixScaleX (float mixScaleX) {
|
|
|
|
+ this.mixScaleX = mixScaleX;
|
|
}
|
|
}
|
|
|
|
|
|
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained scales. */
|
|
|
|
- public float getScaleMix () {
|
|
|
|
- return scaleMix;
|
|
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained scale X. */
|
|
|
|
+ public float getMixScaleY () {
|
|
|
|
+ return mixScaleY;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setScaleMix (float scaleMix) {
|
|
|
|
- this.scaleMix = scaleMix;
|
|
|
|
|
|
+ public void setMixScaleY (float mixScaleY) {
|
|
|
|
+ this.mixScaleY = mixScaleY;
|
|
}
|
|
}
|
|
|
|
|
|
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained scales. */
|
|
|
|
- public float getShearMix () {
|
|
|
|
- return shearMix;
|
|
|
|
|
|
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained shear Y. */
|
|
|
|
+ public float getMixShearY () {
|
|
|
|
+ return mixShearY;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setShearMix (float shearMix) {
|
|
|
|
- this.shearMix = shearMix;
|
|
|
|
|
|
+ public void setMixShearY (float mixShearY) {
|
|
|
|
+ this.mixShearY = mixShearY;
|
|
}
|
|
}
|
|
|
|
|
|
public boolean isActive () {
|
|
public boolean isActive () {
|