summaryrefslogtreecommitdiff
path: root/archive/src/maths/geometry.h
blob: 532651c85656696747e54eec14c695a66577b1ef (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
 * @file geometry.h
 * @author your name (you@domain.com)
 * @brief Shapes and intersections between them
 * @version 0.1
 * @date 2024-02-24
 *
 * @copyright Copyright (c) 2024
 */
#pragma once

#include "maths.h"

// typedef struct line_3d {
//   vec3 start, end;
// } line_3d;

// typedef struct plane {
//   vec3 normal;
// } plane;

typedef struct Cuboid {
  Vec3 half_extents;
} Cuboid;

typedef struct Sphere {
  f32 radius;
} Sphere;

// typedef struct cylinder {
//   f32 radius;
//   f32 half_height;
// } cylinder;

// typedef struct cone {
//   f32 radius;
//   f32 half_height;
// } cone;

// TODO:
// capsule
// torus
// ray
// frustum
// conical frustum
// wedge

// 2d...
// line
// circle