igeo

## Class IString

- java.lang.Object
- - igeo.IDynamicsBase
  - - igeo.IString

- All Implemented Interfaces:
    IDynamics, ISubobject

      public class IString
      extends IDynamicsBase

  Class of IDynamics to simulate limited length relationship between two points
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IVec` | `frc` just to store force difference in each time frame
    `double` | `len`
    `double` | `maxTension`
    `IParticleI` | `pt1`
    `IParticleI` | `pt2`

    - ### Fields inherited from class igeo.IDynamicsBase

      `parent, targets`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IString(IParticleI p1, IParticleI p2)`
    `IString(IParticleI p1, IParticleI p2, double length)`
    `IString(IParticleI p1, IParticleI p2, double length, IObject parent)`
    `IString(IParticleI p1, IParticleI p2, IObject parent)`
    `IString(IVecI p1, IVecI p2)`
    `IString(IVecI p1, IVecI p2, double length)`
    `IString(IVecI p1, IVecI p2, double length, IObject parent)`
    `IString(IVecI p1, IVecI p2, IObject parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `len()`
    `(package private) IString` | `len(double l)`
    `IString` | `parent(IObject par)` setting parent object
    `IParticleI` | `particle(int i)` alias of pt1()
    `IParticleI` | `particle1()` alias of pt1()
    `IParticleI` | `particle2()` alias of pt2()
    `IVec` | `pos(int i)` position of particle(i)
    `IVec` | `pos1()` position of particle1()
    `IVec` | `pos2()` position of particle2()
    `void` | `postinteract(java.util.ArrayList<IDynamics> dynamics)` executed after interact(ArrayList<IDynamics>).
    `void` | `postupdate()` executed after update().
    `void` | `preupdate()` after each particle receive all forces
    `IParticleI` | `pt(int i)` getting end point.
    `IParticleI` | `pt1()` getting end point1.
    `IParticleI` | `pt2()` getting end point2.
    `IString` | `removeTarget(int i)` remove target object.
    `IString` | `removeTarget(IObject obj)` remove target object.
    `IString` | `target(IObject targetObj)` add terget object to be updated by this dynamic object.

    - ### Methods inherited from class igeo.IDynamicsBase

      `initDynamicsBase, initDynamicsBase, initDynamicsBase, interact, localDynamics, parent, preinteract, target, targetNum, targets, update, updateTarget`

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

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

- - ### Field Detail

    - #### pt1

          public IParticleI pt1

    - #### pt2

          public IParticleI pt2

    - #### frc

          public IVec frc

      just to store force difference in each time frame

    - #### len

          public double len

    - #### maxTension

          public double maxTension

  - ### Constructor Detail

    - #### IString

          public IString(IParticleI p1,
                         IParticleI p2,
                         IObject parent)

    - #### IString

          public IString(IParticleI p1,
                         IParticleI p2,
                         double length,
                         IObject parent)

    - #### IString

          public IString(IVecI p1,
                         IVecI p2,
                         IObject parent)

    - #### IString

          public IString(IVecI p1,
                         IVecI p2,
                         double length,
                         IObject parent)

    - #### IString

          public IString(IParticleI p1,
                         IParticleI p2)

    - #### IString

          public IString(IParticleI p1,
                         IParticleI p2,
                         double length)

    - #### IString

          public IString(IVecI p1,
                         IVecI p2)

    - #### IString

          public IString(IVecI p1,
                         IVecI p2,
                         double length)

  - ### Method Detail

    - #### len

          public double len()

    - #### len

          IString len(double l)

    - #### pt

          public IParticleI pt(int i)

      getting end point. i==0 or i==1. if i is other value, returns first point.

    - #### particle

          public IParticleI particle(int i)

      alias of pt1()

    - #### pos

          public IVec pos(int i)

      position of particle(i)

    - #### pt1

          public IParticleI pt1()

      getting end point1.

    - #### particle1

          public IParticleI particle1()

      alias of pt1()

    - #### pos1

          public IVec pos1()

      position of particle1()

    - #### pt2

          public IParticleI pt2()

      getting end point2.

    - #### particle2

          public IParticleI particle2()

      alias of pt2()

    - #### pos2

          public IVec pos2()

      position of particle2()

    - #### parent

          public IString parent(IObject par)

      Description copied from interface: `ISubobject`
      setting parent object
      Specified by:
        `parent` in interface `ISubobject`
      Overrides:
        `parent` in class `IDynamicsBase`

    - #### target

          public IString target(IObject targetObj)

      Description copied from class: `IDynamicsBase`
      add terget object to be updated by this dynamic object.
      Specified by:
        `target` in interface `IDynamics`
      Overrides:
        `target` in class `IDynamicsBase`

    - #### removeTarget

          public IString removeTarget(int i)

      Description copied from class: `IDynamicsBase`
      remove target object.
      Specified by:
        `removeTarget` in interface `IDynamics`
      Overrides:
        `removeTarget` in class `IDynamicsBase`

    - #### removeTarget

          public IString removeTarget(IObject obj)

      Description copied from class: `IDynamicsBase`
      remove target object.
      Specified by:
        `removeTarget` in interface `IDynamics`
      Overrides:
        `removeTarget` in class `IDynamicsBase`

    - #### preupdate

          public void preupdate()

      after each particle receive all forces
      Specified by:
        `preupdate` in interface `IDynamics`
      Overrides:
        `preupdate` in class `IDynamicsBase`

    - #### postinteract

          public void postinteract(java.util.ArrayList<IDynamics> dynamics)

      Description copied from interface: `IDynamics`
      executed after interact(ArrayList<IDynamics>). behavior can be changed by IConfig.enablePostinteract and IConfig.loopPostinteract. If IConfig.loopPostinteract is false, preupdate is executed before post interact (updated 2012/08/26).
      Specified by:
        `postinteract` in interface `IDynamics`
      Overrides:
        `postinteract` in class `IDynamicsBase`

    - #### postupdate

          public void postupdate()

      Description copied from interface: `IDynamics`
      executed after update(). behavior can be changed by IConfig.enablePostupdate and IConfig.loopPostupdate.
      Specified by:
        `postupdate` in interface `IDynamics`
      Overrides:
        `postupdate` in class `IDynamicsBase`