Package org.robwork.sdurw_models
Class RigidObjectCPtr
- java.lang.Object
-
- org.robwork.sdurw_models.RigidObjectCPtr
-
public class RigidObjectCPtr extends java.lang.Object
Ptr 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.void
delete()
RigidObject
deref()
The pointer stored in the object.boolean
equals(RigidObject p)
Vector3D
getCOM()
get the center of mass of this rigid body seen in the base frameVector3D
getCOM(State state)
static long
getCPtr(RigidObjectCPtr obj)
RigidObject
getDeref()
Member access operator.VectorGeometryPtr
getGeometry()
get geometry of this rigid objectInertiaMatrixd
getInertia()
get the inertia matrix of this rigid body seen in the base frameInertiaMatrixd
getInertia(State state)
double
getMass()
returns the mass of this RigidObjectdouble
getMass(State state)
Model3DPtrVector
getModels()
get visualization models for this rigid objectboolean
isNull()
checks if the pointer is nullboolean
isShared()
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
-
-