Refactor again
This commit is contained in:
parent
3d02766d41
commit
08b9afb6ca
@ -1,5 +1,6 @@
|
|||||||
package net.sf.openrocket.gui.rocketfigure;
|
package net.sf.openrocket.gui.rocketfigure;
|
||||||
|
|
||||||
|
import net.sf.openrocket.rocketcomponent.AxialStage;
|
||||||
import net.sf.openrocket.rocketcomponent.ParallelStage;
|
import net.sf.openrocket.rocketcomponent.ParallelStage;
|
||||||
import net.sf.openrocket.rocketcomponent.PodSet;
|
import net.sf.openrocket.rocketcomponent.PodSet;
|
||||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||||
@ -11,6 +12,11 @@ import java.awt.Shape;
|
|||||||
public class ComponentAssemblyShapes extends RocketComponentShape {
|
public class ComponentAssemblyShapes extends RocketComponentShape {
|
||||||
|
|
||||||
public static RocketComponentShape[] getShapesSide(final RocketComponent component, final Transformation transformation) {
|
public static RocketComponentShape[] getShapesSide(final RocketComponent component, final Transformation transformation) {
|
||||||
|
// Ignore normal stages
|
||||||
|
if (component instanceof AxialStage && !(component instanceof ParallelStage)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
double radius = getDisplayRadius(component);
|
double radius = getDisplayRadius(component);
|
||||||
|
|
||||||
Shape[] s = EmptyShapes.getShapesSideWithSelectionSquare(transformation, radius);
|
Shape[] s = EmptyShapes.getShapesSideWithSelectionSquare(transformation, radius);
|
||||||
@ -26,6 +32,10 @@ public class ComponentAssemblyShapes extends RocketComponentShape {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static RocketComponentShape[] getShapesBack(final RocketComponent component, final Transformation transformation) {
|
public static RocketComponentShape[] getShapesBack(final RocketComponent component, final Transformation transformation) {
|
||||||
|
// Ignore normal stages
|
||||||
|
if (component instanceof AxialStage && !(component instanceof ParallelStage)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
double radius = getDisplayRadius(component);
|
double radius = getDisplayRadius(component);
|
||||||
|
|
||||||
Shape[] s = EmptyShapes.getShapesBackWithSelectionSquare(transformation, radius);
|
Shape[] s = EmptyShapes.getShapesBackWithSelectionSquare(transformation, radius);
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
package net.sf.openrocket.gui.rocketfigure;
|
|
||||||
|
|
||||||
public class ParallelStageShapes extends ComponentAssemblyShapes {
|
|
||||||
// Everything is implemented in ComponentAssemblyShapes.java
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
package net.sf.openrocket.gui.rocketfigure;
|
|
||||||
|
|
||||||
public class PodSetShapes extends ComponentAssemblyShapes {
|
|
||||||
// Everything is implemented in ComponentAssemblyShapes.java
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user