Package org.robwork.sdurw_sensor
Class Contact2DCPtr
- java.lang.Object
-
- org.robwork.sdurw_sensor.Contact2DCPtr
-
public class Contact2DCPtr extends java.lang.ObjectPtr 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.voiddelete()Contact2Dderef()The pointer stored in the object.booleanequals(Contact2D p)doublegetAvgCurvature()double moving average of the curvaturestatic longgetCPtr(Contact2DCPtr obj)doublegetCurvature()surface curvatureContact2DgetDeref()Member access operator.doublegetMu()coulomb friction coefficientVector2DgetN()Surface contact normalVector2DgetP()Contact positionbooleanisNull()checks if the pointer is nullbooleanisShared()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
-
-