Package org.robwork.sdurwsim
Class BodyPtr
- java.lang.Object
-
- org.robwork.sdurwsim.BodyPtr
-
public class BodyPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
-
-
-
Constructor Detail
-
BodyPtr
public BodyPtr(long cPtr, boolean cMemoryOwn)
-
BodyPtr
public BodyPtr()
Default constructor yielding a NULL-pointer.
-
BodyPtr
public BodyPtr(Body ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(BodyPtr obj)
-
delete
public void delete()
-
deref
public Body deref()
The pointer stored in the object.
-
__ref__
public Body __ref__()
Dereferencing operator.
-
getDeref
public Body getDeref()
Member access operator.
-
equals
public boolean equals(Body 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
-
getBodyFrame
public Frame getBodyFrame()
-
getFrames
public FrameVector getFrames()
-
getInfo
public BodyInfo getInfo()
-
getName
public java.lang.String getName()
-
getMaterialID
public java.lang.String getMaterialID()
-
getInertia
public InertiaMatrixd getInertia()
-
setMass
public void setMass(double m)
-
setMass
public void setMass(double m, InertiaMatrixd inertia)
-
setMass
public void setMass(double m, InertiaMatrixd inertia, Vector3D com)
-
reset
public void reset(State state)
-
calcEnergy
public double calcEnergy(State state)
-
getTransformW
public Transform3D getTransformW(State state)
-
pTbf
public Transform3D pTbf(State state)
-
pTcom
public Transform3D pTcom(State state)
-
wTbf
public Transform3D wTbf(State state)
-
wTcom
public Transform3D wTcom(State state)
-
place
public Transform3D place(CollisionDetectorPtr coldect, State state, Vector3D dir)
-
place
public Transform3D place(CollisionDetectorPtr coldect, State state)
-
-