Package org.robwork.sdurw
Class Contact2DPtr
- java.lang.Object
-
- org.robwork.sdurw.Contact2DPtr
-
public class Contact2DPtr extends java.lang.Object
Ptr 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.void
delete()
Contact2D
deref()
The pointer stored in the object.boolean
equals(Contact2D p)
double
getAvgCurvature()
double moving average of the curvaturestatic long
getCPtr(Contact2DPtr obj)
double
getCurvature()
surface curvatureContact2D
getDeref()
Member access operator.double
getMu()
coulomb friction coefficientVector2Dd
getN()
Surface contact normalVector2Dd
getP()
Contact positionboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
setAvgCurvature(double value)
double moving average of the curvaturevoid
setCurvature(double value)
surface curvaturevoid
setMu(double value)
coulomb friction coefficientvoid
setN(Vector2Dd value)
Surface contact normalvoid
setP(Vector2Dd 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
-
setP
public void setP(Vector2Dd value)
Contact position
-
getP
public Vector2Dd getP()
Contact position
-
setN
public void setN(Vector2Dd value)
Surface contact normal
-
getN
public Vector2Dd 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
-
-