Package org.robwork.sdurw_geometry
Class ParametricCurve
- java.lang.Object
-
- org.robwork.sdurw_geometry.ParametricCurve
-
public class ParametricCurve extends java.lang.ObjectInterface 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.
-
-
Constructor Summary
Constructors Constructor Description ParametricCurve(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3Dcall(double in)ParametricCurvePtrclone()SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_tclosestPoints(Vector3D p)doubleclosestTime(Vector3D p)Get the parameter value where the curve is closest to a point p.
Notice that the limits are taken into account.
vector_dclosestTimes(Vector3D p)Get the parameter values where the curve is closest to a point p.
Notice that the limits are taken into account.
doublecurvature(double t)The curvature in a given point on the curve.
This function does not take the limits into account.
booleanCurveEqual(CurveCPtr curve, double eps)Vector3Dddx(double t)Evaluate the second derivative in a point on the curve.voiddelete()SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_tdiscretizeAdaptive(double stepsPerRevolution)Vector3Ddx(double t)Evaluate the derivative in a point on the curve.pair_d_dextremums(Vector3D dir)static longgetCPtr(ParametricCurve obj)booleanhasLimits()Check if the curve is limited.booleaninLimits(double t)Check if the parameter t is inside the limits set for the curve.pair_d_dlimits()Get the limits of the curve segment.
The returned values are only valid when hasLimits() returns true.
OBBobr()ParametricCurvePtrreverse()ParametricCurvePtrscale(double factor)voidsetLimits(pair_d_d limits)Set parameter limits for the curve.ParametricCurvePtrtransform(Transform3D T)rw::math::Transform3D<double>&) constParametricCurvePtrtransform(Vector3D P)rw::math::Vector3D<double>&) constVector3Dx(double t)Evaluate a point on the curve.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(ParametricCurve obj)
-
delete
public void delete()
-
transform
public ParametricCurvePtr transform(Transform3D T)
rw::math::Transform3D<double>&) const
-
transform
public ParametricCurvePtr transform(Vector3D P)
rw::math::Vector3D<double>&) const
-
scale
public ParametricCurvePtr scale(double factor)
-
reverse
public ParametricCurvePtr reverse()
-
clone
public ParametricCurvePtr clone()
-
discretizeAdaptive
public SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_t discretizeAdaptive(double stepsPerRevolution)
-
obr
public OBB obr()
-
closestPoints
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t closestPoints(Vector3D p)
-
CurveEqual
public boolean CurveEqual(CurveCPtr curve, double eps)
-
x
public Vector3D x(double t)
Evaluate a point on the curve.- Parameters:
t- [in] the parameter to find point for.- Returns:
- the vector p \in \mathbb{R}^3 .
-
dx
public Vector3D dx(double t)
Evaluate the derivative in a point on the curve.- Parameters:
t- [in] the parameter to find derivative for.- Returns:
- a derivative vector p \in \mathbb{R}^3 .
-
ddx
public Vector3D ddx(double t)
Evaluate the second derivative in a point on the curve.- Parameters:
t- [in] the parameter to find second derivative for.- Returns:
- a second derivative vector p \in \mathbb{R}^3 .
-
call
public Vector3D call(double in)
-
hasLimits
public boolean hasLimits()
Check if the curve is limited.- Returns:
- true if curve is limited, false otherwise.
-
limits
public pair_d_d limits()
Get the limits of the curve segment.
The returned values are only valid when hasLimits() returns true.
- Returns:
- the minimum and maximum parameter values on the curve.
-
inLimits
public boolean inLimits(double t)
Check if the parameter t is inside the limits set for the curve.- Parameters:
t- [in] the parameter to check.- Returns:
- true if inside limits, false otherwise.
-
setLimits
public void setLimits(pair_d_d limits)
Set parameter limits for the curve.- Parameters:
limits- [in] the minimum and maximum parameter values on the curve.
-
curvature
public double curvature(double t)
The curvature in a given point on the curve.
This function does not take the limits into account.
- Parameters:
t- [in] the parameter to evaluate the curvature for.- Returns:
- the curvature.
-
closestTimes
public vector_d closestTimes(Vector3D p)
Get the parameter values where the curve is closest to a point p.
Notice that the limits are taken into account.
- Parameters:
p- [in] the point to find closest values for.- Returns:
- a list of parameter values.
-
closestTime
public double closestTime(Vector3D p)
Get the parameter value where the curve is closest to a point p.
Notice that the limits are taken into account.
- Parameters:
p- [in] the point to find closest values for.- Returns:
- the point on the curve closest to p. If multiple points are equally close to
p, only one of those points are returned.
-
-