# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

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

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

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

    # BoxShape
    def Length(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

    # BoxShape
    def Width(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

    # BoxShape
    def Height(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

def BoxShapeStart(builder): builder.StartObject(3)
def BoxShapeAddLength(builder, length): builder.PrependFloat32Slot(0, length, 0.0)
def BoxShapeAddWidth(builder, width): builder.PrependFloat32Slot(1, width, 0.0)
def BoxShapeAddHeight(builder, height): builder.PrependFloat32Slot(2, height, 0.0)
def BoxShapeEnd(builder): return builder.EndObject()
