Package org.robwork.sdurw_geometry
Class CurveCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.CurveCPtr
-
public class CurveCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Curve__ref__()Dereferencing operator.CurvePtrclone()Make a copy of the curve.SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_tclosestPoints(Vector3D p)Get the closest points on the curve to a point p.
Notice that the limits are taken into account.
booleanCurveEqual(CurveCPtr curve, double eps)Check if this curve is equal to another curve.voiddelete()Curvederef()The pointer stored in the object.SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_tdiscretizeAdaptive(double stepsPerRevolution)Make a discretization of the curve.
The curve must be limited.booleanequals(Curve p)pair_d_dextremums(Vector3D dir)Get extremums of curve in given direction.
Notice that the limits are taken into account.
static longgetCPtr(CurveCPtr obj)CurvegetDeref()Member access operator.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipOBBobr()Bounding rectangle of curve.
The curve must be limited.
CurvePtrreverse()Make a curve where time variable runs in opposite direction.CurvePtrscale(double factor)Get a scaled version of the curve.CurvePtrtransform(Transform3D T)Transform curve.CurvePtrtransform(Vector3D P)Transform curve.
-
-
-
Constructor Detail
-
CurveCPtr
public CurveCPtr(long cPtr, boolean cMemoryOwn)
-
CurveCPtr
public CurveCPtr()
Default constructor yielding a NULL-pointer.
-
CurveCPtr
public CurveCPtr(Curve ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(CurveCPtr obj)
-
delete
public void delete()
-
deref
public Curve deref()
The pointer stored in the object.
-
__ref__
public Curve __ref__()
Dereferencing operator.
-
getDeref
public Curve getDeref()
Member access operator.
-
equals
public boolean equals(Curve 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
-
transform
public CurvePtr transform(Transform3D T)
Transform curve.- Parameters:
T- [in] transformation of curve.- Returns:
- a new transformed curve.
-
transform
public CurvePtr transform(Vector3D P)
Transform curve.- Parameters:
P- [in] positional offset.- Returns:
- a new transformed curve.
-
scale
public CurvePtr scale(double factor)
Get a scaled version of the curve.- Parameters:
factor- [in] the factor to scale with.- Returns:
- a new scaled curve.
-
reverse
public CurvePtr reverse()
Make a curve where time variable runs in opposite direction.- Returns:
- reversed curve.
-
clone
public CurvePtr clone()
Make a copy of the curve.- Returns:
- a new copy of the curve.
-
extremums
public pair_d_d extremums(Vector3D dir)
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.
-
discretizeAdaptive
public SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_t discretizeAdaptive(double stepsPerRevolution)
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.
-
obr
public OBB obr()
Bounding rectangle of curve.
The curve must be limited.
- Returns:
- the bounding rectangle.
-
closestPoints
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t closestPoints(Vector3D p)
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.
-
CurveEqual
public boolean CurveEqual(CurveCPtr curve, double eps)
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.
-
-