Package org.robwork.sdurw_geometry
Class ParametricCurvePtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.ParametricCurvePtr
-
public class ParametricCurvePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description ParametricCurvePtr()
Default constructor yielding a NULL-pointer.ParametricCurvePtr(long cPtr, boolean cMemoryOwn)
ParametricCurvePtr(ParametricCurve ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParametricCurve
__ref__()
Dereferencing operator.Vector3D
call(double in)
ParametricCurvePtr
clone()
SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t
closestPoints(Vector3D p)
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.
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.
ParametricCurveCPtr
cptr()
double
curvature(double t)
The curvature in a given point on the curve.
This function does not take the limits into account.
boolean
CurveEqual(CurveCPtr curve, double eps)
Vector3D
ddx(double t)
Evaluate the second derivative in a point on the curve.void
delete()
ParametricCurve
deref()
The pointer stored in the object.SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_t
discretizeAdaptive(double stepsPerRevolution)
Vector3D
dx(double t)
Evaluate the derivative in a point on the curve.boolean
equals(ParametricCurve p)
pair_d_d
extremums(Vector3D dir)
static long
getCPtr(ParametricCurvePtr obj)
ParametricCurve
getDeref()
Member access operator.boolean
hasLimits()
Check if the curve is limited.boolean
inLimits(double t)
Check if the parameter t is inside the limits set for the curve.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershippair_d_d
limits()
Get the limits of the curve segment.
The returned values are only valid when hasLimits() returns true.
OBB
obr()
ParametricCurvePtr
reverse()
ParametricCurvePtr
scale(double factor)
void
setLimits(pair_d_d limits)
Set parameter limits for the curve.ParametricCurvePtr
transform(Transform3D T)
rw::math::Transform3D<double>&) constParametricCurvePtr
transform(Vector3D P)
rw::math::Vector3D<double>&) constVector3D
x(double t)
Evaluate a point on the curve.
-
-
-
Constructor Detail
-
ParametricCurvePtr
public ParametricCurvePtr(long cPtr, boolean cMemoryOwn)
-
ParametricCurvePtr
public ParametricCurvePtr()
Default constructor yielding a NULL-pointer.
-
ParametricCurvePtr
public ParametricCurvePtr(ParametricCurve ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ParametricCurvePtr obj)
-
delete
public void delete()
-
deref
public ParametricCurve deref()
The pointer stored in the object.
-
__ref__
public ParametricCurve __ref__()
Dereferencing operator.
-
getDeref
public ParametricCurve getDeref()
Member access operator.
-
equals
public boolean equals(ParametricCurve p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public ParametricCurveCPtr cptr()
-
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.
-
-