igeo

## Class ICurveCache

- java.lang.Object
- - igeo.ICurveCache

-     public class ICurveCache
      extends java.lang.Object

  Point cache of a curve for proximity search.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ICurveGeo` | `curve`
    `int` | `deg`
    `IVec[]` | `pts`
    `IVec2[]` | `pts2`
    `int` | `resolution`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ICurveCache(ICurveGeo crv)`
    `ICurveCache(ICurveGeo crv, int resolution)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `closerIndexOnLine(IVec2 pt, int index)`
    `int` | `closerIndexOnLine(IVec pt, int index)`
    `int` | `closest(IVec pt)`
    `int` | `closest(IVec2 pt)`
    `void` | `init()`
    `void` | `init2()`
    `double` | `recursiveSearch(IVec2 pt, double minU, IVec2 minPt, double maxU, IVec2 maxPt, int depthCount)`
    `double` | `recursiveSearch(IVec pt, double minU, IVec minPt, double maxU, IVec maxPt, int depthCount)`
    `double` | `u(IVec pt)` approximate invert projection from 3D location to interanl parameter U (closest point on curve)
    `double` | `u(IVec2 pt)` approximate invert projection from 2D location to interanl parameter U

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### curve

          public ICurveGeo curve

    - #### resolution

          public int resolution

    - #### deg

          public int deg

    - #### pts

          public IVec[] pts

    - #### pts2

          public IVec2[] pts2

  - ### Constructor Detail

    - #### ICurveCache

          public ICurveCache(ICurveGeo crv,
                             int resolution)

    - #### ICurveCache

          public ICurveCache(ICurveGeo crv)

  - ### Method Detail

    - #### init

          public void init()

    - #### init2

          public void init2()

    - #### u

          public double u(IVec pt)

      approximate invert projection from 3D location to interanl parameter U (closest point on curve)

    - #### u

          public double u(IVec2 pt)

      approximate invert projection from 2D location to interanl parameter U

    - #### closerIndexOnLine

          public int closerIndexOnLine(IVec pt,
                                       int index)

    - #### closerIndexOnLine

          public int closerIndexOnLine(IVec2 pt,
                                       int index)

    - #### recursiveSearch

          public double recursiveSearch(IVec pt,
                                        double minU,
                                        IVec minPt,
                                        double maxU,
                                        IVec maxPt,
                                        int depthCount)

    - #### recursiveSearch

          public double recursiveSearch(IVec2 pt,
                                        double minU,
                                        IVec2 minPt,
                                        double maxU,
                                        IVec2 maxPt,
                                        int depthCount)

    - #### closest

          public int closest(IVec pt)

    - #### closest

          public int closest(IVec2 pt)