Class QConstraintPtr


  • public class QConstraintPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • QConstraintPtr

        public QConstraintPtr​(long cPtr,
                              boolean cMemoryOwn)
      • QConstraintPtr

        public QConstraintPtr()
        Default constructor yielding a NULL-pointer.
      • QConstraintPtr

        public QConstraintPtr​(QConstraint ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

        public QConstraint deref()
        The pointer stored in the object.
      • __ref__

        public QConstraint __ref__()
        Dereferencing operator.
      • getDeref

        public QConstraint getDeref()
        Member access operator.
      • 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
      • 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 QConstraintPtr makeFixed​(boolean value)
        A fixed constraint.

        The fixed constraint always returns value from inCollision().
      • makeBounds

        public 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.
      • makeNormalized

        public 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 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 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.