Class DynamicWorkCellPtr


  • public class DynamicWorkCellPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • 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

      • delete

        public void delete()
      • 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
      • 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.
      • 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
      • 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
      • 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.
      • getMaterialData

        public SWIGTYPE_p_MaterialDataMap getMaterialData()
        gets the material data information, like friction
        properties
      • 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
      • 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)
      • findPDController

        public PDControllerPtr findPDController​(java.lang.String name)