# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FBOutput

import tdw.flatbuffers

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

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

    # Environment
    def Id(self): return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, self._tab.Pos + tdw.flatbuffers.number_types.UOffsetTFlags.py_type(0))
    # Environment
    def Center(self, obj):
        obj.Init(self._tab.Bytes, self._tab.Pos + 4)
        return obj

    # Environment
    def Bounds(self, obj):
        obj.Init(self._tab.Bytes, self._tab.Pos + 16)
        return obj


def CreateEnvironment(builder, id, center_x, center_y, center_z, bounds_x, bounds_y, bounds_z):
    builder.Prep(4, 28)
    builder.Prep(4, 12)
    builder.PrependFloat32(bounds_z)
    builder.PrependFloat32(bounds_y)
    builder.PrependFloat32(bounds_x)
    builder.Prep(4, 12)
    builder.PrependFloat32(center_z)
    builder.PrependFloat32(center_y)
    builder.PrependFloat32(center_x)
    builder.PrependInt32(id)
    return builder.Offset()
