src/bezier_curve.h

Wed, 12 Apr 2023 01:53:42 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 12 Apr 2023 01:53:42 +0300
changeset 379
8d88adffb779
parent 373
e34d6a30b96d
permissions
-rw-r--r--

Circular primitive type is now an enum class

373
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
1 #ifndef BEZIER_CURVE_H
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
2 #define BEZIER_CURVE_H
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
3 #include "src/basics.h"
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
4
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
5 struct bezier_curve
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
6 {
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
7 glm::vec3 points[4];
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
8 };
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
9
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
10 glm::vec3 point_on_bezier_curve(const struct bezier_curve& curve, float t);
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
11 glm::vec3 derivate_on_bezier_curve(const struct bezier_curve& curve, float t);
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
12
e34d6a30b96d Move bezier curve to its own file
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff changeset
13 #endif // BEZIER_CURVE_H

mercurial