# automatically generated by the FlatBuffers compiler, do not modify

# namespace: core

import flatbuffers

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

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

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

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

def PointStart(builder): builder.StartObject(1)
def PointAddPos(builder, pos): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0)
def PointEnd(builder): return builder.EndObject()
