summaryrefslogtreecommitdiffstats
path: root/game/shared/entity/transform.hh
blob: f7db095ea6c83b466523dc034b4363c57dbc1e5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include "shared/types.hh"

namespace world
{
class Dimension;
} // namespace world

namespace entity
{
struct Transform {
    chunk_pos chunk;
    glm::fvec3 local;
    glm::fvec3 angles;

public:
    // Updates entity::Transform values so that
    // the local translation field is always within
    // local coodrinates; [floating-point precision]
    static void fixed_update(world::Dimension* dimension);
};
} // namespace entity

namespace entity::client
{
// Client-side only - interpolated and previous transform
struct TransformIntr final : public Transform {};
struct TransformPrev final : public Transform {};
} // namespace entity::client