RobWorkProject
23.9.11-
|
Interface for parametric curves. A parametric curve, \( \mathbf{p}(t) \in \mathbb{R}^3 \), has its points given as a function of a single parameter, \( t \in \mathbb{R}\). More...
#include <ParametricCurve.hpp>
Inherits Curve.
Inherited by QuadraticCurve.
Public Types | |
typedef rw::core::Ptr< ParametricCurve > | Ptr |
Smart pointer type for ParametricCurve. | |
typedef rw::core::Ptr< const ParametricCurve > | CPtr |
Smart pointer type for a const ParametricCurve. | |
Public Types inherited from Curve | |
typedef rw::core::Ptr< Curve > | Ptr |
Smart pointer type for Curve. | |
typedef rw::core::Ptr< const Curve > | CPtr |
Smart pointer type for a const Curve. | |
Public Member Functions | |
ParametricCurve () | |
Constructor. | |
virtual | ~ParametricCurve () |
Destructor. | |
ParametricCurve::Ptr | transform (const rw::math::Transform3D< double > &T) const |
Transform curve. More... | |
ParametricCurve::Ptr | transform (const rw::math::Vector3D< double > &P) const |
Transform curve. More... | |
ParametricCurve::Ptr | scale (double factor) const |
Get a scaled version of the curve. More... | |
ParametricCurve::Ptr | reverse () const |
Make a curve where time variable runs in opposite direction. More... | |
ParametricCurve::Ptr | clone () const |
Make a copy of the curve. More... | |
virtual std::pair< double, double > | extremums (const rw::math::Vector3D< double > &dir) const =0 |
Get extremums of curve in given direction. More... | |
virtual std::list< rw::math::Vector3D< double > > | discretizeAdaptive (double stepsPerRevolution) const =0 |
Make a discretization of the curve. More... | |
virtual OBB | obr () const =0 |
Bounding rectangle of curve. More... | |
virtual std::vector< rw::math::Vector3D< double > > | closestPoints (const rw::math::Vector3D< double > &p) const =0 |
Get the closest points on the curve to a point p. More... | |
virtual bool | equals (rw::core::Ptr< const rw::geometry::Curve > curve, double eps) const =0 |
Check if this curve is equal to another curve. More... | |
virtual rw::math::Vector3D< double > | x (double t) const =0 |
Evaluate a point on the curve. More... | |
virtual rw::math::Vector3D< double > | dx (double t) const =0 |
Evaluate the derivative in a point on the curve. More... | |
virtual rw::math::Vector3D< double > | ddx (double t) const =0 |
Evaluate the second derivative in a point on the curve. More... | |
virtual rw::math::Vector3D< double > | operator() (double t) const =0 |
Evaluate a point on the curve. More... | |
virtual bool | hasLimits () const =0 |
Check if the curve is limited. More... | |
virtual const std::pair< double, double > & | limits () const =0 |
Get the limits of the curve segment. More... | |
virtual bool | inLimits (double t) const =0 |
Check if the parameter t is inside the limits set for the curve. More... | |
virtual void | setLimits (const std::pair< double, double > &limits)=0 |
Set parameter limits for the curve. More... | |
virtual double | curvature (double t) const =0 |
The curvature in a given point on the curve. More... | |
virtual std::vector< double > | closestTimes (const rw::math::Vector3D< double > &p) const =0 |
Get the parameter values where the curve is closest to a point p. More... | |
virtual double | closestTime (const rw::math::Vector3D< double > &p) const =0 |
Get the parameter value where the curve is closest to a point p. More... | |
Public Member Functions inherited from Curve | |
Curve () | |
Constructor. | |
virtual | ~Curve () |
Destructor. | |
rw::core::Ptr< Curve > | transform (const rw::math::Transform3D< double > &T) const |
Transform curve. More... | |
rw::core::Ptr< Curve > | transform (const rw::math::Vector3D< double > &P) const |
Transform curve. More... | |
rw::core::Ptr< Curve > | scale (double factor) const |
Get a scaled version of the curve. More... | |
rw::core::Ptr< Curve > | reverse () const |
Make a curve where time variable runs in opposite direction. More... | |
rw::core::Ptr< Curve > | clone () const |
Make a copy of the curve. More... | |
Interface for parametric curves. A parametric curve, \( \mathbf{p}(t) \in \mathbb{R}^3 \), has its points given as a function of a single parameter, \( t \in \mathbb{R}\).
Parametric curves have functions for evaluation of points, derivatives and curvature. A parmateric curve can be limited, and it is possible to find closest points with a given point.
|
inline |
Make a copy of the curve.
|
pure virtual |
Get the closest points on the curve to a point p.
Notice that the limits are taken into account.
p | [in] the point to find closest values for. |
Implements Curve.
Implemented in QuadraticCurve.
|
pure virtual |
Get the parameter value where the curve is closest to a point p.
Notice that the limits are taken into account.
p | [in] the point to find closest values for. |
Implemented in QuadraticCurve.
|
pure virtual |
Get the parameter values where the curve is closest to a point p.
Notice that the limits are taken into account.
p | [in] the point to find closest values for. |
Implemented in QuadraticCurve.
|
pure virtual |
The curvature in a given point on the curve.
This function does not take the limits into account.
t | [in] the parameter to evaluate the curvature for. |
Implemented in QuadraticCurve.
|
pure virtual |
Evaluate the second derivative in a point on the curve.
t | [in] the parameter to find second derivative for. |
Implemented in QuadraticCurve.
|
pure virtual |
Make a discretization of the curve.
The curve must be limited. The discretization is based on the curvature, such that the sampling starts at maximum curvature points (or in limits). The step size to the next point is based on the curvature in the current point.
A line will always give to points, regardless of the chosen number of steps per revolution.
stepsPerRevolution | [in] the number of points to sample if the curve is a perfect circle. |
Implements Curve.
Implemented in QuadraticCurve.
|
pure virtual |
Evaluate the derivative in a point on the curve.
t | [in] the parameter to find derivative for. |
Implemented in QuadraticCurve.
|
pure virtual |
Check if this curve is equal to another curve.
curve | [in] other curve. |
eps | [in] distance threshold. |
Implements Curve.
Implemented in QuadraticCurve.
|
pure virtual |
Get extremums of curve in given direction.
Notice that the limits are taken into account.
dir | [in] direction to get extremums for. |
Implements Curve.
Implemented in QuadraticCurve.
|
pure virtual |
Check if the curve is limited.
Implemented in QuadraticCurve.
|
pure virtual |
Check if the parameter t is inside the limits set for the curve.
t | [in] the parameter to check. |
Implemented in QuadraticCurve.
|
pure virtual |
Get the limits of the curve segment.
The returned values are only valid when hasLimits() returns true.
Implemented in QuadraticCurve.
|
pure virtual |
Bounding rectangle of curve.
The curve must be limited.
Implements Curve.
Implemented in QuadraticCurve.
|
pure virtual |
Evaluate a point on the curve.
t | [in] the parameter to find point for. |
Implemented in QuadraticCurve.
|
inline |
Make a curve where time variable runs in opposite direction.
|
inline |
Get a scaled version of the curve.
factor | [in] the factor to scale with. |
|
pure virtual |
Set parameter limits for the curve.
limits | [in] the minimum and maximum parameter values on the curve. |
Implemented in QuadraticCurve.
|
inline |
Transform curve.
T | [in] transformation of curve. |
|
inline |
Transform curve.
P | [in] positional offset. |
|
pure virtual |
Evaluate a point on the curve.
t | [in] the parameter to find point for. |
Implemented in QuadraticCurve.