# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

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

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

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

def IsOnNavMeshStart(builder): builder.StartObject(2)
def IsOnNavMeshAddPosition(builder, position): builder.PrependStructSlot(0, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(position), 0)
def IsOnNavMeshAddIsOn(builder, isOn): builder.PrependBoolSlot(1, isOn, 0)
def IsOnNavMeshEnd(builder): return builder.EndObject()
