1 package net.sf.openrocket.rocketcomponent;
3 import java.util.Collection;
4 import java.util.Collections;
6 import net.sf.openrocket.util.Coordinate;
11 * A base of component assemblies.
13 * Note that the mass and CG overrides of the <code>ComponentAssembly</code> class
14 * overrides all sibling mass/CG as well as its own.
16 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
18 public abstract class ComponentAssembly extends RocketComponent {
21 * Sets the position of the components to POSITION_RELATIVE_AFTER.
22 * (Should have no effect.)
24 public ComponentAssembly() {
25 super(RocketComponent.Position.AFTER);
29 * Null method (ComponentAssembly has no bounds of itself).
32 public Collection<Coordinate> getComponentBounds() {
33 return Collections.emptyList();
37 * Null method (ComponentAssembly has no mass of itself).
40 public Coordinate getComponentCG() {
41 return Coordinate.NUL;
45 * Null method (ComponentAssembly has no mass of itself).
48 public double getComponentMass() {
53 * Null method (ComponentAssembly has no mass of itself).
56 public double getLongitudinalUnitInertia() {
61 * Null method (ComponentAssembly has no mass of itself).
64 public double getRotationalUnitInertia() {
69 * Components have no aerodynamic effect, so return false.
72 public boolean isAerodynamic() {
77 * Component have no effect on mass, so return false (even though the override values
78 * may have an effect).
81 public boolean isMassive() {
86 public boolean getOverrideSubcomponents() {
91 public void setOverrideSubcomponents(boolean override) {
96 public boolean isOverrideSubcomponentsEnabled() {