// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_WORLDSTATE_H_
#define FLATBUFFERS_GENERATED_WORLDSTATE_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
              FLATBUFFERS_VERSION_MINOR == 12 &&
              FLATBUFFERS_VERSION_REVISION == 19,
             "Non-compatible flatbuffers version included");

struct Vec3;

struct PlayerInfo;
struct PlayerInfoBuilder;

struct WorldState;
struct WorldStateBuilder;

FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3 FLATBUFFERS_FINAL_CLASS {
 private:
  float x_;
  float y_;
  float z_;

 public:
  Vec3()
      : x_(0),
        y_(0),
        z_(0) {
  }
  Vec3(float _x, float _y, float _z)
      : x_(::flatbuffers::EndianScalar(_x)),
        y_(::flatbuffers::EndianScalar(_y)),
        z_(::flatbuffers::EndianScalar(_z)) {
  }
  float x() const {
    return ::flatbuffers::EndianScalar(x_);
  }
  float y() const {
    return ::flatbuffers::EndianScalar(y_);
  }
  float z() const {
    return ::flatbuffers::EndianScalar(z_);
  }
};
FLATBUFFERS_STRUCT_END(Vec3, 12);

struct PlayerInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef PlayerInfoBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_ID = 4,
    VT_POS = 6
  };
  int32_t id() const {
    return GetField<int32_t>(VT_ID, 0);
  }
  const Vec3 *pos() const {
    return GetStruct<const Vec3 *>(VT_POS);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int32_t>(verifier, VT_ID, 4) &&
           VerifyField<Vec3>(verifier, VT_POS, 4) &&
           verifier.EndTable();
  }
};

struct PlayerInfoBuilder {
  typedef PlayerInfo Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_id(int32_t id) {
    fbb_.AddElement<int32_t>(PlayerInfo::VT_ID, id, 0);
  }
  void add_pos(const Vec3 *pos) {
    fbb_.AddStruct(PlayerInfo::VT_POS, pos);
  }
  explicit PlayerInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<PlayerInfo> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<PlayerInfo>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<PlayerInfo> CreatePlayerInfo(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    int32_t id = 0,
    const Vec3 *pos = nullptr) {
  PlayerInfoBuilder builder_(_fbb);
  builder_.add_pos(pos);
  builder_.add_id(id);
  return builder_.Finish();
}

struct WorldState FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef WorldStateBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_PLAYERS = 4
  };
  const ::flatbuffers::Vector<::flatbuffers::Offset<PlayerInfo>> *players() const {
    return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<PlayerInfo>> *>(VT_PLAYERS);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_PLAYERS) &&
           verifier.VerifyVector(players()) &&
           verifier.VerifyVectorOfTables(players()) &&
           verifier.EndTable();
  }
};

struct WorldStateBuilder {
  typedef WorldState Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_players(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<PlayerInfo>>> players) {
    fbb_.AddOffset(WorldState::VT_PLAYERS, players);
  }
  explicit WorldStateBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<WorldState> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<WorldState>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<WorldState> CreateWorldState(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<PlayerInfo>>> players = 0) {
  WorldStateBuilder builder_(_fbb);
  builder_.add_players(players);
  return builder_.Finish();
}

inline ::flatbuffers::Offset<WorldState> CreateWorldStateDirect(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    const std::vector<::flatbuffers::Offset<PlayerInfo>> *players = nullptr) {
  auto players__ = players ? _fbb.CreateVector<::flatbuffers::Offset<PlayerInfo>>(*players) : 0;
  return CreateWorldState(
      _fbb,
      players__);
}

inline const WorldState *GetWorldState(const void *buf) {
  return ::flatbuffers::GetRoot<WorldState>(buf);
}

inline const WorldState *GetSizePrefixedWorldState(const void *buf) {
  return ::flatbuffers::GetSizePrefixedRoot<WorldState>(buf);
}

template <bool B = false>
inline bool VerifyWorldStateBuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifyBuffer<WorldState>(nullptr);
}

template <bool B = false>
inline bool VerifySizePrefixedWorldStateBuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifySizePrefixedBuffer<WorldState>(nullptr);
}

inline void FinishWorldStateBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<WorldState> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedWorldStateBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<WorldState> root) {
  fbb.FinishSizePrefixed(root);
}

#endif  // FLATBUFFERS_GENERATED_WORLDSTATE_H_
