# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

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

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

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

    # CylinderShape
    def Diameter(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

    # CylinderShape
    def Height(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

def CylinderShapeStart(builder): builder.StartObject(2)
def CylinderShapeAddDiameter(builder, diameter): builder.PrependFloat32Slot(0, diameter, 0.0)
def CylinderShapeAddHeight(builder, height): builder.PrependFloat32Slot(1, height, 0.0)
def CylinderShapeEnd(builder): return builder.EndObject()
