From 93633a27c39ec301396af00a21be38b81be151d0 Mon Sep 17 00:00:00 2001 From: Neil Balch Date: Thu, 13 May 2021 00:01:45 -0700 Subject: [PATCH] Fix #907 by re-adding ABSOLUTE axial offset --- .../rocketcomponent/position/AxialMethod.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/position/AxialMethod.java b/core/src/net/sf/openrocket/rocketcomponent/position/AxialMethod.java index 370dcb523..c90eecf4d 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/position/AxialMethod.java +++ b/core/src/net/sf/openrocket/rocketcomponent/position/AxialMethod.java @@ -3,7 +3,7 @@ package net.sf.openrocket.rocketcomponent.position; import net.sf.openrocket.startup.Application; public enum AxialMethod implements DistanceMethod { - // subject component is simply located absolutely, from the origin (tip-of-rocket) + // subject component is simply located absolutely, from the origin (tip-of-rocket) ABSOLUTE (Application.getTranslator().get("RocketComponent.Position.Method.Axial.ABSOLUTE")){ @Override public boolean clampToZero() { return false; } @@ -18,8 +18,8 @@ public enum AxialMethod implements DistanceMethod { return position; } }, - - // subject component will trail the target component, in the increasing coordinate direction + + // subject component will trail the target component, in the increasing coordinate direction AFTER (Application.getTranslator().get("RocketComponent.Position.Method.Axial.AFTER")){ @Override public boolean clampToZero() { return false; } @@ -51,7 +51,7 @@ public enum AxialMethod implements DistanceMethod { return position; } }, - + // This coordinate is measured from the middle of the parent component to the middle of this component MIDDLE (Application.getTranslator().get("RocketComponent.Position.Method.Axial.MIDDLE")) { @Override @@ -70,7 +70,7 @@ public enum AxialMethod implements DistanceMethod { return position + (innerLength - outerLength) / 2; } }, - + // This coordinate is measured from the bottom of the parent component to the bottom of this component BOTTOM (Application.getTranslator().get("RocketComponent.Position.Method.Axial.BOTTOM")){ @Override @@ -94,15 +94,15 @@ public enum AxialMethod implements DistanceMethod { // just as a reminder: // public T[] getEnumConstants() - - public static final AxialMethod[] axialOffsetMethods = { TOP, MIDDLE, BOTTOM }; - + + public static final AxialMethod[] axialOffsetMethods = { ABSOLUTE, TOP, MIDDLE, BOTTOM }; + public final String description; - + AxialMethod( final String newDescription ) { this.description=newDescription; } - + public abstract boolean clampToZero(); public abstract double getAsOffset(double position, double innerLength, double outerLength); @@ -113,5 +113,5 @@ public enum AxialMethod implements DistanceMethod { public String toString() { return description; } - + }