# automatically generated by the FlatBuffers compiler, do not modify

# namespace: isp

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class WheelPhysics(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAs(cls, buf, offset=0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = WheelPhysics()
        x.Init(buf, n + offset)
        return x

    @classmethod
    def GetRootAsWheelPhysics(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    @classmethod
    def WheelPhysicsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
        return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x49\x53\x50\x46", size_prefixed=size_prefixed)

    # WheelPhysics
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # WheelPhysics
    def TireFriction(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 2.0

    # WheelPhysics
    def DampingRate(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 1.5

    # WheelPhysics
    def MaxSteerAngle(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 70.0

    # WheelPhysics
    def Radius(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # WheelPhysics
    def MaxBrakeTorque(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # WheelPhysics
    def MaxHandbrakeTorque(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # WheelPhysics
    def LongStiffValue(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 1000.0

    # WheelPhysics
    def LatStiffMaxLoad(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # WheelPhysics
    def LatStiffValue(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

def WheelPhysicsStart(builder): builder.StartObject(9)
def Start(builder):
    return WheelPhysicsStart(builder)
def WheelPhysicsAddTireFriction(builder, tireFriction): builder.PrependFloat64Slot(0, tireFriction, 2.0)
def AddTireFriction(builder, tireFriction):
    return WheelPhysicsAddTireFriction(builder, tireFriction)
def WheelPhysicsAddDampingRate(builder, dampingRate): builder.PrependFloat64Slot(1, dampingRate, 1.5)
def AddDampingRate(builder, dampingRate):
    return WheelPhysicsAddDampingRate(builder, dampingRate)
def WheelPhysicsAddMaxSteerAngle(builder, maxSteerAngle): builder.PrependFloat64Slot(2, maxSteerAngle, 70.0)
def AddMaxSteerAngle(builder, maxSteerAngle):
    return WheelPhysicsAddMaxSteerAngle(builder, maxSteerAngle)
def WheelPhysicsAddRadius(builder, radius): builder.PrependFloat64Slot(3, radius, 0.0)
def AddRadius(builder, radius):
    return WheelPhysicsAddRadius(builder, radius)
def WheelPhysicsAddMaxBrakeTorque(builder, maxBrakeTorque): builder.PrependFloat64Slot(4, maxBrakeTorque, 0.0)
def AddMaxBrakeTorque(builder, maxBrakeTorque):
    return WheelPhysicsAddMaxBrakeTorque(builder, maxBrakeTorque)
def WheelPhysicsAddMaxHandbrakeTorque(builder, maxHandbrakeTorque): builder.PrependFloat64Slot(5, maxHandbrakeTorque, 0.0)
def AddMaxHandbrakeTorque(builder, maxHandbrakeTorque):
    return WheelPhysicsAddMaxHandbrakeTorque(builder, maxHandbrakeTorque)
def WheelPhysicsAddLongStiffValue(builder, longStiffValue): builder.PrependFloat64Slot(6, longStiffValue, 1000.0)
def AddLongStiffValue(builder, longStiffValue):
    return WheelPhysicsAddLongStiffValue(builder, longStiffValue)
def WheelPhysicsAddLatStiffMaxLoad(builder, latStiffMaxLoad): builder.PrependFloat64Slot(7, latStiffMaxLoad, 0.0)
def AddLatStiffMaxLoad(builder, latStiffMaxLoad):
    return WheelPhysicsAddLatStiffMaxLoad(builder, latStiffMaxLoad)
def WheelPhysicsAddLatStiffValue(builder, latStiffValue): builder.PrependFloat64Slot(8, latStiffValue, 0.0)
def AddLatStiffValue(builder, latStiffValue):
    return WheelPhysicsAddLatStiffValue(builder, latStiffValue)
def WheelPhysicsEnd(builder): return builder.EndObject()
def End(builder):
    return WheelPhysicsEnd(builder)