RobWorkProject  23.9.11-
Public Types | Static Public Member Functions | List of all members
QuadraticUtil Class Reference

Utility functions for operations on quadratic surfaces and curves. More...

#include <QuadraticUtil.hpp>

Public Types

typedef std::pair< rw::math::Vector3D< double >, rw::math::Vector3D< double > > PointPair
 Type for a pair of points.
 

Static Public Member Functions

static bool closestPointsApproximation (const rw::geometry::QuadraticSurface &s1, const rw::geometry::QuadraticSurface &s2, PointPair &result, double epsIn, double epsOut)
 Find and approximation of the closest points between two surfaces s1 and s2. More...
 
static bool closestPointsApproximation (const rw::geometry::QuadraticSurface &s, const rw::geometry::QuadraticCurve &c, PointPair &result, double epsIn, double epsOut)
 Find and approximation of the closest points between a surface s and a curve c. More...
 
static std::vector< std::pair< double, double > > closestTimesApproximation (const rw::geometry::QuadraticSurface &sa1, const rw::geometry::QuadraticSurface &sa2, const rw::geometry::QuadraticCurve &ca, const rw::geometry::QuadraticCurve &cb)
 Find an approximation of the curve parameter values of curves ca and cb at the closest points. More...
 

Detailed Description

Utility functions for operations on quadratic surfaces and curves.

Functions are provided to find approximate closest points between different combinations of quadratics surfaces and curves.

Member Function Documentation

◆ closestPointsApproximation() [1/2]

static bool closestPointsApproximation ( const rw::geometry::QuadraticSurface s,
const rw::geometry::QuadraticCurve c,
PointPair result,
double  epsIn,
double  epsOut 
)
static

Find and approximation of the closest points between a surface s and a curve c.

The approximation is valid when the distance is small. Only closest points within the trimming region of surface s and within the limits of curve c will give a result.

Parameters
s[in] the surface.
c[in] the curve.
result[out] the result (only valid if the function returns true).
epsIn[in] threshold for penetration depth.
epsOut[in] threshold for distance.
Returns
true if there is a closest point pair within the given limits.

◆ closestPointsApproximation() [2/2]

static bool closestPointsApproximation ( const rw::geometry::QuadraticSurface s1,
const rw::geometry::QuadraticSurface s2,
PointPair result,
double  epsIn,
double  epsOut 
)
static

Find and approximation of the closest points between two surfaces s1 and s2.

The approximation is valid when the distance is small. Only closest points within the trimming regions will give a result.

Parameters
s1[in] the first surface.
s2[in] the second surface.
result[out] the result (only valid if the function returns true).
epsIn[in] threshold for penetration depth.
epsOut[in] threshold for distance.
Returns
true if there is a closest point pair within the given limits.

◆ closestTimesApproximation()

static std::vector<std::pair<double, double> > closestTimesApproximation ( const rw::geometry::QuadraticSurface sa1,
const rw::geometry::QuadraticSurface sa2,
const rw::geometry::QuadraticCurve ca,
const rw::geometry::QuadraticCurve cb 
)
static

Find an approximation of the curve parameter values of curves ca and cb at the closest points.

The approximation is valid when the distance is small. Only closest points within the limits of both curves will give a result.

Parameters
sa1[in] one of the surfaces the first curve ca is lying on.
sa2[in] the other surface the first curve ca is lying on.
ca[in] the first curve.
cb[in] the second curve.
Returns
a list of pairs of curve parameter values at the closest points.

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