#1 - ClientWorldController refactoring
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <entt/entt.hpp>
|
||||
@@ -12,23 +13,20 @@ class EntityPositionInterpolator {
|
||||
|
||||
entt::registry* m_registry;
|
||||
|
||||
entt::entity m_player_entity;
|
||||
|
||||
size_t m_bufferingIntervalInMillis;
|
||||
|
||||
glm::vec3 get_position(Clock::time_point time_point, entt::entity entity);
|
||||
|
||||
public:
|
||||
EntityPositionInterpolator(
|
||||
entt::registry* registry,
|
||||
entt::entity player_entity,
|
||||
size_t bufferingIntervalInMillis);
|
||||
|
||||
void register_entity(entt::entity entity);
|
||||
|
||||
void add_position_for_entity(entt::entity entity, glm::vec3 position);
|
||||
void set_position(Clock::time_point time_point, entt::entity entity, glm::vec3 position);
|
||||
|
||||
glm::vec3 get_position_for_entity(entt::entity entity);
|
||||
|
||||
void update();
|
||||
void interpolate_smoothed_entities(Clock::time_point time_point);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user