src/bezier_curve.h

Tue, 11 Apr 2023 20:27:04 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Tue, 11 Apr 2023 20:27:04 +0300
changeset 375
21a5ecbe34e4
parent 373
e34d6a30b96d
permissions
-rw-r--r--

Simplify signature of updateRenderPreferences

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