# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Dim

import flatbuffers

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

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

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

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

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

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

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

    # Dim
    def RgbTripleArray(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            x = self._tab.Indirect(o + self._tab.Pos)
            from .RGBTripleArray import RGBTripleArray
            obj = RGBTripleArray()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

def DimStart(builder): builder.StartObject(5)
def DimAddUbyteArray(builder, ubyteArray): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(ubyteArray), 0)
def DimAddFloatArray(builder, floatArray): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(floatArray), 0)
def DimAddCoordinates2D(builder, coordinates2D): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(coordinates2D), 0)
def DimAddColorArray1D(builder, colorArray1D): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(colorArray1D), 0)
def DimAddRgbTripleArray(builder, rgbTripleArray): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(rgbTripleArray), 0)
def DimEnd(builder): return builder.EndObject()
