Class QIKSampler


  • public class QIKSampler
    extends java.lang.Object

    Interface for the sampling a configuration that solves an IK
    problem.
    • Constructor Detail

      • QIKSampler

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

      • getCPtr

        public static long getCPtr​(QIKSampler obj)
      • delete

        public void delete()
      • sample

        public Q sample​(Transform3D 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 static QIKSamplerPtr make​(DevicePtr device,
                                         State state,
                                         SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t 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 static QIKSamplerPtr make​(DevicePtr device,
                                         State state,
                                         SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t 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 static QIKSamplerPtr make​(DevicePtr device,
                                         State state,
                                         SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t 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 static 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 static 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 static 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.