Skip to content

Commit

Permalink
6 comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Nov 19, 2024
1 parent ecf4d73 commit bd4f1cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/maud/model/EditableMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public String baseFilePathForWrite() {
*/
public void cardinalizeTwist() {
BoneMapping boneMapping = selectedMapping();
Quaternion twist = boneMapping.getTwist();
Quaternion twist = boneMapping.getTwist(); // alias
MyQuaternion.cardinalizeLocal(twist);

String targetBoneName = boneMapping.getTargetName();
Expand Down Expand Up @@ -257,7 +257,7 @@ public void renameBone(String oldName, String newName) {
*/
public void setTwist(Quaternion newTwist) {
BoneMapping boneMapping = selectedMapping();
Quaternion twist = boneMapping.getTwist();
Quaternion twist = boneMapping.getTwist(); // alias
if (isInvertingMap()) {
Quaternion tmp = newTwist.inverse();
twist.set(tmp);
Expand All @@ -278,7 +278,7 @@ public void snapTwist(int axisIndex) {
Validate.axisIndex(axisIndex, "axis index");

BoneMapping boneMapping = selectedMapping();
Quaternion twist = boneMapping.getTwist();
Quaternion twist = boneMapping.getTwist(); // alias
MyQuaternion.snapLocal(twist, axisIndex);

String targetBoneName = boneMapping.getTargetName();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/maud/model/LoadedMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public Transform boneTransform(int boneIndex, Transform storeResult) {
Pose targetPose = target.getPose().get();
Quaternion userRotation
= targetPose.userForModel(boneIndex, mo, null);
Quaternion twist = boneMapping.getTwist();
Quaternion twist = boneMapping.getTwist(); // alias
userRotation.mult(twist, result.getRotation());
}
}
Expand All @@ -136,7 +136,7 @@ public Quaternion copyTwist(Quaternion storeResult) {
= (storeResult == null) ? new Quaternion() : storeResult;

BoneMapping boneMapping = selectedMapping();
Quaternion twist = boneMapping.getTwist();
Quaternion twist = boneMapping.getTwist(); // alias
result.set(twist);
if (isInvertingMap()) {
result.inverseLocal();
Expand Down Expand Up @@ -639,7 +639,7 @@ private BoneMapping effectiveMapping(String targetBoneName) {
BoneMapping inverse = map.getForSource(targetBoneName);
if (inverse != null) {
String sourceBoneName = inverse.getTargetName();
Quaternion inverseTwist = inverse.getTwist();
Quaternion inverseTwist = inverse.getTwist(); // alias
Quaternion twist = inverseTwist.inverse();
result = new BoneMapping(targetBoneName, sourceBoneName, twist);
}
Expand Down

0 comments on commit bd4f1cf

Please sign in to comment.