Changed interpolate() to interpolateLocal() to match
the other method behavior where "local" stores it back to the same vector. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10794 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
@@ -342,8 +342,8 @@ public final class Bone implements Savable {
|
|||||||
} else {
|
} else {
|
||||||
float invWeightSum = 1f - currentWeightSum;
|
float invWeightSum = 1f - currentWeightSum;
|
||||||
localRot.nlerp(initialRot, invWeightSum);
|
localRot.nlerp(initialRot, invWeightSum);
|
||||||
localPos.interpolate(initialPos, invWeightSum);
|
localPos.interpolateLocal(initialPos, invWeightSum);
|
||||||
localScale.interpolate(initialScale, invWeightSum);
|
localScale.interpolateLocal(initialScale, invWeightSum);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future invocations of transform blend will start over.
|
// Future invocations of transform blend will start over.
|
||||||
@@ -598,14 +598,14 @@ public final class Bone implements Savable {
|
|||||||
Quaternion tmpQ = vars.quat1;
|
Quaternion tmpQ = vars.quat1;
|
||||||
|
|
||||||
tmpV.set(initialPos).addLocal(translation);
|
tmpV.set(initialPos).addLocal(translation);
|
||||||
localPos.interpolate(tmpV, weight);
|
localPos.interpolateLocal(tmpV, weight);
|
||||||
|
|
||||||
tmpQ.set(initialRot).multLocal(rotation);
|
tmpQ.set(initialRot).multLocal(rotation);
|
||||||
localRot.nlerp(tmpQ, weight);
|
localRot.nlerp(tmpQ, weight);
|
||||||
|
|
||||||
if (scale != null) {
|
if (scale != null) {
|
||||||
tmpV2.set(initialScale).multLocal(scale);
|
tmpV2.set(initialScale).multLocal(scale);
|
||||||
localScale.interpolate(tmpV2, weight);
|
localScale.interpolateLocal(tmpV2, weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensures no new weights will be blended in the future.
|
// Ensures no new weights will be blended in the future.
|
||||||
|
|||||||
@@ -239,8 +239,8 @@ public final class BoneTrack implements Track {
|
|||||||
scales.get(endFrame, tempS2);
|
scales.get(endFrame, tempS2);
|
||||||
}
|
}
|
||||||
tempQ.nlerp(tempQ2, blend);
|
tempQ.nlerp(tempQ2, blend);
|
||||||
tempV.interpolate(tempV2, blend);
|
tempV.interpolateLocal(tempV2, blend);
|
||||||
tempS.interpolate(tempS2, blend);
|
tempS.interpolateLocal(tempS2, blend);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (weight != 1f) {
|
// if (weight != 1f) {
|
||||||
|
|||||||
@@ -149,8 +149,8 @@ public class SpatialTrack implements Track {
|
|||||||
scales.get(endFrame, tempS2);
|
scales.get(endFrame, tempS2);
|
||||||
}
|
}
|
||||||
tempQ.nlerp(tempQ2, blend);
|
tempQ.nlerp(tempQ2, blend);
|
||||||
tempV.interpolate(tempV2, blend);
|
tempV.interpolateLocal(tempV2, blend);
|
||||||
tempS.interpolate(tempS2, blend);
|
tempS.interpolateLocal(tempS2, blend);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (translations != null)
|
if (translations != null)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class DefaultParticleInfluencer implements ParticleInfluencer {
|
|||||||
temp.multLocal(2f);
|
temp.multLocal(2f);
|
||||||
temp.subtractLocal(1f, 1f, 1f);
|
temp.subtractLocal(1f, 1f, 1f);
|
||||||
temp.multLocal(initialVelocity.length());
|
temp.multLocal(initialVelocity.length());
|
||||||
particle.velocity.interpolate(temp, velocityVariation);
|
particle.velocity.interpolateLocal(temp, velocityVariation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class RadialParticleInfluencer extends DefaultParticleInfluencer {
|
|||||||
temp.multLocal(2f);
|
temp.multLocal(2f);
|
||||||
temp.subtractLocal(1f, 1f, 1f);
|
temp.subtractLocal(1f, 1f, 1f);
|
||||||
temp.multLocal(initialVelocity.length());
|
temp.multLocal(initialVelocity.length());
|
||||||
particle.velocity.interpolate(temp, velocityVariation);
|
particle.velocity.interpolateLocal(temp, velocityVariation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -854,7 +854,7 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable
|
|||||||
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
|
||||||
* change from this towards finalVec
|
* change from this towards finalVec
|
||||||
*/
|
*/
|
||||||
public Vector3f interpolate(Vector3f finalVec, float changeAmnt) {
|
public Vector3f interpolateLocal(Vector3f finalVec, float changeAmnt) {
|
||||||
this.x=(1-changeAmnt)*this.x + changeAmnt*finalVec.x;
|
this.x=(1-changeAmnt)*this.x + changeAmnt*finalVec.x;
|
||||||
this.y=(1-changeAmnt)*this.y + changeAmnt*finalVec.y;
|
this.y=(1-changeAmnt)*this.y + changeAmnt*finalVec.y;
|
||||||
this.z=(1-changeAmnt)*this.z + changeAmnt*finalVec.z;
|
this.z=(1-changeAmnt)*this.z + changeAmnt*finalVec.z;
|
||||||
|
|||||||
Reference in New Issue
Block a user