igeo

## Class ISurfaceCache

- java.lang.Object
- - igeo.ISurfaceCache

-     public class ISurfaceCache
      extends java.lang.Object

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IVec[][]` | `pts`
    `IVec2[][]` | `pts2`
    `ISurfaceGeo` | `surface`
    `int` | `udeg`
    `int` | `uresolution`
    `int` | `vdeg`
    `int` | `vresolution`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ISurfaceCache(ISurfaceGeo surf)`
    `ISurfaceCache(ISurfaceGeo surf, int resolution)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `closest(IVec pt)`
    `int[]` | `closest(IVec2 pt)`
    `int[]` | `getCloserTriangle(IVec2 pt, int uidx, int vidx)`
    `int[]` | `getCloserTriangle(IVec pt, int uidx, int vidx)` center of a cell in pts grid
    `void` | `init()`
    `void` | `init2()`
    `IVec2` | `recursiveSearch(IVec2 pt, double minU, double minV, double maxU, double maxV, IVec2[][] cornerPts, int depthCount)`
    `IVec2` | `recursiveSearch(IVec pt, double minU, double minV, double maxU, double maxV, IVec[][] cornerPts, int depthCount)`
    `double` | `u(int uindex)`
    `IVec2` | `uv(IVec pt)` approximate invert projection from 3D location to interanl parameter U (closest point on curve)
    `IVec2` | `uv(IVec2 pt)` approximate invert projection from 3D location to interanl parameter U (closest point on curve)
    `double` | `v(int vindex)`

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

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

- - ### Field Detail

    - #### surface

          public ISurfaceGeo surface

    - #### uresolution

          public int uresolution

    - #### vresolution

          public int vresolution

    - #### udeg

          public int udeg

    - #### vdeg

          public int vdeg

    - #### pts

          public IVec[][] pts

    - #### pts2

          public IVec2[][] pts2

  - ### Constructor Detail

    - #### ISurfaceCache

          public ISurfaceCache(ISurfaceGeo surf,
                               int resolution)

    - #### ISurfaceCache

          public ISurfaceCache(ISurfaceGeo surf)

  - ### Method Detail

    - #### init

          public void init()

    - #### init2

          public void init2()

    - #### u

          public double u(int uindex)

    - #### v

          public double v(int vindex)

    - #### getCloserTriangle

          public int[] getCloserTriangle(IVec pt,
                                         int uidx,
                                         int vidx)

      center of a cell in pts grid

    - #### getCloserTriangle

          public int[] getCloserTriangle(IVec2 pt,
                                         int uidx,
                                         int vidx)

    - #### uv

          public IVec2 uv(IVec pt)

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

    - #### uv

          public IVec2 uv(IVec2 pt)

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

    - #### recursiveSearch

          public IVec2 recursiveSearch(IVec pt,
                                       double minU,
                                       double minV,
                                       double maxU,
                                       double maxV,
                                       IVec[][] cornerPts,
                                       int depthCount)

    - #### recursiveSearch

          public IVec2 recursiveSearch(IVec2 pt,
                                       double minU,
                                       double minV,
                                       double maxU,
                                       double maxV,
                                       IVec2[][] cornerPts,
                                       int depthCount)

    - #### closest

          public int[] closest(IVec pt)

    - #### closest

          public int[] closest(IVec2 pt)