Class to manage spline structs.
More...
#include <Spline.h>
|
| | Spline (const std::vector< Eigen::Vector3f > &points) |
| | Create a new Spline object. More...
|
| |
| Eigen::Vector3f | evaluate (float dt) |
| | Evaluate the spline in a specific time. More...
|
| |
| Eigen::Vector3f | getTangent (void) |
| | Returns tangent vector in last time evaluate called. More...
|
| |
| Eigen::Vector3f | getTangent (float dt0, float dt1) |
| | Returns tangent vector between between two times given. More...
|
| |
| float | angleBetweenPoints (void) |
| | Returns interpolated angle between last and current time. More...
|
| |
| float | angleBetweenPoints (float dt0, float dt1) |
| | Returns interpolated angle between last and current time. More...
|
| |
|
| float | _catmullRom (float p0, float p1, float p2, float p3, float t) |
| | Evaluate catmull rom spline with 4 given values and time. More...
|
| |
|
|
std::vector< Eigen::Vector3f > | _points |
| | List of points who defineds the spline.
|
| |
|
float | _currentdt |
| | Current time used (default = 0.0f)
|
| |
|
float | _olddt |
| | Last time used (default = 0.0f)
|
| |
Class to manage spline structs.
Definition at line 36 of file Spline.h.
| reto::Spline::Spline |
( |
const std::vector< Eigen::Vector3f > & |
points | ) |
|
Create a new Spline object.
- Parameters
-
| points | Point list who define the spline. |
| float reto::Spline::_catmullRom |
( |
float |
p0, |
|
|
float |
p1, |
|
|
float |
p2, |
|
|
float |
p3, |
|
|
float |
t |
|
) |
| |
|
protected |
Evaluate catmull rom spline with 4 given values and time.
- Parameters
-
| p0 | First value |
| p1 | Second value |
| p2 | Third value |
| p3 | Fourth value |
| t | Time to evaluate |
- Returns
- Interpolated value
| float reto::Spline::angleBetweenPoints |
( |
void |
| ) |
|
Returns interpolated angle between last and current time.
- Returns
- angle (in radians).
| float reto::Spline::angleBetweenPoints |
( |
float |
dt0, |
|
|
float |
dt1 |
|
) |
| |
Returns interpolated angle between last and current time.
- Parameters
-
| dt0 | Last time |
| dt1 | Current time |
- Returns
- angle (in radians).
| Eigen::Vector3f reto::Spline::evaluate |
( |
float |
dt | ) |
|
Evaluate the spline in a specific time.
- Parameters
-
| dt | Time to evaluate. Must be in [0, 1] interval. |
- Returns
- Interpolated position in dt time.
| Eigen::Vector3f reto::Spline::getTangent |
( |
void |
| ) |
|
Returns tangent vector in last time evaluate called.
- Returns
- Intepolated tangent in dt time.
| Eigen::Vector3f reto::Spline::getTangent |
( |
float |
dt0, |
|
|
float |
dt1 |
|
) |
| |
Returns tangent vector between between two times given.
- Parameters
-
| dt0 | Last time |
| dt1 | Current time |
- Returns
- Interpolated tangent in position.
The documentation for this class was generated from the following file: