igeo

## Class I2DField

- java.lang.Object
- - igeo.IObject
  - - igeo.IAgent
    - - igeo.IField
      - - igeo.I2DField

- All Implemented Interfaces:
    I2DFieldI, IDynamics, IFieldI, ISubobject
  Direct Known Subclasses:
    I2DMapField, I2DSurfaceNormalField, I2DSurfacePositionField, I2DSurfaceSlopeField, I2DSurfaceUTangentField, I2DSurfaceVTangentField

      public class I2DField
      extends IField
      implements I2DFieldI

  2D vector filed agent.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `I2DFieldI` | `field`

    - ### Fields inherited from class igeo.IField

      `targetClasses`

    - ### Fields inherited from class igeo.IAgent

      `alive, duration, interactOverridden, localDynamics, parent, targets, time`

    - ### Fields inherited from class igeo.IObject

      `attribute, dynamics, graphics, parameter, server, userData`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `I2DField(I2DFieldI f)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyField(IParticleI p)`
    `I2DField` | `bidirectional(boolean b)` if bidirectional is on, field force vector is flipped when velocity of particle is going opposite
    `I2DField` | `constantIntensity(boolean b)` if output vector is besed on constant length (intensity) or variable depending geometry when curve or surface tangent is used
    `I2DField` | `decay(IDecay decay, double threshold)` custom decay
    `void` | `del()` delete agent and stop it by removing it from dynamics server
    `void` | `del(boolean deleteGeometry)` stop agent with option of deleting/keeping the geometry the agent owns
    `I2DFieldI` | `field()`
    `I2DField` | `gauss(double threshold)` alias of gaussianDecay
    `I2DField` | `gaussian(double threshold)` alias of gaussianDecay
    `I2DField` | `gaussianDecay(double threshold)` set Gaussian decay with threshold; Threshold is used as double of standard deviation (when distance is eqaul to threshold, output is 13.5% of original).
    `IVec2I` | `get(IVecI pt)` get field value at 3D location
    `IVec2I` | `get(IVecI pt, IVecI vel)` default field vector ignoreing velocity
    `double` | `intensity()` get output intensity
    `I2DField` | `intensity(double i)` set output intensity
    `I2DField` | `linear(double threshold)` alias of linearDecay
    `I2DField` | `linearDecay(double threshold)` set linear decay with threshold; When distance is equal to threshold, output is zero.
    `I2DField` | `noDecay()` set no decay
    `double` | `threshold()` get decay threshold
    `I2DField` | `threshold(double t)` set decay threshold

    - ### Methods inherited from class igeo.IField

      `clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, hide, hsb, hsb, hsb, hsb, interact, isTarget, isTargetClass, layer, name, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setColor, setHSBColor, setHSBColor, setHSBColor, setHSBColor, show, target, target, targetClass, targetClass, weight, weight`

    - ### Methods inherited from class igeo.IAgent

      `addDynamics, alive, deletDynamics, deleteDynamics, deleteDynamics, duration, duration, dynamicsNum, getDynamics, initAgent, interact, localDynamics, parent, parent, postinteract, postupdate, preinteract, preupdate, removeTarget, removeTarget, setColor, setColor, setColor, setColor, target, target, targetNum, targets, time, time, update, updateGraphic, updateTarget`

    - ### Methods inherited from class igeo.IObject

      `addUserData, addUserData, alpha, alphaInt, attr, attr, attr, awtColor, blue, blueInt, brightness, castStringHashMap, clearDynamics, clearGraphics, clr, cp, createGraphic, defaultAttribute, deleteGraphic, dup, getAWTColor, getColor, getGraphic, getGraphic, getParameter, graphicsNum, gray, grayInt, green, greenInt, grey, greyInt, hue, initGraphic, initObject, isValid, isVisible, layer, layer, name, red, redInt, resetGraphic, saturation, server, setColor, setColor, setParameter, setTexture, syncColor, syncGraphic, syncVisibility, syncWeight, texture, userData, userData, userData, userDataNum, visible, weight`

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

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

- - ### Field Detail

    - #### field

          public I2DFieldI field

  - ### Constructor Detail

    - #### I2DField

          public I2DField(I2DFieldI f)

  - ### Method Detail

    - #### get

          public IVec2I get(IVecI pt)

      Description copied from interface: `I2DFieldI`
      get field value at 3D location
      Specified by:
        `get` in interface `I2DFieldI`
      Specified by:
        `get` in interface `IFieldI`

    - #### get

          public IVec2I get(IVecI pt,
                   IVecI vel)

      Description copied from class: `IField`
      default field vector ignoreing velocity
      Specified by:
        `get` in interface `I2DFieldI`
      Specified by:
        `get` in interface `IFieldI`
      Overrides:
        `get` in class `IField`

    - #### applyField

          public void applyField(IParticleI p)

      Specified by:
        `applyField` in class `IField`

    - #### field

          public I2DFieldI field()

    - #### noDecay

          public I2DField noDecay()

      set no decay
      Specified by:
        `noDecay` in interface `IFieldI`

    - #### linearDecay

          public I2DField linearDecay(double threshold)

      set linear decay with threshold; When distance is equal to threshold, output is zero.
      Specified by:
        `linearDecay` in interface `IFieldI`

    - #### linear

          public I2DField linear(double threshold)

      alias of linearDecay
      Specified by:
        `linear` in interface `IFieldI`

    - #### gaussianDecay

          public I2DField gaussianDecay(double threshold)

      set Gaussian decay with threshold; Threshold is used as double of standard deviation (when distance is eqaul to threshold, output is 13.5% of original).
      Specified by:
        `gaussianDecay` in interface `IFieldI`

    - #### gaussian

          public I2DField gaussian(double threshold)

      alias of gaussianDecay
      Specified by:
        `gaussian` in interface `IFieldI`

    - #### gauss

          public I2DField gauss(double threshold)

      Description copied from interface: `IFieldI`
      alias of gaussianDecay
      Specified by:
        `gauss` in interface `IFieldI`

    - #### decay

          public I2DField decay(IDecay decay,
                       double threshold)

      custom decay
      Specified by:
        `decay` in interface `IFieldI`

    - #### constantIntensity

          public I2DField constantIntensity(boolean b)

      if output vector is besed on constant length (intensity) or variable depending geometry when curve or surface tangent is used
      Specified by:
        `constantIntensity` in interface `IFieldI`

    - #### bidirectional

          public I2DField bidirectional(boolean b)

      if bidirectional is on, field force vector is flipped when velocity of particle is going opposite
      Specified by:
        `bidirectional` in interface `IFieldI`

    - #### threshold

          public I2DField threshold(double t)

      set decay threshold
      Specified by:
        `threshold` in interface `IFieldI`

    - #### threshold

          public double threshold()

      get decay threshold
      Specified by:
        `threshold` in interface `IFieldI`

    - #### intensity

          public I2DField intensity(double i)

      set output intensity
      Specified by:
        `intensity` in interface `IFieldI`

    - #### intensity

          public double intensity()

      get output intensity
      Specified by:
        `intensity` in interface `IFieldI`

    - #### del

          public void del()

      Description copied from class: `IAgent`
      delete agent and stop it by removing it from dynamics server
      Specified by:
        `del` in interface `IFieldI`
      Overrides:
        `del` in class `IAgent`

    - #### del

          public void del(boolean deleteGeometry)

      stop agent with option of deleting/keeping the geometry the agent owns
      Overrides:
        `del` in class `IAgent`