Package org.robwork.sdurw_models
Class DeformableObjectCPtr
- java.lang.Object
-
- org.robwork.sdurw_models.DeformableObjectCPtr
-
public class DeformableObjectCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DeformableObjectCPtr()
Default constructor yielding a NULL-pointer.DeformableObjectCPtr(long cPtr, boolean cMemoryOwn)
DeformableObjectCPtr(DeformableObject 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 DeformableObject
__ref__()
Dereferencing operator.void
delete()
DeformableObject
deref()
The pointer stored in the object.boolean
equals(DeformableObject p)
Vector3D
getCOM(State state)
get center of mass of this objectstatic long
getCPtr(DeformableObjectCPtr obj)
DeformableObject
getDeref()
Member access operator.VectorIndexedTriangle
getFaces()
get all faces of this soft bodyVectorGeometryPtr
getGeometry()
get default geometriesVectorGeometryPtr
getGeometry(State state)
get geometry of this objectInertiaMatrixd
getInertia(State state)
returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.double
getMass(State state)
get mass in Kg of this objectModel3DPtrVector
getModels()
get the default modelsModel3DPtrVector
getModels(State state)
get visualization models of this objectVector3Df
getNode(int id, State state)
get a specific node from the statelong
getNrNodes()
get the number of controlling nodes of this deformable object.long
getNrNodes(State state)
get the number of controlling nodes of this deformable object.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownership
-
-
-
Constructor Detail
-
DeformableObjectCPtr
public DeformableObjectCPtr(long cPtr, boolean cMemoryOwn)
-
DeformableObjectCPtr
public DeformableObjectCPtr()
Default constructor yielding a NULL-pointer.
-
DeformableObjectCPtr
public DeformableObjectCPtr(DeformableObject ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DeformableObjectCPtr obj)
-
delete
public void delete()
-
deref
public DeformableObject deref()
The pointer stored in the object.
-
__ref__
public DeformableObject __ref__()
Dereferencing operator.
-
getDeref
public DeformableObject getDeref()
Member access operator.
-
equals
public boolean equals(DeformableObject 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
-
getNode
public Vector3Df getNode(int id, State state)
get a specific node from the state- Parameters:
id
- [in] id of the node to fetchstate
- [in] current state- Returns:
- handle to manipulate a node in the given state.
-
getNrNodes
public long getNrNodes(State state)
get the number of controlling nodes of this deformable object.- Parameters:
state
- [in]- Returns:
- Number of Nodes
-
getNrNodes
public long getNrNodes()
get the number of controlling nodes of this deformable object.- Returns:
- Number of Nodes
-
getFaces
public VectorIndexedTriangle getFaces()
get all faces of this soft body- Returns:
- list of indexed triangles - indeces point to vertices/nodes
-
getMass
public double getMass(State state)
get mass in Kg of this object- Parameters:
state
- [in] the state- Returns:
- mass in kilo grams
-
getCOM
public Vector3D getCOM(State state)
get center of mass of this object- Parameters:
state
- [in] the state in which to get center of mass- Returns:
- Position of COM
-
getInertia
public InertiaMatrixd getInertia(State state)
returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.- Parameters:
state
- [in] the state to get the inertia in- Returns:
- matrix with inertia
-
getGeometry
public VectorGeometryPtr getGeometry()
get default geometries- Returns:
- geometry for collision detection
-
getGeometry
public VectorGeometryPtr getGeometry(State state)
get geometry of this object- Returns:
- geometry for collision detection.
-
getModels
public Model3DPtrVector getModels()
get the default models- Returns:
- models for vizualization
-
getModels
public Model3DPtrVector getModels(State state)
get visualization models of this object- Returns:
- models for visualization
-
-