RaidZeroLib
Coroutine robot framework for VEX V5
Toggle main menu visibility
Loading...
Searching...
No Matches
PiecewiseCubicBezier.hpp
1
#pragma once
2
#include "RaidZeroLib/api/Pathing/CubicBezier.hpp"
3
4
namespace
rz
{
5
18
class
PiecewiseCubicBezier
:
public
ParametricPath
{
19
public
:
32
explicit
PiecewiseCubicBezier
(std::initializer_list<CubicBezier::Knot> knots);
33
44
Point
getPoint
(
double
t)
const
noexcept
override
;
45
58
Point
getVelocity
(
double
t)
const
noexcept
override
;
59
68
Point
getAcceleration
(
double
t)
const
noexcept
override
;
69
70
private
:
80
struct
Index {
81
std::size_t segmentIndex;
82
double
fractionalIndex;
83
};
84
96
Index getIndex(
double
t)
const
noexcept
;
97
98
std::vector<CubicBezier> curves;
99
};
100
101
}
// namespace rz
rz::ParametricPath
Differentiable 2D path over a unit-interval parameter t ∈ [0, 1].
Definition
ParametricPath.hpp:26
rz::PiecewiseCubicBezier::getVelocity
Point getVelocity(double t) const noexcept override
First derivative dP/dt at global parameter t (w.r.t. global parameter).
rz::PiecewiseCubicBezier::getPoint
Point getPoint(double t) const noexcept override
Position on the path at global parameter t.
rz::PiecewiseCubicBezier::PiecewiseCubicBezier
PiecewiseCubicBezier(std::initializer_list< CubicBezier::Knot > knots)
Constructs a piecewise cubic path from consecutive control knots.
rz::PiecewiseCubicBezier::getAcceleration
Point getAcceleration(double t) const noexcept override
Second derivative d²P/dt² at global parameter t (w.r.t. global parameter).
rz::Point
Immutable 2D point / vector with unit-safe Cartesian coordinates.
Definition
Point.hpp:21
rz
Definition
DriverControl.hpp:11
RaidZeroLib
api
Pathing
PiecewiseCubicBezier.hpp
Generated by
1.18.0