# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

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

    # IdPassGrayscale
    def AvatarId(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # IdPassGrayscale
    def SensorName(self):
        o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

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

def IdPassGrayscaleStart(builder): builder.StartObject(3)
def IdPassGrayscaleAddAvatarId(builder, avatarId): builder.PrependUOffsetTRelativeSlot(0, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(avatarId), 0)
def IdPassGrayscaleAddSensorName(builder, sensorName): builder.PrependUOffsetTRelativeSlot(1, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(sensorName), 0)
def IdPassGrayscaleAddGrayscale(builder, grayscale): builder.PrependFloat32Slot(2, grayscale, 0.0)
def IdPassGrayscaleEnd(builder): return builder.EndObject()
