Package org.robwork.sdurwsim
Class DynamicWorkCellPtr
- java.lang.Object
-
- org.robwork.sdurwsim.DynamicWorkCellPtr
-
public class DynamicWorkCellPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DynamicWorkCellPtr()Default constructor yielding a NULL-pointer.DynamicWorkCellPtr(long cPtr, boolean cMemoryOwn)DynamicWorkCellPtr(DynamicWorkCell 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 DynamicWorkCell__ref__()Dereferencing operator.voidaddBody(SWIGTYPE_p_Body__Ptr body)adds a body to the dynamic workcell.
Notice that this will change the length of the default
State.voidaddConstraint(SWIGTYPE_p_Constraint__Ptr constraint)Add a constraint to the dynamic workcell.voidaddController(SimulatedControllerPtr manipulator)adds a body controller to the dynamic workcell.
Notice that this will change the length of the default
State.voidaddDevice(SWIGTYPE_p_DynamicDevice__Ptr device)add a device to the dynamic workcellvoidaddSensor(SimulatedSensorPtr sensor)add a sensor to the dynamic workcellSWIGTYPE_p_rw__core__EventT_boost__functionT_void_frwsim__dynamics__DynamicWorkCell__DWCEventType_boost__anyF_t_rwsim__dynamics__DynamicWorkCell__DWCEventType_boost__any_rw__core___n1_rw__core___n1_tchangedEvent()Returns StateChangeEvent needed for subscribing and firing the event.DynamicWorkCellCPtrcptr()voiddelete()DynamicWorkCellderef()The pointer stored in the object.booleanequals(DynamicWorkCell p)SWIGTYPE_p_Body__PtrfindBody(java.lang.String name)find a specific body with name nameSWIGTYPE_p_Constraint__PtrfindConstraint(java.lang.String name)find a specific constraint with name nameSimulatedControllerPtrfindController(java.lang.String name)Find a simulated controller.SWIGTYPE_p_DynamicDevice__PtrfindDevice(java.lang.String name)find a dynamic device of name nameFixedBodyPtrfindFixedBody(java.lang.String name)SimulatedFTSensorPtrfindFTSensor(java.lang.String name)KinematicBodyPtrfindKinematicBody(java.lang.String name)PDControllerPtrfindPDController(java.lang.String name)RigidBodyPtrfindRigidBody(java.lang.String name)RigidDevicePtrfindRigidDevice(java.lang.String name)SimulatedSensorPtrfindSensor(java.lang.String name)find a sensorSerialDeviceControllerPtrfindSerialDeviceController(java.lang.String name)SuctionCupPtrfindSuctionCup(java.lang.String name)SWIGTYPE_p_std__vectorT_Body__Ptr_tgetBodies()gets a list of all bodies in the dynamic workcellBodyPtrgetBody(java.lang.String name)SWIGTYPE_p_Body__PtrgetBody(FramePtr f)gets the body associated with frame f if any.doublegetCollisionMargin()the collision margin describe how closeSWIGTYPE_p_std__vectorT_Constraint__Ptr_tgetConstraints()gets a list of all constraints in the dynamic workcellSWIGTYPE_p_ContactDataMapgetContactData()gets the static contact data informationSWIGTYPE_p_std__vectorT_rw__core__PtrT_rwlibs__simulation__SimulatedController_t_tgetControllers()gets a list of all controllers in the dynamic workcellstatic longgetCPtr(DynamicWorkCellPtr obj)DynamicWorkCellgetDeref()Member access operator.SWIGTYPE_p_std__vectorT_DynamicDevice__Ptr_tgetDynamicDevices()gets a list of all dynamic devices in the dynamic workcellPropertyMapgetEngineSettings()get the settings and properties for the physics engineVector3DgetGravity()get the gravity in this dynamic workcellSWIGTYPE_p_MaterialDataMapgetMaterialData()gets the material data information, like friction
propertiesSWIGTYPE_p_std__vectorT_rw__core__PtrT_rwlibs__simulation__SimulatedSensor_t_tgetSensors()get the list of sensorsWorkCellPtrgetWorkcell()gets the default kinematic workcellWorkCellPtrgetWorkCell()gets the default kinematic workcellWorkCellDimensiongetWorldDimension()Get dimensions of workspace.booleaninDevice(SWIGTYPE_p_rw__core__PtrT_Body_const_t body)tests if a body is part of a devicebooleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipbooleanremove(SWIGTYPE_p_Body__Ptr body)Remove a body from the list of bodiesvoidsetCollisionMargin(double margin)Set the collision margin.voidsetGravity(double x, double y, double z)voidsetGravity(Vector3D grav)Set the gravity in this dynamic workcell
-
-
-
Constructor Detail
-
DynamicWorkCellPtr
public DynamicWorkCellPtr(long cPtr, boolean cMemoryOwn)
-
DynamicWorkCellPtr
public DynamicWorkCellPtr()
Default constructor yielding a NULL-pointer.
-
DynamicWorkCellPtr
public DynamicWorkCellPtr(DynamicWorkCell ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DynamicWorkCellPtr obj)
-
delete
public void delete()
-
deref
public DynamicWorkCell deref()
The pointer stored in the object.
-
__ref__
public DynamicWorkCell __ref__()
Dereferencing operator.
-
getDeref
public DynamicWorkCell getDeref()
Member access operator.
-
equals
public boolean equals(DynamicWorkCell 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
-
cptr
public DynamicWorkCellCPtr cptr()
-
getBodies
public SWIGTYPE_p_std__vectorT_Body__Ptr_t getBodies()
gets a list of all bodies in the dynamic workcell
-
findBody
public SWIGTYPE_p_Body__Ptr findBody(java.lang.String name)
find a specific body with name name- Parameters:
name- [in] name of body- Returns:
- body if found, NULL otherwise
-
addConstraint
public void addConstraint(SWIGTYPE_p_Constraint__Ptr constraint)
Add a constraint to the dynamic workcell.- Parameters:
constraint- [in] a smart pointer to the constraint to add.
-
getConstraints
public SWIGTYPE_p_std__vectorT_Constraint__Ptr_t getConstraints()
gets a list of all constraints in the dynamic workcell
-
findConstraint
public SWIGTYPE_p_Constraint__Ptr findConstraint(java.lang.String name)
find a specific constraint with name name- Parameters:
name- [in] name of constraint- Returns:
- constraint if found, NULL otherwise
-
getDynamicDevices
public SWIGTYPE_p_std__vectorT_DynamicDevice__Ptr_t getDynamicDevices()
gets a list of all dynamic devices in the dynamic workcell- Returns:
- a list of dynamic devices.
-
addDevice
public void addDevice(SWIGTYPE_p_DynamicDevice__Ptr device)
add a device to the dynamic workcell- Parameters:
device- [in] a device
-
findDevice
public SWIGTYPE_p_DynamicDevice__Ptr findDevice(java.lang.String name)
find a dynamic device of name name- Parameters:
name- [in] name of device- Returns:
- a device with name name or null
-
getControllers
public SWIGTYPE_p_std__vectorT_rw__core__PtrT_rwlibs__simulation__SimulatedController_t_t getControllers()
gets a list of all controllers in the dynamic workcell
-
getSensors
public SWIGTYPE_p_std__vectorT_rw__core__PtrT_rwlibs__simulation__SimulatedSensor_t_t getSensors()
get the list of sensors
-
addSensor
public void addSensor(SimulatedSensorPtr sensor)
add a sensor to the dynamic workcell- Parameters:
sensor- [in] a simulated sensor
-
findSensor
public SimulatedSensorPtr findSensor(java.lang.String name)
find a sensor- Parameters:
name- [in] the sensor- Returns:
-
addBody
public void addBody(SWIGTYPE_p_Body__Ptr body)
adds a body to the dynamic workcell.
Notice that this will change the length of the default
State.
-
addController
public void addController(SimulatedControllerPtr manipulator)
adds a body controller to the dynamic workcell.
Notice that this will change the length of the default
State.
-
findController
public SimulatedControllerPtr findController(java.lang.String name)
Find a simulated controller.- Parameters:
name- [in] name of the controller.- Returns:
- the simulated controller if found, NULL otherwise.
-
getContactData
public SWIGTYPE_p_ContactDataMap getContactData()
gets the static contact data information
-
getMaterialData
public SWIGTYPE_p_MaterialDataMap getMaterialData()
gets the material data information, like friction
properties
-
getBody
public SWIGTYPE_p_Body__Ptr getBody(FramePtr f)
gets the body associated with frame f if any.
-
getBody
public BodyPtr getBody(java.lang.String name)
-
getWorkcell
public WorkCellPtr getWorkcell()
gets the default kinematic workcell
-
getWorkCell
public WorkCellPtr getWorkCell()
gets the default kinematic workcell
-
getCollisionMargin
public double getCollisionMargin()
the collision margin describe how close
-
setCollisionMargin
public void setCollisionMargin(double margin)
Set the collision margin.- Parameters:
margin- [in] the new margin.
-
getWorldDimension
public WorkCellDimension getWorldDimension()
Get dimensions of workspace.- Returns:
- the dimensions.
-
inDevice
public boolean inDevice(SWIGTYPE_p_rw__core__PtrT_Body_const_t body)
tests if a body is part of a device- Parameters:
body- [in] the body to test for.- Returns:
- true if body is part of the device.
-
setGravity
public void setGravity(Vector3D grav)
Set the gravity in this dynamic workcell- Parameters:
grav- [in] the direction and strength of gravity
-
setGravity
public void setGravity(double x, double y, double z)
-
getGravity
public Vector3D getGravity()
get the gravity in this dynamic workcell- Returns:
- gravity
-
getEngineSettings
public PropertyMap getEngineSettings()
get the settings and properties for the physics engine- Returns:
- propertymap
-
remove
public boolean remove(SWIGTYPE_p_Body__Ptr body)
Remove a body from the list of bodies- Parameters:
body- [in] the body to be removed- Returns:
- True if body was removed otherwise false
-
changedEvent
public SWIGTYPE_p_rw__core__EventT_boost__functionT_void_frwsim__dynamics__DynamicWorkCell__DWCEventType_boost__anyF_t_rwsim__dynamics__DynamicWorkCell__DWCEventType_boost__any_rw__core___n1_rw__core___n1_t changedEvent()
Returns StateChangeEvent needed for subscribing and firing the event.- Returns:
- Reference to the StateChangedEvent
-
findRigidBody
public RigidBodyPtr findRigidBody(java.lang.String name)
-
findKinematicBody
public KinematicBodyPtr findKinematicBody(java.lang.String name)
-
findFixedBody
public FixedBodyPtr findFixedBody(java.lang.String name)
-
findRigidDevice
public RigidDevicePtr findRigidDevice(java.lang.String name)
-
findSuctionCup
public SuctionCupPtr findSuctionCup(java.lang.String name)
-
findFTSensor
public SimulatedFTSensorPtr findFTSensor(java.lang.String name)
-
findSerialDeviceController
public SerialDeviceControllerPtr findSerialDeviceController(java.lang.String name)
-
findPDController
public PDControllerPtr findPDController(java.lang.String name)
-
-