Merge pull request #749 from teyrana/fix/741-render-rail-button
Fix/741 render rail button
This commit is contained in:
commit
08f49d6a04
@ -295,19 +295,14 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
|
|
||||||
// generate the Instance's Context:
|
// generate the Instance's Context:
|
||||||
for(int currentInstanceNumber=0; currentInstanceNumber < instanceCount; currentInstanceNumber++) {
|
for(int currentInstanceNumber=0; currentInstanceNumber < instanceCount; currentInstanceNumber++) {
|
||||||
|
final Transformation offsetTransform = Transformation.getTranslationTransform( allOffsets[currentInstanceNumber] );
|
||||||
final Coordinate instanceOffset = allOffsets[currentInstanceNumber];
|
final Transformation angleTransform = Transformation.getAxialRotation(allAngles[currentInstanceNumber]);
|
||||||
final Transformation offsetTransform = Transformation.getTranslationTransform( instanceOffset );
|
|
||||||
|
|
||||||
final double instanceAngle = allAngles[currentInstanceNumber];
|
|
||||||
final Transformation angleTransform = Transformation.getAxialRotation(instanceAngle);
|
|
||||||
|
|
||||||
final Transformation currentTransform = componentTransform.applyTransformation(offsetTransform)
|
final Transformation currentTransform = componentTransform.applyTransformation(offsetTransform)
|
||||||
.applyTransformation(angleTransform);
|
.applyTransformation(angleTransform);
|
||||||
|
|
||||||
// constructs entry in-place
|
// constructs entry in-place
|
||||||
results.emplace(component, active, currentInstanceNumber, currentTransform);
|
results.emplace(component, active, currentInstanceNumber, currentTransform);
|
||||||
|
|
||||||
for(RocketComponent child : component.getChildren()) {
|
for(RocketComponent child : component.getChildren()) {
|
||||||
getContextListAt(child, results, currentTransform);
|
getContextListAt(child, results, currentTransform);
|
||||||
}
|
}
|
||||||
|
@ -237,8 +237,10 @@ public class RailButton extends ExternalComponent implements AnglePositionable,
|
|||||||
double parentRadius=0;
|
double parentRadius=0;
|
||||||
|
|
||||||
for (body = this.getParent(); body != null; body = body.getParent()) {
|
for (body = this.getParent(); body != null; body = body.getParent()) {
|
||||||
if (body instanceof BodyTube)
|
if (body instanceof BodyTube) {
|
||||||
parentRadius = ((BodyTube) body).getOuterRadius();
|
parentRadius = ((BodyTube) body).getOuterRadius();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.radialDistance_m = parentRadius;
|
this.radialDistance_m = parentRadius;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user