# automatically generated by the FlatBuffers compiler, do not modify

# namespace: API

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

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

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

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

    # RenderingCfg
    def Rendered(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

    # RenderingCfg
    def Logscale(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

    # RenderingCfg
    def Min(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

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

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

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

    # RenderingCfg
    def Color(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            x = o + self._tab.Pos
            from SEAScope.API.Color import Color
            obj = Color()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # RenderingCfg
    def Colormap(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
        if o != 0:
            return self._tab.String(o + self._tab.Pos)
        return None

    # RenderingCfg
    def RenderMethod(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

    # RenderingCfg
    def ParticlesCount(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

    # RenderingCfg
    def ParticleTTL(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

    # RenderingCfg
    def StreamlineLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

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

    # RenderingCfg
    def Target(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30))
        if o != 0:
            x = o + self._tab.Pos
            from SEAScope.API.RenderableId import RenderableId
            obj = RenderableId()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # RenderingCfg
    def FilterMode(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
        return 0

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

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

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

def RenderingCfgStart(builder): builder.StartObject(18)
def RenderingCfgAddRendered(builder, rendered): builder.PrependBoolSlot(0, rendered, 0)
def RenderingCfgAddLogscale(builder, logscale): builder.PrependBoolSlot(1, logscale, 0)
def RenderingCfgAddMin(builder, min): builder.PrependFloat32Slot(2, min, 0.0)
def RenderingCfgAddMax(builder, max): builder.PrependFloat32Slot(3, max, 0.0)
def RenderingCfgAddOpacity(builder, opacity): builder.PrependFloat32Slot(4, opacity, 0.0)
def RenderingCfgAddZindex(builder, zindex): builder.PrependFloat32Slot(5, zindex, 0.0)
def RenderingCfgAddColor(builder, color): builder.PrependStructSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(color), 0)
def RenderingCfgAddColormap(builder, colormap): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(colormap), 0)
def RenderingCfgAddRenderMethod(builder, renderMethod): builder.PrependInt8Slot(8, renderMethod, 0)
def RenderingCfgAddParticlesCount(builder, particlesCount): builder.PrependUint32Slot(9, particlesCount, 0)
def RenderingCfgAddParticleTTL(builder, particleTTL): builder.PrependUint32Slot(10, particleTTL, 0)
def RenderingCfgAddStreamlineLength(builder, streamlineLength): builder.PrependUint32Slot(11, streamlineLength, 0)
def RenderingCfgAddStreamlineSpeed(builder, streamlineSpeed): builder.PrependFloat32Slot(12, streamlineSpeed, 0.0)
def RenderingCfgAddTarget(builder, target): builder.PrependStructSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(target), 0)
def RenderingCfgAddFilterMode(builder, filterMode): builder.PrependInt8Slot(14, filterMode, 0)
def RenderingCfgAddBillboardsSize(builder, billboardsSize): builder.PrependFloat32Slot(15, billboardsSize, 0.0)
def RenderingCfgAddBillboardsDensity(builder, billboardsDensity): builder.PrependFloat32Slot(16, billboardsDensity, 0.0)
def RenderingCfgAddLineThickness(builder, lineThickness): builder.PrependFloat32Slot(17, lineThickness, 0.0)
def RenderingCfgEnd(builder): return builder.EndObject()
