-
Notifications
You must be signed in to change notification settings - Fork 1
/
geometries.h
72 lines (62 loc) · 1.06 KB
/
geometries.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#include <bl/bl.h>
namespace tess
{
struct box
{
vec3 extents = {0.0f, 0.0f, 0.0f};
};
struct circular_torus
{
float in_radius = 0.1f;
float out_radius = 0.4f;
float sweep_angle = math::HALF_PI;
};
struct cone
{
float top_radius = 0.25f;
float bottom_radius = 0.5f;
float height = 1.0f;
};
struct cone_offset
{
float top_radius = 0.25f;
float bottom_radius = 0.5f;
float height = 1.0f;
vec2 offset = {0.25f, 0.25f};
};
struct cylinder
{
float radius = 0.5f;
float height = 1.0f;
};
struct cylinder_offset
{
float radius = 0.5f;
float height = 1.0f;
vec2 offset = {0.25f, 0.25f};
};
struct dish
{
float radius = 0.5f;
float height = 1.0f;
};
struct pyramid
{
vec2 top_extents = {0.25f, 0.25f};
vec2 bottom_extents = {0.5f, 0.5f};
vec2 offset = {0.25f, 0.25f};
float height = 1.0f;
};
struct rectangular_torus
{
float in_height = 1.0f;
float in_radius = 0.1f;
float out_radius = 0.4f;
float sweep_angle = math::HALF_PI;
};
struct sphere
{
float radius = 0.5f;
};
} // namespace tess