summaryrefslogtreecommitdiffstats
path: root/src/game/shared/entity/collision.hh
blob: 89d9756a26c2bce9ec499ffeb82af5adf62540c1 (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
// SPDX-License-Identifier: BSD-2-Clause
// Copyright (c) 2025 Kirill Dmitrievich
// File: collision.hh
// Description: Collision detection

#ifndef SHARED_ENTITY_COLLISION_HH
#define SHARED_ENTITY_COLLISION_HH
#pragma once

#include "core/math/aabb.hh"

class Dimension;

struct Collision final {
    math::AABBf aabb;

public:
    // NOTE: Collision::fixed_update must be called
    // before Transform::fixed_update and Velocity::fixed_update
    // because both transform and velocity may be updated internally
    static void fixed_update(Dimension* dimension);
};

#endif