Package org.robwork.sdurw_models
Class RigidObjectCPtr
- java.lang.Object
-
- org.robwork.sdurw_models.RigidObjectCPtr
-
public class RigidObjectCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description RigidObjectCPtr()Default constructor yielding a NULL-pointer.RigidObjectCPtr(long cPtr, boolean cMemoryOwn)RigidObjectCPtr(RigidObject 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 RigidObject__ref__()Dereferencing operator.voiddelete()RigidObjectderef()The pointer stored in the object.booleanequals(RigidObject p)Vector3DgetCOM()get the center of mass of this rigid body seen in the base frameVector3DgetCOM(State state)static longgetCPtr(RigidObjectCPtr obj)RigidObjectgetDeref()Member access operator.VectorGeometryPtrgetGeometry()get geometry of this rigid objectInertiaMatrixdgetInertia()get the inertia matrix of this rigid body seen in the base frameInertiaMatrixdgetInertia(State state)doublegetMass()returns the mass of this RigidObjectdoublegetMass(State state)Model3DPtrVectorgetModels()get visualization models for this rigid objectbooleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
RigidObjectCPtr
public RigidObjectCPtr(long cPtr, boolean cMemoryOwn)
-
RigidObjectCPtr
public RigidObjectCPtr()
Default constructor yielding a NULL-pointer.
-
RigidObjectCPtr
public RigidObjectCPtr(RigidObject ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(RigidObjectCPtr obj)
-
delete
public void delete()
-
deref
public RigidObject deref()
The pointer stored in the object.
-
__ref__
public RigidObject __ref__()
Dereferencing operator.
-
getDeref
public RigidObject getDeref()
Member access operator.
-
equals
public boolean equals(RigidObject 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
-
getMass
public double getMass()
returns the mass of this RigidObject- Returns:
- mass of the Object
-
getMass
public double getMass(State state)
-
getInertia
public InertiaMatrixd getInertia()
get the inertia matrix of this rigid body seen in the base frame- Returns:
- IntertiaMatrix
-
getInertia
public InertiaMatrixd getInertia(State state)
-
getCOM
public Vector3D getCOM()
get the center of mass of this rigid body seen in the base frame- Returns:
- the center of mass 3D coordinate
-
getGeometry
public VectorGeometryPtr getGeometry()
get geometry of this rigid object- Returns:
- a list of all Geometries
-
getModels
public Model3DPtrVector getModels()
get visualization models for this rigid object- Returns:
- a list of all models
-
-