RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
Curve Class Referenceabstract

Curve is an abstract representation of a smooth curve geometry in 3D. More...

#include <Curve.hpp>

Inherited by ParametricCurve.

Public Types

typedef rw::core::Ptr< CurvePtr
 Smart pointer type for Curve.
 
typedef rw::core::Ptr< const CurveCPtr
 Smart pointer type for a const Curve.
 

Public Member Functions

 Curve ()
 Constructor.
 
virtual ~Curve ()
 Destructor.
 
rw::core::Ptr< Curvetransform (const rw::math::Transform3D< double > &T) const
 Transform curve. More...
 
rw::core::Ptr< Curvetransform (const rw::math::Vector3D< double > &P) const
 Transform curve. More...
 
rw::core::Ptr< Curvescale (double factor) const
 Get a scaled version of the curve. More...
 
rw::core::Ptr< Curvereverse () const
 Make a curve where time variable runs in opposite direction. More...
 
rw::core::Ptr< Curveclone () 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 Curve > curve, double eps) const =0
 Check if this curve is equal to another curve. More...
 

Detailed Description

Curve is an abstract representation of a smooth curve geometry in 3D.

The interface provides functions for affine transformations, such as scaling, rotation and translation. In case of a limited curve segment, it is also possible to make a discretization of the curve into line segments.

Member Function Documentation

◆ clone()

rw::core::Ptr<Curve> clone ( ) const
inline

Make a copy of the curve.

Returns
a new copy of the curve.

◆ closestPoints()

virtual std::vector<rw::math::Vector3D<double> > closestPoints ( const rw::math::Vector3D< double > &  p) const
pure virtual

Get the closest points on the curve to a point p.

Notice that the limits are taken into account.

Parameters
p[in] the point to find closest values for.
Returns
a vector of closest points to p.

Implemented in ParametricCurve, and QuadraticCurve.

◆ discretizeAdaptive()

virtual std::list<rw::math::Vector3D<double> > discretizeAdaptive ( double  stepsPerRevolution) const
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.

Parameters
stepsPerRevolution[in] the number of points to sample if the curve is a perfect circle.
Returns
a list of points on the curve.

Implemented in ParametricCurve, and QuadraticCurve.

◆ equals()

virtual bool equals ( rw::core::Ptr< const Curve curve,
double  eps 
) const
pure virtual

Check if this curve is equal to another curve.

Parameters
curve[in] other curve.
eps[in] distance threshold.
Returns
true if curves are identical, false otherwise.

Implemented in ParametricCurve, and QuadraticCurve.

◆ extremums()

virtual std::pair<double, double> extremums ( const rw::math::Vector3D< double > &  dir) const
pure virtual

Get extremums of curve in given direction.

Notice that the limits are taken into account.

Parameters
dir[in] direction to get extremums for.
Returns
the minimum and maximum value of the curve in the given direction.

Implemented in ParametricCurve, and QuadraticCurve.

◆ obr()

virtual OBB obr ( ) const
pure virtual

Bounding rectangle of curve.

The curve must be limited.

Returns
the bounding rectangle.

Implemented in ParametricCurve, and QuadraticCurve.

◆ reverse()

rw::core::Ptr<Curve> reverse ( ) const
inline

Make a curve where time variable runs in opposite direction.

Returns
reversed curve.

◆ scale()

rw::core::Ptr<Curve> scale ( double  factor) const
inline

Get a scaled version of the curve.

Parameters
factor[in] the factor to scale with.
Returns
a new scaled curve.

◆ transform() [1/2]

rw::core::Ptr<Curve> transform ( const rw::math::Transform3D< double > &  T) const
inline

Transform curve.

Parameters
T[in] transformation of curve.
Returns
a new transformed curve.

◆ transform() [2/2]

rw::core::Ptr<Curve> transform ( const rw::math::Vector3D< double > &  P) const
inline

Transform curve.

Parameters
P[in] positional offset.
Returns
a new transformed curve.

The documentation for this class was generated from the following file: