feat: update OverteClient to enhance entity management and clarify documentation
This commit is contained in:
@@ -19,8 +19,9 @@ struct OverteEntity {
|
|||||||
glm::mat4 transform{1.0f};
|
glm::mat4 transform{1.0f};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Lightweight stub over Overte networking layer. Designed to be replaced by
|
// Lightweight client for Overte mixers/entities. Designed to follow Overte's
|
||||||
// real Overte SDK calls while keeping the app testable.
|
// standards. For now includes a minimal parser scaffold; simulation can be
|
||||||
|
// optionally enabled via STARWORLD_SIMULATE=1.
|
||||||
class OverteClient {
|
class OverteClient {
|
||||||
public:
|
public:
|
||||||
explicit OverteClient(std::string domainUrl)
|
explicit OverteClient(std::string domainUrl)
|
||||||
@@ -43,8 +44,11 @@ public:
|
|||||||
// Entity accessors
|
// Entity accessors
|
||||||
const std::unordered_map<std::uint64_t, OverteEntity>& entities() const { return m_entities; }
|
const std::unordered_map<std::uint64_t, OverteEntity>& entities() const { return m_entities; }
|
||||||
std::vector<OverteEntity> consumeUpdatedEntities();
|
std::vector<OverteEntity> consumeUpdatedEntities();
|
||||||
|
std::vector<std::uint64_t> consumeDeletedEntities();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void parseNetworkPackets(); // standards-aligned parsing (scaffold)
|
||||||
|
|
||||||
std::string m_domainUrl;
|
std::string m_domainUrl;
|
||||||
std::string m_host{"127.0.0.1"};
|
std::string m_host{"127.0.0.1"};
|
||||||
int m_port{40102};
|
int m_port{40102};
|
||||||
@@ -52,10 +56,12 @@ private:
|
|||||||
bool m_avatarMixer{false};
|
bool m_avatarMixer{false};
|
||||||
bool m_entityServer{false};
|
bool m_entityServer{false};
|
||||||
bool m_audioMixer{false};
|
bool m_audioMixer{false};
|
||||||
|
bool m_useSimulation{false};
|
||||||
|
|
||||||
// Very small in-process world state for testing
|
// Very small in-process world state for testing
|
||||||
std::unordered_map<std::uint64_t, OverteEntity> m_entities;
|
std::unordered_map<std::uint64_t, OverteEntity> m_entities;
|
||||||
std::vector<std::uint64_t> m_updateQueue; // ids of entities updated since last consume
|
std::vector<std::uint64_t> m_updateQueue; // ids of entities updated since last consume
|
||||||
|
std::vector<std::uint64_t> m_deleteQueue; // ids of entities to delete
|
||||||
std::uint64_t m_nextEntityId{1};
|
std::uint64_t m_nextEntityId{1};
|
||||||
|
|
||||||
// Networking
|
// Networking
|
||||||
|
|||||||
Reference in New Issue
Block a user