Пример #1
0
        public void CreateGeometry(MapObject parent, FlightModel flightModel)
        {
            MapObjectAttachedMesh obj = new MapObjectAttachedMesh();
            obj.MeshName = "Models\\DefaultBox\\DefaultBox.mesh";
            float mScale = .2f;
            obj.ScaleOffset = new Vec3(span * mScale, chord * mScale, .1f * mScale) * flightModel.scale;

            obj.RotationOffset =
                Mat3.FromRotateByY(MathFunctions.DegToRad(-rotation)).ToQuat() *
                Mat3.FromRotateByX(MathFunctions.DegToRad(+inc)).ToQuat();
            obj.PositionOffset = (position + Vec3.YAxis * flightModel.param.geometry_offset_for_wheels) * flightModel.scale;

            parent.Attach(obj);
        }