Fix offset locations of mass components

2D side view renderings of mass components within body tubes
were adjusted forward based off the radius of the object. This
change corrects the X position adjustement and makes it consistent
with 15.03 and 3D renderings.

Closes #785
Closes #828

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
This commit is contained in:
Billy Olsen 2020-12-02 19:38:44 -07:00
parent 123aa2d296
commit 628a593550
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ public class MassComponentShapes extends RocketComponentShape {
radialDistance * Math.sin(radialAngleRadians));
final Coordinate renderPosition = transformation.transform(localPosition);
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x - radius, renderPosition.y - radius, length, 2*radius, arc, arc)};
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x, renderPosition.y - radius, length, 2*radius, arc, arc)};
final MassComponent.MassComponentType type = ((MassComponent)component).getMassComponentType();
switch (type) {

View File

@ -29,7 +29,7 @@ public class ParachuteShapes extends RocketComponentShape {
radialDistance * Math.sin(radialAngleRadians));
final Coordinate renderPosition = transformation.transform(localPosition);
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x - radius, renderPosition.y - radius, length, 2*radius, arc, arc)};
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x, renderPosition.y - radius, length, 2*radius, arc, arc)};
return RocketComponentShape.toArray( addSymbol(s), component);
}

View File

@ -28,7 +28,7 @@ public class StreamerShapes extends RocketComponentShape {
radialDistance * Math.sin(radialAngleRadians));
final Coordinate renderPosition = transformation.transform(localPosition);
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x - radius, renderPosition.y - radius, length, 2*radius, arc, arc)};
Shape[] s = {new RoundRectangle2D.Double(renderPosition.x, renderPosition.y - radius, length, 2*radius, arc, arc)};
return RocketComponentShape.toArray(addSymbol(s), component);
}