# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

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

    # AvatarStickyMitten
    def Id(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

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

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

    # AvatarStickyMitten
    def Forward(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            x = o + self._tab.Pos
            from .Vector3 import Vector3
            obj = Vector3()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def Velocity(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            x = o + self._tab.Pos
            from .Vector3 import Vector3
            obj = Vector3()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def AngularVelocity(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            x = o + self._tab.Pos
            from .Vector3 import Vector3
            obj = Vector3()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def Mass(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

    # AvatarStickyMitten
    def Sleeping(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return bool(self._tab.Get(tdw.flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

    # AvatarStickyMitten
    def RigidbodyParts(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            x = self._tab.Vector(o)
            x += tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j) * 36
            from .RigidbodyData import RigidbodyData
            obj = RigidbodyData()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def RigidbodyPartsLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # AvatarStickyMitten
    def BodyParts(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            x = self._tab.Vector(o)
            x += tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j) * 44
            from .TransformData import TransformData
            obj = TransformData()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def BodyPartsLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # AvatarStickyMitten
    def MittenCenterLeft(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
        if o != 0:
            x = o + self._tab.Pos
            from .SimpleTransform import SimpleTransform
            obj = SimpleTransform()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def MittenCenterRight(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
        if o != 0:
            x = o + self._tab.Pos
            from .SimpleTransform import SimpleTransform
            obj = SimpleTransform()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # AvatarStickyMitten
    def HeldLeft(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, a + tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # AvatarStickyMitten
    def HeldLeftAsNumpy(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
        if o != 0:
            return self._tab.GetVectorAsNumpy(tdw.flatbuffers.number_types.Int32Flags, o)
        return 0

    # AvatarStickyMitten
    def HeldLeftLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # AvatarStickyMitten
    def HeldRight(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, a + tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # AvatarStickyMitten
    def HeldRightAsNumpy(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
        if o != 0:
            return self._tab.GetVectorAsNumpy(tdw.flatbuffers.number_types.Int32Flags, o)
        return 0

    # AvatarStickyMitten
    def HeldRightLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # AvatarStickyMitten
    def AnglesLeft(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, a + tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # AvatarStickyMitten
    def AnglesLeftAsNumpy(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
        if o != 0:
            return self._tab.GetVectorAsNumpy(tdw.flatbuffers.number_types.Float32Flags, o)
        return 0

    # AvatarStickyMitten
    def AnglesLeftLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # AvatarStickyMitten
    def AnglesRight(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, a + tdw.flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # AvatarStickyMitten
    def AnglesRightAsNumpy(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34))
        if o != 0:
            return self._tab.GetVectorAsNumpy(tdw.flatbuffers.number_types.Float32Flags, o)
        return 0

    # AvatarStickyMitten
    def AnglesRightLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def AvatarStickyMittenStart(builder): builder.StartObject(16)
def AvatarStickyMittenAddId(builder, id): builder.PrependUOffsetTRelativeSlot(0, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(id), 0)
def AvatarStickyMittenAddPosition(builder, position): builder.PrependStructSlot(1, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(position), 0)
def AvatarStickyMittenAddRotation(builder, rotation): builder.PrependStructSlot(2, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(rotation), 0)
def AvatarStickyMittenAddForward(builder, forward): builder.PrependStructSlot(3, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(forward), 0)
def AvatarStickyMittenAddVelocity(builder, velocity): builder.PrependStructSlot(4, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(velocity), 0)
def AvatarStickyMittenAddAngularVelocity(builder, angularVelocity): builder.PrependStructSlot(5, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(angularVelocity), 0)
def AvatarStickyMittenAddMass(builder, mass): builder.PrependFloat32Slot(6, mass, 0.0)
def AvatarStickyMittenAddSleeping(builder, sleeping): builder.PrependBoolSlot(7, sleeping, 0)
def AvatarStickyMittenAddRigidbodyParts(builder, rigidbodyParts): builder.PrependUOffsetTRelativeSlot(8, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(rigidbodyParts), 0)
def AvatarStickyMittenStartRigidbodyPartsVector(builder, numElems): return builder.StartVector(36, numElems, 4)
def AvatarStickyMittenAddBodyParts(builder, bodyParts): builder.PrependUOffsetTRelativeSlot(9, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(bodyParts), 0)
def AvatarStickyMittenStartBodyPartsVector(builder, numElems): return builder.StartVector(44, numElems, 4)
def AvatarStickyMittenAddMittenCenterLeft(builder, mittenCenterLeft): builder.PrependStructSlot(10, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(mittenCenterLeft), 0)
def AvatarStickyMittenAddMittenCenterRight(builder, mittenCenterRight): builder.PrependStructSlot(11, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(mittenCenterRight), 0)
def AvatarStickyMittenAddHeldLeft(builder, heldLeft): builder.PrependUOffsetTRelativeSlot(12, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(heldLeft), 0)
def AvatarStickyMittenStartHeldLeftVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def AvatarStickyMittenAddHeldRight(builder, heldRight): builder.PrependUOffsetTRelativeSlot(13, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(heldRight), 0)
def AvatarStickyMittenStartHeldRightVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def AvatarStickyMittenAddAnglesLeft(builder, anglesLeft): builder.PrependUOffsetTRelativeSlot(14, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(anglesLeft), 0)
def AvatarStickyMittenStartAnglesLeftVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def AvatarStickyMittenAddAnglesRight(builder, anglesRight): builder.PrependUOffsetTRelativeSlot(15, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(anglesRight), 0)
def AvatarStickyMittenStartAnglesRightVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def AvatarStickyMittenEnd(builder): return builder.EndObject()
