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};
|
||||
};
|
||||
|
||||
// Lightweight stub over Overte networking layer. Designed to be replaced by
|
||||
// real Overte SDK calls while keeping the app testable.
|
||||
// Lightweight client for Overte mixers/entities. Designed to follow Overte's
|
||||
// standards. For now includes a minimal parser scaffold; simulation can be
|
||||
// optionally enabled via STARWORLD_SIMULATE=1.
|
||||
class OverteClient {
|
||||
public:
|
||||
explicit OverteClient(std::string domainUrl)
|
||||
@@ -43,8 +44,11 @@ public:
|
||||
// Entity accessors
|
||||
const std::unordered_map<std::uint64_t, OverteEntity>& entities() const { return m_entities; }
|
||||
std::vector<OverteEntity> consumeUpdatedEntities();
|
||||
std::vector<std::uint64_t> consumeDeletedEntities();
|
||||
|
||||
private:
|
||||
void parseNetworkPackets(); // standards-aligned parsing (scaffold)
|
||||
|
||||
std::string m_domainUrl;
|
||||
std::string m_host{"127.0.0.1"};
|
||||
int m_port{40102};
|
||||
@@ -52,10 +56,12 @@ private:
|
||||
bool m_avatarMixer{false};
|
||||
bool m_entityServer{false};
|
||||
bool m_audioMixer{false};
|
||||
bool m_useSimulation{false};
|
||||
|
||||
// Very small in-process world state for testing
|
||||
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_deleteQueue; // ids of entities to delete
|
||||
std::uint64_t m_nextEntityId{1};
|
||||
|
||||
// Networking
|
||||
|
||||
Reference in New Issue
Block a user