Class QIKSamplerPtr


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

      • QIKSamplerPtr

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

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

        public QIKSamplerPtr​(QIKSampler 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 QIKSampler deref()
        The pointer stored in the object.
      • __ref__

        public QIKSampler __ref__()
        Dereferencing operator.
      • getDeref

        public QIKSampler getDeref()
        Member access operator.
      • equals

        public boolean equals​(QIKSampler 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
      • sample

        public Q sample​(Transform3Dd target)
        Sample a configuration that solves an IK problem for
        target.

        If sampling fails, the sampler may return the empty configuration. If
        empty() is true then the sampler has no more configurations.
        Otherwise sample() may (or may not) succeed if called a second time.
      • empty

        public boolean empty()
        True if the sampler is known to contain no more
        configurations.
      • make

        public QIKSamplerPtr make​(DevicePtr device,
                                  State state,
                                  IterativeIKPtr solver,
                                  QSamplerPtr seed,
                                  int maxAttempts)
        An IK sampler based on an iterative IK solver.

        All solutions returned are checked to be within the bounds of the device.

        Parameters:
        device - [in] The device for which seeds are sampled.

        state - [in] Fixed state with respect to which IK is solved.

        solver - [in] Optional IK solver for device and state.

        seed - [in] Optional sampler of seeds to feed the IK solver.

        maxAttempts - [in] Optional number of seeds to feed the IK
        solver. If maxAttempts is negative, a default value for
        maxAttempts is chosen.
      • make

        public QIKSamplerPtr make​(DevicePtr device,
                                  State state,
                                  IterativeIKPtr solver,
                                  QSamplerPtr seed)
        An IK sampler based on an iterative IK solver.

        All solutions returned are checked to be within the bounds of the device.

        Parameters:
        device - [in] The device for which seeds are sampled.

        state - [in] Fixed state with respect to which IK is solved.

        solver - [in] Optional IK solver for device and state.

        seed - [in] Optional sampler of seeds to feed the IK solver.

      • make

        public QIKSamplerPtr make​(DevicePtr device,
                                  State state,
                                  IterativeIKPtr solver)
        An IK sampler based on an iterative IK solver.

        All solutions returned are checked to be within the bounds of the device.

        Parameters:
        device - [in] The device for which seeds are sampled.

        state - [in] Fixed state with respect to which IK is solved.

        solver - [in] Optional IK solver for device and state.



      • make

        public QIKSamplerPtr make​(DevicePtr device,
                                  State state)
        An IK sampler based on an iterative IK solver.

        All solutions returned are checked to be within the bounds of the device.

        Parameters:
        device - [in] The device for which seeds are sampled.

        state - [in] Fixed state with respect to which IK is solved.





      • makeConstrained

        public QIKSamplerPtr makeConstrained​(QIKSamplerPtr sampler,
                                             QConstraintPtr constraint,
                                             int maxAttempts)
        An IK sampler filtered by a constraint.

        For each call of sample() up to maxAttempts configurations are
        extracted from sampler and checked by constraint. The first
        sample that satisfies the constraint is returned; if no such were
        found the empty configuration is returned.

        If maxAttempts is negative, then sampler is sampled forever
        until either the sampler is empty or a configuration satisfying
        constraint is found.
      • makeConstrained

        public QIKSamplerPtr makeConstrained​(QIKSamplerPtr sampler,
                                             QConstraintPtr constraint)
        An IK sampler filtered by a constraint.

        For each call of sample() up to maxAttempts configurations are
        extracted from sampler and checked by constraint. The first
        sample that satisfies the constraint is returned; if no such were
        found the empty configuration is returned.

        If maxAttempts is negative, then sampler is sampled forever
        until either the sampler is empty or a configuration satisfying
        constraint is found.