Merge pull request #832 from wolsen/bug/785

Fix offset locations of mass components
This commit is contained in:
Joe Pfeiffer 2020-12-03 11:28:53 -07:00 committed by GitHub
commit bd251831f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}