Package org.robwork.sdurw_sensor
Class Contact2DCPtr
- java.lang.Object
-
- org.robwork.sdurw_sensor.Contact2DCPtr
-
public class Contact2DCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description Contact2DCPtr()
Default constructor yielding a NULL-pointer.Contact2DCPtr(long cPtr, boolean cMemoryOwn)
Contact2DCPtr(Contact2D 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 Contact2D
__ref__()
Dereferencing operator.void
delete()
Contact2D
deref()
The pointer stored in the object.boolean
equals(Contact2D p)
double
getAvgCurvature()
double moving average of the curvaturestatic long
getCPtr(Contact2DCPtr obj)
double
getCurvature()
surface curvatureContact2D
getDeref()
Member access operator.double
getMu()
coulomb friction coefficientVector2D
getN()
Surface contact normalVector2D
getP()
Contact positionboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
Contact2DCPtr
public Contact2DCPtr(long cPtr, boolean cMemoryOwn)
-
Contact2DCPtr
public Contact2DCPtr()
Default constructor yielding a NULL-pointer.
-
Contact2DCPtr
public Contact2DCPtr(Contact2D ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(Contact2DCPtr obj)
-
delete
public void delete()
-
deref
public Contact2D deref()
The pointer stored in the object.
-
__ref__
public Contact2D __ref__()
Dereferencing operator.
-
getDeref
public Contact2D getDeref()
Member access operator.
-
equals
public boolean equals(Contact2D 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
-
getP
public Vector2D getP()
Contact position
-
getN
public Vector2D getN()
Surface contact normal
-
getCurvature
public double getCurvature()
surface curvature
-
getAvgCurvature
public double getAvgCurvature()
double moving average of the curvature
-
getMu
public double getMu()
coulomb friction coefficient
-
-