Package org.robwork.sdurw_models
Class Object
- java.lang.Object
-
- org.robwork.sdurw_kinematics.Stateless
-
- org.robwork.sdurw_models.Object
-
- Direct Known Subclasses:
DeformableObject
,RigidObject
public class Object extends Stateless
The object class represents a physical thing in the scene which has geometry.
An object has a base frame (similar to a Device) and may have a number of associated frames.
-
-
Constructor Summary
Constructors Constructor Description Object(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFrame(FramePtr frame)
associate a frame to this Object.void
delete()
Frame
getBase()
get base frame of this objectVector3D
getCOM(State state)
get center of mass of this objectstatic long
getCPtr(Object obj)
FrameVector
getFrames()
get all associated frames of this objectVectorGeometryPtr
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 objectjava.lang.String
getName()
get name of this object.-
Methods inherited from class org.robwork.sdurw_kinematics.Stateless
getCPtr, getStateStructure, isRegistered, registerIn, registerIn, unregister
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Object obj)
-
getName
public java.lang.String getName()
get name of this object. Name is always the same as the name of the
base frame.- Returns:
- name of object.
-
getBase
public Frame getBase()
get base frame of this object- Returns:
- base frame of object
-
getFrames
public FrameVector getFrames()
get all associated frames of this object- Returns:
- a vector of frames
-
addFrame
public void addFrame(FramePtr frame)
associate a frame to this Object.- Parameters:
frame
- [in] frame to associate to object
-
getGeometry
public VectorGeometryPtr getGeometry()
get default geometries- Returns:
- geometry for collision detection
-
getModels
public Model3DPtrVector getModels()
get the default models- Returns:
- models for vizualization
-
getGeometry
public VectorGeometryPtr getGeometry(State state)
get geometry of this object- Returns:
- geometry for collision detection.
-
getModels
public Model3DPtrVector getModels(State state)
get visualization models of this object- Returns:
- models for visualization
-
getMass
public double getMass(State state)
get mass in Kg of this object- Parameters:
state
- [in] the state in which the mass should be gotten from- 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:
-
getInertia
public InertiaMatrixd getInertia(State state)
returns the inertia matrix of this body calculated around COM with the orientation
of the base frame.
-
-