[rename] renamed count -> instanceCount to be more descriptive
This commit is contained in:
parent
e5f40c375d
commit
8e8ba9324f
@ -14,7 +14,7 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
|
|||||||
private static final Translator trans = Application.getTranslator();
|
private static final Translator trans = Application.getTranslator();
|
||||||
//private static final Logger log = LoggerFactory.getLogger(BoosterSet.class);
|
//private static final Logger log = LoggerFactory.getLogger(BoosterSet.class);
|
||||||
|
|
||||||
protected int count = 1;
|
protected int instanceCount = 1;
|
||||||
|
|
||||||
protected double angularSeparation = Math.PI;
|
protected double angularSeparation = Math.PI;
|
||||||
protected double angularPosition_rad = 0;
|
protected double angularPosition_rad = 0;
|
||||||
@ -22,16 +22,16 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
|
|||||||
protected double radialPosition_m = 0;
|
protected double radialPosition_m = 0;
|
||||||
|
|
||||||
public ParallelStage() {
|
public ParallelStage() {
|
||||||
this.count = 2;
|
this.instanceCount = 2;
|
||||||
this.relativePosition = Position.BOTTOM;
|
this.relativePosition = Position.BOTTOM;
|
||||||
this.angularSeparation = Math.PI * 2 / this.count;
|
this.angularSeparation = Math.PI * 2 / this.instanceCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParallelStage( final int _count ){
|
public ParallelStage( final int _count ){
|
||||||
this();
|
this();
|
||||||
|
|
||||||
this.count = _count;
|
this.instanceCount = _count;
|
||||||
this.angularSeparation = Math.PI * 2 / this.count;
|
this.angularSeparation = Math.PI * 2 / this.instanceCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,7 +98,7 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInstanceCount() {
|
public int getInstanceCount() {
|
||||||
return this.count;
|
return this.instanceCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -119,8 +119,8 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.count = newCount;
|
this.instanceCount = newCount;
|
||||||
this.angularSeparation = Math.PI * 2 / this.count;
|
this.angularSeparation = Math.PI * 2 / this.instanceCount;
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,8 +139,8 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
|
|||||||
Coordinate center = Coordinate.ZERO;
|
Coordinate center = Coordinate.ZERO;
|
||||||
|
|
||||||
double curAngle = startAngle;
|
double curAngle = startAngle;
|
||||||
Coordinate[] toReturn = new Coordinate[this.count];
|
Coordinate[] toReturn = new Coordinate[this.instanceCount];
|
||||||
for (int instanceNumber = 0; instanceNumber < this.count; instanceNumber++) {
|
for (int instanceNumber = 0; instanceNumber < this.instanceCount; instanceNumber++) {
|
||||||
final double curY = radius * Math.cos(curAngle);
|
final double curY = radius * Math.cos(curAngle);
|
||||||
final double curZ = radius * Math.sin(curAngle);
|
final double curZ = radius * Math.sin(curAngle);
|
||||||
toReturn[instanceNumber] = center.add(0, curY, curZ );
|
toReturn[instanceNumber] = center.add(0, curY, curZ );
|
||||||
|
@ -13,7 +13,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
|
|||||||
private static final Translator trans = Application.getTranslator();
|
private static final Translator trans = Application.getTranslator();
|
||||||
//private static final Logger log = LoggerFactory.getLogger(PodSet.class);
|
//private static final Logger log = LoggerFactory.getLogger(PodSet.class);
|
||||||
|
|
||||||
protected int count = 1;
|
protected int instanceCount = 2;
|
||||||
|
|
||||||
protected double angularSeparation = Math.PI;
|
protected double angularSeparation = Math.PI;
|
||||||
protected double angularPosition_rad = 0;
|
protected double angularPosition_rad = 0;
|
||||||
@ -21,7 +21,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
|
|||||||
protected double radialPosition_m = 0;
|
protected double radialPosition_m = 0;
|
||||||
|
|
||||||
public PodSet() {
|
public PodSet() {
|
||||||
this.count = 2;
|
this.instanceCount = 2;
|
||||||
this.relativePosition = Position.BOTTOM;
|
this.relativePosition = Position.BOTTOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +87,8 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
|
|||||||
Coordinate center = Coordinate.ZERO;
|
Coordinate center = Coordinate.ZERO;
|
||||||
|
|
||||||
double curAngle = startAngle;
|
double curAngle = startAngle;
|
||||||
Coordinate[] toReturn = new Coordinate[this.count];
|
Coordinate[] toReturn = new Coordinate[this.instanceCount];
|
||||||
for (int instanceNumber = 0; instanceNumber < this.count; instanceNumber++) {
|
for (int instanceNumber = 0; instanceNumber < this.instanceCount; instanceNumber++) {
|
||||||
final double curY = radius * Math.cos(curAngle);
|
final double curY = radius * Math.cos(curAngle);
|
||||||
final double curZ = radius * Math.sin(curAngle);
|
final double curZ = radius * Math.sin(curAngle);
|
||||||
toReturn[instanceNumber] = center.add(0, curY, curZ );
|
toReturn[instanceNumber] = center.add(0, curY, curZ );
|
||||||
@ -193,7 +193,7 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInstanceCount() {
|
public int getInstanceCount() {
|
||||||
return this.count;
|
return this.instanceCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -205,8 +205,8 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.count = newCount;
|
this.instanceCount = newCount;
|
||||||
this.angularSeparation = Math.PI * 2 / this.count;
|
this.angularSeparation = Math.PI * 2 / this.instanceCount;
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user