Package org.robwork.sdurw_sensor
Class Contact2DPtr
- java.lang.Object
-
- org.robwork.sdurw_sensor.Contact2DPtr
-
public class Contact2DPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description Contact2DPtr()Default constructor yielding a NULL-pointer.Contact2DPtr(long cPtr, boolean cMemoryOwn)Contact2DPtr(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.Contact2DCPtrcptr()voiddelete()Contact2Dderef()The pointer stored in the object.booleanequals(Contact2D p)doublegetAvgCurvature()double moving average of the curvaturestatic longgetCPtr(Contact2DPtr 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
ownershipvoidsetAvgCurvature(double value)double moving average of the curvaturevoidsetCurvature(double value)surface curvaturevoidsetMu(double value)coulomb friction coefficientvoidsetN(Vector2D value)Surface contact normalvoidsetP(Vector2D value)Contact position
-
-
-
Constructor Detail
-
Contact2DPtr
public Contact2DPtr(long cPtr, boolean cMemoryOwn)
-
Contact2DPtr
public Contact2DPtr()
Default constructor yielding a NULL-pointer.
-
Contact2DPtr
public Contact2DPtr(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(Contact2DPtr 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
-
cptr
public Contact2DCPtr cptr()
-
setP
public void setP(Vector2D value)
Contact position
-
getP
public Vector2D getP()
Contact position
-
setN
public void setN(Vector2D value)
Surface contact normal
-
getN
public Vector2D getN()
Surface contact normal
-
setCurvature
public void setCurvature(double value)
surface curvature
-
getCurvature
public double getCurvature()
surface curvature
-
setAvgCurvature
public void setAvgCurvature(double value)
double moving average of the curvature
-
getAvgCurvature
public double getAvgCurvature()
double moving average of the curvature
-
setMu
public void setMu(double value)
coulomb friction coefficient
-
getMu
public double getMu()
coulomb friction coefficient
-
-