# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

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

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

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

    # RotatorPartial
    def Pitch(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = o + self._tab.Pos
            from .Float import Float
            obj = Float()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # RotatorPartial
    def Yaw(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            x = o + self._tab.Pos
            from .Float import Float
            obj = Float()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # RotatorPartial
    def Roll(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            x = o + self._tab.Pos
            from .Float import Float
            obj = Float()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

def RotatorPartialStart(builder): builder.StartObject(3)
def RotatorPartialAddPitch(builder, pitch): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pitch), 0)
def RotatorPartialAddYaw(builder, yaw): builder.PrependStructSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(yaw), 0)
def RotatorPartialAddRoll(builder, roll): builder.PrependStructSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(roll), 0)
def RotatorPartialEnd(builder): return builder.EndObject()
