def readSwingingSettings(xmlCtx, section, cache): return shared_components.SwingingSettings( readLodDist(xmlCtx, section, 'swinging/lodDist', cache), _xml.readNonNegativeFloat(xmlCtx, section, 'swinging/sensitivityToImpulse'), _xml.readTupleOfFloats(xmlCtx, section, 'swinging/pitchParams', 6), _xml.readTupleOfFloats(xmlCtx, section, 'swinging/rollParams', 7))
def readSwingingSettings(xmlCtx, section, cache): """Reads section 'swinging' for each hull. :param xmlCtx: tuple(root ctx or None, path to section). :param section: instance of DataSection. :param cache: instance of vehicles.Cache. :return: instance of SwingingSettings. """ return shared_components.SwingingSettings(readLodDist(xmlCtx, section, 'swinging/lodDist', cache), _xml.readNonNegativeFloat(xmlCtx, section, 'swinging/sensitivityToImpulse'), _xml.readTupleOfFloats(xmlCtx, section, 'swinging/pitchParams', 6), _xml.readTupleOfFloats(xmlCtx, section, 'swinging/rollParams', 7))