public Rocket(RocketConfiguration config, List <Surface> surfaces) : this(config) { this.Surfaces = surfaces; foreach (Surface surface in this.Surfaces) { if (surface.IsExterior) { ExteriorSurfaces.Add(surface); } } GetDragCoefficients(); }
public Rocket RocketFromSTL() { if (!IsValid) { throw new InvalidOperationException("Cannot make rocket from invalid STL file. Check file validity and try again."); } // Set configuration RocketConfiguration config = new RocketConfiguration() { CenterOfMass = new Vector3D <float>(), CenterOfPressure = new Vector3D <float>(), CenterOfThrust = new Vector3D <float>(), }; // Set surfaces return(new Rocket(config, STL.Surfaces)); }
public void setRocketConfiguration(RocketConfiguration config) { currentRocketConfiguration = config; stages.Clear(); for (int stage = 0; stage < config.numStages; stage++) { stages.Add(new Stage( 0, "", "", null, null, config.fuelCapacities[stage], config.burnRates[stage], config.fuelCapacities[stage], config.weights[stage], 0, 0)); } if (currentFuelTank != null) { setFuelTank(currentFuelTank); } if (currentFuelType != null) { setFuelType(currentFuelType); } }
public void Setup(Item item, int itemType, FuelType fuel = null, FuelTank tank = null, RocketConfiguration config = null) { this.currentItem = item; this.itemType = itemType; switch (this.itemType) { case 0: this.currentType = fuel; break; case 1: this.currentTank = tank; break; case 2: this.currentConfig = config; break; default: break; } }
public Rocket(RocketConfiguration config) { this.Config = config; this.Surfaces = new List <Surface>(); this.ExteriorSurfaces = new List <Surface>(); }