summaryrefslogtreecommitdiff
path: root/src/physics/collision.h
blob: cca604258fdce129923ca87b34b0e1864f337e85 (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
/**
 * @file collision.h
 * @author your name (you@domain.com)
 * @brief
 * @version 0.1
 * @date 2024-05-12
 *
 * @copyright Copyright (c) 2024
 *
 */
#pragma once
#include "geometry.h"

enum collider_type {
  cuboid_collider,
  sphere_collider,
};

/** @brief generic collider structure */
typedef struct physics_collider {
  u64 id;  // ? Replace with handle?
  enum collider_type shape;
  union collider_data {
    cuboid cuboid;
    sphere sphere;
  } geometry;
  transform transform;
  u8 layer;
  bool on_ground;
} physics_collider;