// Main Constructor using Vector paramaters public InterstellaObjectParams ( Vector position, Vector velocity, Vector acceleration, InterstellaObjectType type, double mass = double.NaN, double radius = double.NaN ) { // If mass or density are not supplied get their default values from Defaults if (double.IsNaN(mass)) { mass = (double)InterstellaObjectTypeDefaults.getDefaults(type)["mass"]; } if (double.IsNaN(radius)) { radius = (double)InterstellaObjectTypeDefaults.getDefaults(type)["radius"]; } Position = position; Velocity = velocity; Acceleration = acceleration; Mass = mass; Radius = radius; Type = type; }
public InterstellaObjectParams() { Position = new Vector(0, 0); Velocity = new Vector(0, 0); Acceleration = new Vector(0, 0); Mass = (double)InterstellaObjectTypeDefaults.getDefaults(InterstellaObjectType.Star)["mass"]; Radius = (double)InterstellaObjectTypeDefaults.getDefaults(InterstellaObjectType.Star)["radius"]; Type = InterstellaObjectType.Star; }