Combine read data and load scene graph node messages

This commit is contained in:
Emma Broman
2021-02-05 16:18:46 +01:00
parent 6abe40763d
commit fef2a3aae7
4 changed files with 61 additions and 57 deletions

View File

@@ -81,16 +81,10 @@ private:
float readFloatValue(std::vector<char>& message);
glm::vec3 readColor(std::vector<char>& message);
std::string readString(std::vector<char>& message);
std::vector<float> readData(std::vector<char>& message);
std::vector<float> readFloatData(std::vector<char>& message, int nValues);
size_t _messageOffset = 0;
// @TODO (emmbr 2021-02-02) We should avoid storing the data like this; it is simply
// not feasible when adding additional message types!
// Maybe the MessageType::AddSceneGraphNode can be removed, and instead the SGN is
// always added when reading a point data set? Then we wouldn't have to store the data
std::vector<glm::vec3> _pointData;
std::unordered_map<size_t, std::shared_ptr<Peer>> _peers;
mutable std::mutex _peerListMutex;