igeo

## Class IScalarField

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

- All Implemented Interfaces:
    IDynamics, IFieldI, IScalarFieldI, ISubobject

      public abstract class IScalarField
      extends IField
      implements IScalarFieldI

  scalar filed agent.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IScalarFieldI` | `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
    `IScalarField(IScalarFieldI f)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyForce(IParticleI p)`
    `IScalarField` | `bidirectional(boolean b)` if bidirectional is on, field force vector is flipped when velocity of particle is going opposite
    `IScalarField` | `constantIntensity(boolean b)` if output vector is besed on constant length (intensity) or variable depending geometry when curve or surface tangent is used
    `IScalarField` | `decay(IDecay decay, double threshold)` custom decay
    `IScalarFieldI` | `field()`
    `IScalarField` | `gauss(double threshold)` alias of gaussianDecay
    `IScalarField` | `gaussian(double threshold)` alias of gaussianDecay
    `IScalarField` | `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).
    `double` | `intensity()` get output intensity
    `IScalarField` | `intensity(double i)` set output intensity
    `IScalarField` | `linear(double threshold)` alias of linearDecay
    `IScalarField` | `linearDecay(double threshold)` set linear decay with threshold; When distance is equal to threshold, output is zero.
    `IScalarField` | `noDecay()` set no decay
    `double` | `threshold()` get decay threshold
    `IScalarField` | `threshold(double t)` set decay threshold
    `abstract IVecI` | `to3d(IScalar v)` convert scalar value to 3d vector

    - ### Methods inherited from class igeo.IField

      `applyField, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, clr, get, 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, del, del, 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`

    - ### Methods inherited from interface igeo.IScalarFieldI

      `get`

    - ### Methods inherited from interface igeo.IFieldI

      `del, get`

- - ### Field Detail

    - #### field

          public IScalarFieldI field

  - ### Constructor Detail

    - #### IScalarField

          public IScalarField(IScalarFieldI f)

  - ### Method Detail

    - #### to3d

          public abstract IVecI to3d(IScalar v)

      convert scalar value to 3d vector

    - #### applyForce

          public void applyForce(IParticleI p)

    - #### field

          public IScalarFieldI field()

    - #### noDecay

          public IScalarField noDecay()

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

    - #### linearDecay

          public IScalarField 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 IScalarField linear(double threshold)

      Description copied from interface: `IFieldI`
      alias of linearDecay
      Specified by:
        `linear` in interface `IFieldI`

    - #### gaussianDecay

          public IScalarField 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 IScalarField gaussian(double threshold)

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

    - #### gauss

          public IScalarField gauss(double threshold)

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

    - #### decay

          public IScalarField decay(IDecay decay,
                                    double threshold)

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

    - #### constantIntensity

          public IScalarField 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 IScalarField 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 IScalarField 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 IScalarField 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`