Class QConstraint


  • public class QConstraint
    extends java.lang.Object

    Interface for the checking for collisions for work cell states.
    • Constructor Summary

      Constructors 
      Constructor Description
      QConstraint​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()  
      static long getCPtr​(QConstraint obj)  
      boolean inCollision​(Q q)
      True if the work cell is considered to be in collision for the
      device configuration q.
      static QConstraintPtr make​(StateConstraintPtr detector, DeviceCPtr device, State state)
      Map a state constraint to a configuration constraint.
      static QConstraintPtr make​(CollisionDetectorPtr detector, DeviceCPtr device, State state)
      Map a collision detector to a configuration constraint.
      static QConstraintPtr makeBounds​(PairQ bounds)
      Constraint for the bounds of the configuration space.
      The configuration is considered to be in collision if it is outside
      of the bounds given by bounds.
      static QConstraintPtr makeFixed​(boolean value)
      A fixed constraint.
      The fixed constraint always returns value from inCollision().
      static QConstraintPtr makeMerged​(QConstraintPtr ca, QConstraintPtr cb)
      Combine a pair of configuration constraints into a single
      configuration constraint.
      static QConstraintPtr makeMerged​(VectorQConstraintPtr constraints)
      Combine a set of configuration constraints into a single
      configuration constraint.
      static QConstraintPtr makeNormalized​(QConstraintPtr constraint, PairQ bounds)
      Map a configuration constraint for standard configurations
      into a configuration constraint for normalized configurations.

      Configuration values are mapped from the range [0, 1] into the
      corresponding position in the box bounds.
      static QConstraintPtr makeNormalized​(QConstraintPtr constraint, Device device)
      Map a configuration constraint for standard configurations
      into a configuration constraint for normalized configurations.

      Configuration values are mapped from the range [0, 1] into the
      corresponding position in the configuration space of device.
      static QConstraintPtr makeNormalized​(QConstraintPtr constraint, QNormalizer normalizer)
      Map a configuration constraint for standard configurations
      into a configuration constraint for normalized configurations.

      Configuration values are mapped from normalized configurations into
      standard configurations using normalizer.
      void setLog​(LogPtr log)
      Set the log to be used for writing debug info
      void update​(State state)
      Updates the constraint with a new state

      The method might not have an effect on all constrainttypes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QConstraint

        public QConstraint​(long cPtr,
                           boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(QConstraint obj)
      • delete

        public void delete()
      • setLog

        public void setLog​(LogPtr log)
        Set the log to be used for writing debug info
        Parameters:
        log - [in] Log to which debug information is to be written
      • update

        public void update​(State state)
        Updates the constraint with a new state

        The method might not have an effect on all constrainttypes.
      • inCollision

        public boolean inCollision​(Q q)
        True if the work cell is considered to be in collision for the
        device configuration q.
      • makeFixed

        public static QConstraintPtr makeFixed​(boolean value)
        A fixed constraint.
        The fixed constraint always returns value from inCollision().
      • makeBounds

        public static QConstraintPtr makeBounds​(PairQ bounds)
        Constraint for the bounds of the configuration space.
        The configuration is considered to be in collision if it is outside
        of the bounds given by bounds.
      • makeMerged

        public static QConstraintPtr makeMerged​(VectorQConstraintPtr constraints)
        Combine a set of configuration constraints into a single
        configuration constraint.
      • makeNormalized

        public static QConstraintPtr makeNormalized​(QConstraintPtr constraint,
                                                    PairQ bounds)
        Map a configuration constraint for standard configurations
        into a configuration constraint for normalized configurations.

        Configuration values are mapped from the range [0, 1] into the
        corresponding position in the box bounds.
      • makeNormalized

        public static QConstraintPtr makeNormalized​(QConstraintPtr constraint,
                                                    Device device)
        Map a configuration constraint for standard configurations
        into a configuration constraint for normalized configurations.

        Configuration values are mapped from the range [0, 1] into the
        corresponding position in the configuration space of device.
      • makeNormalized

        public static QConstraintPtr makeNormalized​(QConstraintPtr constraint,
                                                    QNormalizer normalizer)
        Map a configuration constraint for standard configurations
        into a configuration constraint for normalized configurations.

        Configuration values are mapped from normalized configurations into
        standard configurations using normalizer.