summaryrefslogtreecommitdiffstats
path: root/game/shared/transform.hh
blob: 0c0cc515952f3c9365b3358868b9944e668d421f (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
#ifndef SHARED_TRANSFORM_HH
#define SHARED_TRANSFORM_HH 1
#pragma once

#include "shared/types.hh"

class Dimension;

struct TransformComponent {
    chunk_pos chunk;
    glm::fvec3 local;
    glm::fvec3 angles;

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

// Client-side only - interpolated and previous transform
struct TransformComponentIntr final : public TransformComponent {};
struct TransformComponentPrev final : public TransformComponent {};

#endif /* SHARED_TRANSFORM_HH */