SEGS  0.6.1-develop [3e741b81]
Super Entity Game Server
StateInterpolator.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 
10 #include "CommonNetStructures.h"
11 #include <array>
12 
13 class Entity;
14 struct PosUpdate;
15 
17 {
18  int16_t x=0,y=0,z=0;
19  bool m_has_height = false;
20  bool m_has_other = false;
21 };
22 
23 extern bool g_interpolating;
24 extern uint8_t g_interpolation_level;
25 extern uint8_t g_interpolation_bits;
26 
27 void interpolatePosUpdates(Entity *e, std::array<BinTreeEntry,7> &server_pos_update);
28 std::array<BinTreeEntry,7> interpolateBinTree(std::array<PosUpdate, 64> vals, float min_error);
29 void entCalcInterp(Entity *ent, glm::mat4 *mat4, uint32_t time, glm::vec3 *next_pyr);
30 int storeBinTreesResult(BitStream &bs, const std::array<BinTreeEntry, 7> &bintree);
31 int runTest(Entity &e);
uint8_t g_interpolation_bits
Definition: StateInterpolator.cpp:67
void interpolatePosUpdates(Entity *e, std::array< BinTreeEntry, 7 > &server_pos_update)
Definition: StateInterpolator.cpp:131
bool g_interpolating
Definition: StateInterpolator.cpp:65
std::array< BinTreeEntry, 7 > interpolateBinTree(std::array< PosUpdate, 64 > vals, float min_error)
Definition: StateInterpolator.cpp:200
bool m_has_height
Definition: StateInterpolator.h:19
uint8_t g_interpolation_level
Definition: StateInterpolator.cpp:66
Definition: BitStream.h:34
int16_t z
Definition: StateInterpolator.h:18
void entCalcInterp(Entity *ent, glm::mat4 *mat4, uint32_t time, glm::vec3 *next_pyr)
Definition: StateInterpolator.cpp:275
Definition: StateInterpolator.h:16
int16_t x
Definition: StateInterpolator.h:18
Definition: Entity.h:134
int16_t y
Definition: StateInterpolator.h:18
int runTest(Entity &e)
Definition: StateInterpolator.cpp:401
int storeBinTreesResult(BitStream &bs, const std::array< BinTreeEntry, 7 > &bintree)
Definition: StateInterpolator.cpp:333
bool m_has_other
Definition: StateInterpolator.h:20
Definition: Movement.h:16