# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

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

    # ObiActorData
    def Id(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # ObiActorData
    def SolverId(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # ObiActorData
    def Count(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # ObiActorData
    def SolverIndices(self, j):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        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

    # ObiActorData
    def SolverIndicesAsNumpy(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.GetVectorAsNumpy(tdw.flatbuffers.number_types.Int32Flags, o)
        return 0

    # ObiActorData
    def SolverIndicesLength(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def ObiActorDataStart(builder): builder.StartObject(4)
def ObiActorDataAddId(builder, id): builder.PrependInt32Slot(0, id, 0)
def ObiActorDataAddSolverId(builder, solverId): builder.PrependInt32Slot(1, solverId, 0)
def ObiActorDataAddCount(builder, count): builder.PrependInt32Slot(2, count, 0)
def ObiActorDataAddSolverIndices(builder, solverIndices): builder.PrependUOffsetTRelativeSlot(3, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(solverIndices), 0)
def ObiActorDataStartSolverIndicesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def ObiActorDataEnd(builder): return builder.EndObject()
