private void ReadPlaneGeneral(PlaneGeneral pg, bool flagMessage) { pg.name = ReadString(" name ", flagMessage); pg.maker = ReadString(" maker ", flagMessage); pg.length = ReadDblValue("length", flagMessage); pg.width = ReadDblValue("width", flagMessage); pg.height = ReadDblValue("height", flagMessage); pg.x_offset = ReadDblValue("x_offset", flagMessage); pg.m = ReadDblValue("m", flagMessage); pg.m0 = ReadDblValue("m0", flagMessage); pg.cg = ReadVector("C.G.", flagMessage); pg.ixx_m0 = ReadDblValue("Ixx/m0", flagMessage); pg.iyy_m0 = ReadDblValue("Iyy/m0", flagMessage); pg.izz_m0 = ReadDblValue("Izz/m0", flagMessage); pg.ixy_m0 = ReadDblValue("Ixy/m0", flagMessage); pg.iyz_m0 = ReadDblValue("Iyz/m0", flagMessage); pg.izx_m0 = ReadDblValue("Izx/m0", flagMessage); pg.eyePoint = ReadVector("eye_point", flagMessage); int n = ReadIntValue("reference_point", flagMessage); pg.reference_point = new Vector3D[n]; for (int i = 0; i < n; i++) { pg.reference_point[i] = ReadVector(); ReadLine(); } pg.Init(); }
public AirPlane(String path) { plane = new PlaneGeneral(); n_fuselage = 0; fuslage = new Fuselage[7, 2]; n_wing = 0; wing = new Wing[1]; n_htail = 0; htail = new Wing[1]; n_vtail = 0; vtail = new Wing[1]; n_canard = 0; canard = new Wing[1]; n_fin = 0; fin = new Wing[5]; n_aileron = 0; aileron = new ControlPlane[1, 2]; n_elevator = 0; elevator = new ControlPlane[1, 2]; n_rudder = 0; rudder = new ControlPlane[1, 2]; n_l_flap = 0; l_flap = new ControlPlane[1, 2]; n_t_flap = 0; t_flap = new ControlPlane[1, 2]; n_canard_elevator = 0; canard_elevator = new ControlPlane[1, 2]; n_powerPlant = 0; powerPlant = new PowerPlant[4]; n_LandingGear = 0; landing_gear = new LandingGear[3, 2]; airbrake = new AirBrake(); interference = new Interference(); pilot = new Pilot(); force = new Vector3D(); torque = new Vector3D(); a_force = new Vector3D(); a_torque = new Vector3D(); f_force = new Vector3D(); f_torque = new Vector3D(); n_force = new Vector3D(); n_torque = new Vector3D(); t_force = new Vector3D(); t_torque = new Vector3D(); flag_landing_gear = 1; flag_land = 1; crash_point = -1; MakeObject(); AirPlaneFile apsf = new AirPlaneFile(this, path); Init(); }