VOX
A little voxel engine
Loading...
Searching...
No Matches
EntityMovePacket.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "IPacket.hpp"
4#include "glm/vec3.hpp"
5
6class EntityMovePacket : public IServerToClientPacket
7{
9 EntityMovePacket(uint32_t id, glm::vec3 position);
11
12 EntityMovePacket(const EntityMovePacket& other) = delete;
13 EntityMovePacket& operator=(const EntityMovePacket& other) = delete;
14
15 EntityMovePacket(EntityMovePacket&& other) = delete;
16 EntityMovePacket& operator=(EntityMovePacket&& other) = delete;
17
18
19 virtual void Serialize(uint8_t * buffer) const override;
20 virtual void Deserialize(const uint8_t * buffer) override;
21 virtual uint32_t Size() const override;
22
23 virtual std::shared_ptr<IPacket> Clone() const override;
24
25
26 uint32_t GetId() const;
27 glm::vec3 GetPosition() const;
28
29 void SetId(uint32_t id);
30 void SetPosition(glm::vec3 position);
31private:
32 uint32_t m_id;
33 glm::vec3 m_position;
34};
Definition: EntityMovePacket.hpp:7